History

Merge pull request #8 from AndrewMeadows/cadmium

remove unused legacy Shapes from Model and friends

Howard Stearns committed 11 years ago

Commit ef52c072 parents 8196770 81831979 files · +35 −286Browse files

Showing the changes to libraries/render-utils/src/Model.cpp (1 of 9 files). Show all

Unified · Split

libraries/render-utils/src/Model.cpp+0−24
@@ -23,8 +23,6 @@ · 22 unmodified lines
2323 #include <PathUtils.h>
2424 #include <PerfStat.h>
2525 #include "PhysicsEntity.h"
26−#include <ShapeCollider.h>
27−#include <SphereShape.h>
2826 #include <ViewFrustum.h>
2927
3028 #include "AbstractViewStateInterface.h"
@@ -223,10 +221,6 @@ void Model::setScaleInternal(const glm::vec3& scale) { · 192 unmodified lines
223221 if (relativeDeltaScale > ONE_PERCENT || scaleLength < EPSILON) {
224222 _scale = scale;
225223 initJointTransforms();
226− if (_shapes.size() > 0) {
227− clearShapes();
228− buildShapes();
229− }
230224 }
231225 }
232226
@@ -1169,15 +1163,6 @@ QStringList Model::getJointNames() const { · 936 unmodified lines
11691163 return isActive() ? _geometry->getFBXGeometry().getJointNames() : QStringList();
11701164 }
11711165
1172−// virtual override from PhysicsEntity
1173−void Model::buildShapes() {
1174− // TODO: figure out how to load/build collision shapes for general models
1175−}
1176−
1177−void Model::updateShapePositions() {
1178− // TODO: implement this when we know how to build shapes for regular Models
1179−}
1180−
11811166 class Blender : public QRunnable {
11821167 public:
11831168
@@ -1348,8 +1333,6 @@ void Model::simulateInternal(float deltaTime, const glm::vec3& worldPosition, co · 164 unmodified lines
13481333 glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset;
13491334 _rig->simulateInternal(deltaTime, parentTransform, worldPosition, worldVelocity, worldRotation);
13501335
1351− _shapesAreDirty = !_shapes.isEmpty();
1352−
13531336 glm::mat4 modelToWorld = glm::mat4_cast(_rotation);
13541337 for (int i = 0; i < _meshStates.size(); i++) {
13551338 MeshState& state = _meshStates[i];
@@ -1389,7 +1372,6 @@ bool Model::setJointPosition(int jointIndex, const glm::vec3& position, const gl · 33 unmodified lines
13891372 glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset;
13901373 if (_rig->setJointPosition(jointIndex, position, rotation, useRotation,
13911374 lastFreeIndex, allIntermediatesFree, alignment, priority, freeLineage, parentTransform)) {
1392− _shapesAreDirty = !_shapes.isEmpty();
13931375 return true;
13941376 }
13951377 return false;
@@ -1400,7 +1382,6 @@ void Model::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm: · 4 unmodified lines
14001382 const QVector<int>& freeLineage = geometry.joints.at(endIndex).freeLineage;
14011383 glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset;
14021384 _rig->inverseKinematics(endIndex, targetPosition, targetRotation, priority, freeLineage, parentTransform);
1403− _shapesAreDirty = !_shapes.isEmpty();
14041385 }
14051386
14061387 bool Model::restoreJointPosition(int jointIndex, float fraction, float priority) {
@@ -1415,10 +1396,6 @@ float Model::getLimbLength(int jointIndex) const { · 8 unmodified lines
14151396 return _rig->getLimbLength(jointIndex, freeLineage, _scale, geometry.joints);
14161397 }
14171398
1418−void Model::renderJointCollisionShapes(float alpha) {
1419− // implement this when we have shapes for regular models
1420−}
1421−
14221399 bool Model::maybeStartBlender() {
14231400 const FBXGeometry& fbxGeometry = _geometry->getFBXGeometry();
14241401 if (fbxGeometry.hasBlendedMeshes()) {
@@ -1484,7 +1461,6 @@ void Model::deleteGeometry() { · 59 unmodified lines
14841461 _blendedVertexBuffers.clear();
14851462 _rig->clearJointStates();
14861463 _meshStates.clear();
1487− clearShapes();
14881464
14891465 _rig->deleteAnimations();
14901466