mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:37:17 +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_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
|
||||||
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
|
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 "EntityTree.h"
|
||||||
#include "EntityTreeElement.h"
|
#include "EntityTreeElement.h"
|
||||||
#include "ModelEntityItem.h"
|
#include "ModelEntityItem.h"
|
||||||
// #include "GeometryCache.h"
|
#include "GeometryCache.h"
|
||||||
|
|
||||||
const QString ModelEntityItem::DEFAULT_MODEL_URL = QString("");
|
const QString ModelEntityItem::DEFAULT_MODEL_URL = QString("");
|
||||||
const QString ModelEntityItem::DEFAULT_COLLISION_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 {
|
void ModelEntityItem::computeShapeInfo(ShapeInfo& info) const {
|
||||||
|
|
||||||
if (_collisionModelURL != "") {
|
if (_collisionModelURL != "") {
|
||||||
// QSharedPointer<NetworkGeometry> networkGeometry =
|
QSharedPointer<NetworkGeometry> networkGeometry =
|
||||||
// DependencyManager::get<GeometryCache>()->getGeometry (_collisionModelURL, QUrl(), false);
|
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);
|
// 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 <gpu/GLBackend.h>
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
#include <PhysicsEntity.h>
|
|
||||||
#include <ShapeCollider.h>
|
#include <ShapeCollider.h>
|
||||||
#include <SphereShape.h>
|
#include <SphereShape.h>
|
||||||
#include <ViewFrustum.h>
|
#include <ViewFrustum.h>
|
||||||
|
@ -34,6 +33,8 @@
|
||||||
#include "DeferredLightingEffect.h"
|
#include "DeferredLightingEffect.h"
|
||||||
#include "GlowEffect.h"
|
#include "GlowEffect.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
#include "PhysicsEntity.h"
|
||||||
|
|
||||||
|
|
||||||
#include "model_vert.h"
|
#include "model_vert.h"
|
||||||
#include "model_shadow_vert.h"
|
#include "model_shadow_vert.h"
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <GeometryUtil.h>
|
#include <GeometryUtil.h>
|
||||||
#include <gpu/Stream.h>
|
#include <gpu/Stream.h>
|
||||||
#include <gpu/Batch.h>
|
#include <gpu/Batch.h>
|
||||||
#include <PhysicsEntity.h>
|
|
||||||
#include <Transform.h>
|
#include <Transform.h>
|
||||||
|
|
||||||
#include "AnimationHandle.h"
|
#include "AnimationHandle.h"
|
||||||
|
@ -32,6 +31,7 @@
|
||||||
#include "JointState.h"
|
#include "JointState.h"
|
||||||
#include "ProgramObject.h"
|
#include "ProgramObject.h"
|
||||||
#include "TextureCache.h"
|
#include "TextureCache.h"
|
||||||
|
#include "PhysicsEntity.h"
|
||||||
|
|
||||||
class AbstractViewStateInterface;
|
class AbstractViewStateInterface;
|
||||||
class QScriptEngine;
|
class QScriptEngine;
|
||||||
|
|
Loading…
Reference in a new issue