make IKTarget::setType() a one-liner

This commit is contained in:
Andrew Meadows 2015-09-24 13:15:03 -07:00
parent 17e3e9394f
commit 59da684eb9
2 changed files with 2 additions and 7 deletions

View file

@ -141,6 +141,7 @@ QByteArray MyAvatar::toByteArray(bool cullSmallChanges, bool sendAll) {
} }
void MyAvatar::reset() { void MyAvatar::reset() {
_skeletonModel.reset();
getHead()->reset(); getHead()->reset();
_targetVelocity = glm::vec3(0.0f); _targetVelocity = glm::vec3(0.0f);

View file

@ -47,13 +47,7 @@ protected:
int rootIndex; int rootIndex;
Type type = Type::RotationAndPosition; Type type = Type::RotationAndPosition;
void setType(const QString& typeVar) { void setType(const QString& typeVar) { type = ((typeVar == "RotationOnly") ? Type::RotationOnly : Type::RotationAndPosition); }
if (typeVar == "RotationOnly") {
type = Type::RotationOnly;
} else {
type = Type::RotationAndPosition;
}
}
}; };
void computeTargets(const AnimVariantMap& animVars, std::vector<IKTarget>& targets); void computeTargets(const AnimVariantMap& animVars, std::vector<IKTarget>& targets);