mirror of
https://github.com/overte-org/overte.git
synced 2025-07-14 14:16:34 +02:00
31 lines
No EOL
818 B
C++
31 lines
No EOL
818 B
C++
//
|
|
// Created by Sabrina Shanman 8/14/2018
|
|
// Copyright 2018 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#include "NestableTransformNode.h"
|
|
|
|
NestableTransformNode::NestableTransformNode(SpatiallyNestableWeakPointer spatiallyNestable, int jointIndex) :
|
|
_spatiallyNestable(spatiallyNestable),
|
|
_jointIndex(jointIndex)
|
|
{
|
|
}
|
|
|
|
Transform NestableTransformNode::getTransform() {
|
|
auto nestable = _spatiallyNestable.lock();
|
|
if (!nestable) {
|
|
return Transform();
|
|
}
|
|
|
|
bool success;
|
|
Transform jointWorldTransform = nestable->getTransform(_jointIndex, success, 30);
|
|
|
|
if (success) {
|
|
return jointWorldTransform;
|
|
} else {
|
|
return Transform();
|
|
}
|
|
} |