mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
remove unused function
This commit is contained in:
parent
eba518cb65
commit
f8f62a4ff1
2 changed files with 0 additions and 44 deletions
|
@ -174,48 +174,6 @@ glm::vec3 SpatiallyNestable::worldToLocal(const glm::vec3& position,
|
||||||
return result.getTranslation();
|
return result.getTranslation();
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 SpatiallyNestable::worldVelocityToLocal(const glm::vec3& velocity, // can be linear or angular
|
|
||||||
const QUuid& parentID, int parentJointIndex,
|
|
||||||
bool& success) {
|
|
||||||
Transform result;
|
|
||||||
QSharedPointer<SpatialParentFinder> parentFinder = DependencyManager::get<SpatialParentFinder>();
|
|
||||||
if (!parentFinder) {
|
|
||||||
success = false;
|
|
||||||
return glm::vec3();
|
|
||||||
}
|
|
||||||
|
|
||||||
Transform parentTransform;
|
|
||||||
auto parentWP = parentFinder->find(parentID, success);
|
|
||||||
if (!success) {
|
|
||||||
return glm::vec3();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto parent = parentWP.lock();
|
|
||||||
if (!parentID.isNull() && !parent) {
|
|
||||||
success = false;
|
|
||||||
return glm::vec3();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent) {
|
|
||||||
parentTransform = parent->getTransform(parentJointIndex, success);
|
|
||||||
if (!success) {
|
|
||||||
return glm::vec3();
|
|
||||||
}
|
|
||||||
parentTransform.setScale(1.0f); // TODO: scale
|
|
||||||
}
|
|
||||||
success = true;
|
|
||||||
|
|
||||||
parentTransform.setTranslation(glm::vec3(0.0f));
|
|
||||||
|
|
||||||
Transform velocityTransform;
|
|
||||||
velocityTransform.setTranslation(velocity);
|
|
||||||
Transform myWorldTransform;
|
|
||||||
Transform::mult(myWorldTransform, parentTransform, velocityTransform);
|
|
||||||
myWorldTransform.setTranslation(velocity);
|
|
||||||
Transform::inverseMult(result, parentTransform, myWorldTransform);
|
|
||||||
return result.getTranslation();
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::quat SpatiallyNestable::worldToLocal(const glm::quat& orientation,
|
glm::quat SpatiallyNestable::worldToLocal(const glm::quat& orientation,
|
||||||
const QUuid& parentID, int parentJointIndex,
|
const QUuid& parentID, int parentJointIndex,
|
||||||
bool& success) {
|
bool& success) {
|
||||||
|
|
|
@ -46,8 +46,6 @@ public:
|
||||||
virtual void setParentJointIndex(quint16 parentJointIndex);
|
virtual void setParentJointIndex(quint16 parentJointIndex);
|
||||||
|
|
||||||
static glm::vec3 worldToLocal(const glm::vec3& position, const QUuid& parentID, int parentJointIndex, bool& success);
|
static glm::vec3 worldToLocal(const glm::vec3& position, const QUuid& parentID, int parentJointIndex, bool& success);
|
||||||
static glm::vec3 worldVelocityToLocal(const glm::vec3& position, const QUuid& parentID,
|
|
||||||
int parentJointIndex, bool& success);
|
|
||||||
static glm::quat worldToLocal(const glm::quat& orientation, const QUuid& parentID, int parentJointIndex, bool& success);
|
static glm::quat worldToLocal(const glm::quat& orientation, const QUuid& parentID, int parentJointIndex, bool& success);
|
||||||
|
|
||||||
static glm::vec3 localToWorld(const glm::vec3& position, const QUuid& parentID, int parentJointIndex, bool& success);
|
static glm::vec3 localToWorld(const glm::vec3& position, const QUuid& parentID, int parentJointIndex, bool& success);
|
||||||
|
|
Loading…
Reference in a new issue