From 499150bbed02387aa881002116ea137440bc960a Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 15 Jul 2016 15:56:52 -0700 Subject: [PATCH] finish hook alert for new entity collision shape --- libraries/entities-renderer/src/RenderableModelEntityItem.cpp | 4 ++++ libraries/entities-renderer/src/RenderableModelEntityItem.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index ac447417aa..2ff5e236fc 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -917,6 +917,10 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) { } } +void RenderableModelEntityItem::setCollisionShape(const btCollisionShape* shape) { + // TODO: generate collision mesh and update _model +} + bool RenderableModelEntityItem::contains(const glm::vec3& point) const { if (EntityItem::contains(point) && _model && _model->isCollisionLoaded()) { return _model->getCollisionFBXGeometry().convexHullContains(worldToEntity(point)); diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.h b/libraries/entities-renderer/src/RenderableModelEntityItem.h index 22469cf0ef..412cb6f296 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.h +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.h @@ -61,7 +61,7 @@ public: virtual bool isReadyToComputeShape() override; virtual void computeShapeInfo(ShapeInfo& info) override; - void setCollisionShape(const btCollisionShape* shape) override {} + void setCollisionShape(const btCollisionShape* shape) override; virtual bool contains(const glm::vec3& point) const override;