mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 00:59:56 +02:00
move PhysicsEntity so that ModelEntityItem can initiate a model download
This commit is contained in:
parent
df29d5365a
commit
bf1cb951a3
6 changed files with 11 additions and 9 deletions
|
@ -13,4 +13,4 @@ find_package(Bullet REQUIRED)
|
|||
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
|
||||
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
|
||||
|
||||
link_hifi_libraries(avatars shared octree gpu model fbx networking animation)
|
||||
link_hifi_libraries(avatars shared octree gpu model fbx networking animation render-utils)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "EntityTree.h"
|
||||
#include "EntityTreeElement.h"
|
||||
#include "ModelEntityItem.h"
|
||||
// #include "GeometryCache.h"
|
||||
#include "GeometryCache.h"
|
||||
|
||||
const QString ModelEntityItem::DEFAULT_MODEL_URL = QString("");
|
||||
const QString ModelEntityItem::DEFAULT_COLLISION_MODEL_URL = QString("");
|
||||
|
@ -416,13 +416,14 @@ QString ModelEntityItem::getAnimationSettings() const {
|
|||
void ModelEntityItem::computeShapeInfo(ShapeInfo& info) const {
|
||||
|
||||
if (_collisionModelURL != "") {
|
||||
// QSharedPointer<NetworkGeometry> networkGeometry =
|
||||
// DependencyManager::get<GeometryCache>()->getGeometry (_collisionModelURL, QUrl(), false);
|
||||
QSharedPointer<NetworkGeometry> networkGeometry =
|
||||
DependencyManager::get<GeometryCache>()->getGeometry (_collisionModelURL, QUrl(), false);
|
||||
|
||||
// XXX does this do an unneeded copy?
|
||||
FBXGeometry _collisionModel = networkGeometry->getFBXGeometry();
|
||||
|
||||
// FBXGeometry& _collisionModel;
|
||||
// _collisionModel = &networkGeometry->getFBXGeometry();
|
||||
// connect(networkGeometry, loaded, this, collisionGeometryLoaded);
|
||||
|
||||
// info.setParams(getShapeType(), 0.5f * getDimensions(), NULL, _collisionModelURL);
|
||||
info.setParams(getShapeType(), 0.5f * getDimensions(), NULL, _collisionModelURL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <gpu/GLBackend.h>
|
||||
#include <PathUtils.h>
|
||||
#include <PerfStat.h>
|
||||
#include <PhysicsEntity.h>
|
||||
#include <ShapeCollider.h>
|
||||
#include <SphereShape.h>
|
||||
#include <ViewFrustum.h>
|
||||
|
@ -34,6 +33,8 @@
|
|||
#include "DeferredLightingEffect.h"
|
||||
#include "GlowEffect.h"
|
||||
#include "Model.h"
|
||||
#include "PhysicsEntity.h"
|
||||
|
||||
|
||||
#include "model_vert.h"
|
||||
#include "model_shadow_vert.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <GeometryUtil.h>
|
||||
#include <gpu/Stream.h>
|
||||
#include <gpu/Batch.h>
|
||||
#include <PhysicsEntity.h>
|
||||
#include <Transform.h>
|
||||
|
||||
#include "AnimationHandle.h"
|
||||
|
@ -32,6 +31,7 @@
|
|||
#include "JointState.h"
|
||||
#include "ProgramObject.h"
|
||||
#include "TextureCache.h"
|
||||
#include "PhysicsEntity.h"
|
||||
|
||||
class AbstractViewStateInterface;
|
||||
class QScriptEngine;
|
||||
|
|
Loading…
Reference in a new issue