mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
Use OUTOFBODY_HACK as searchable token
This commit is contained in:
parent
28d1faa1c0
commit
5e0c2286ec
3 changed files with 9 additions and 10 deletions
|
@ -82,7 +82,7 @@ const float MyAvatar::ZOOM_MIN = 0.5f;
|
|||
const float MyAvatar::ZOOM_MAX = 25.0f;
|
||||
const float MyAvatar::ZOOM_DEFAULT = 1.5f;
|
||||
|
||||
extern bool HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS;
|
||||
extern bool OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS;
|
||||
|
||||
MyAvatar::MyAvatar(RigPointer rig) :
|
||||
Avatar(rig),
|
||||
|
@ -839,7 +839,7 @@ void MyAvatar::setEnableDebugDrawSensorToWorldMatrix(bool isEnabled) {
|
|||
void MyAvatar::setEnableDebugDrawIKTargets(bool isEnabled) {
|
||||
_enableDebugDrawIKTargets = isEnabled;
|
||||
|
||||
HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS = isEnabled;
|
||||
OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS = isEnabled;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include "SwingTwistConstraint.h"
|
||||
#include "AnimationLogging.h"
|
||||
|
||||
bool HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS = false;
|
||||
Rig* HACKY_GLOBAL_RIG_POINTER = nullptr;
|
||||
bool OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS = false;
|
||||
Rig* OUTOFBODY_HACK_RIG_POINTER = nullptr;
|
||||
|
||||
AnimInverseKinematics::AnimInverseKinematics(const QString& id) : AnimNode(AnimNode::Type::InverseKinematics, id) {
|
||||
}
|
||||
|
@ -442,10 +442,9 @@ const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars
|
|||
computeTargets(animVars, targets, underPoses);
|
||||
}
|
||||
|
||||
// AJT: HACK
|
||||
if (HACKY_GLOBAL_ENABLE_DEBUG_DRAW_IK_TARGETS && HACKY_GLOBAL_RIG_POINTER) {
|
||||
if (OUTOFBODY_HACK_ENABLE_DEBUG_DRAW_IK_TARGETS && OUTOFBODY_HACK_RIG_POINTER) {
|
||||
const vec4 WHITE(1.0f);
|
||||
glm::mat4 geomToRigMat = HACKY_GLOBAL_RIG_POINTER->getGeometryToRigTransform();
|
||||
glm::mat4 geomToRigMat = OUTOFBODY_HACK_RIG_POINTER->getGeometryToRigTransform();
|
||||
glm::mat4 rigToAvatarMat = createMatFromQuatAndPos(Quaternions::Y_180, glm::vec3());
|
||||
|
||||
for (auto& target : targets) {
|
||||
|
|
|
@ -51,7 +51,7 @@ const glm::vec3 TRUNCATE_IK_CAPSULE_POSITION(0.0f, 0.0f, 0.0f);
|
|||
float TRUNCATE_IK_CAPSULE_LENGTH = 1000.0;
|
||||
float TRUNCATE_IK_CAPSULE_RADIUS = 0.5;
|
||||
|
||||
extern Rig* HACKY_GLOBAL_RIG_POINTER;
|
||||
extern Rig* OUTOFBODY_HACK_RIG_POINTER;
|
||||
|
||||
void Rig::overrideAnimation(const QString& url, float fps, bool loop, float firstFrame, float lastFrame) {
|
||||
|
||||
|
@ -881,7 +881,7 @@ void Rig::updateAnimations(float deltaTime, glm::mat4 rootTransform) {
|
|||
_animVars.setRigToGeometryTransform(_rigToGeometryTransform);
|
||||
|
||||
// evaluate the animation
|
||||
HACKY_GLOBAL_RIG_POINTER = this;
|
||||
OUTOFBODY_HACK_RIG_POINTER = this;
|
||||
AnimNode::Triggers triggersOut;
|
||||
_internalPoseSet._relativePoses = _animNode->evaluate(_animVars, deltaTime, triggersOut);
|
||||
if ((int)_internalPoseSet._relativePoses.size() != _animSkeleton->getNumJoints()) {
|
||||
|
@ -892,7 +892,7 @@ void Rig::updateAnimations(float deltaTime, glm::mat4 rootTransform) {
|
|||
for (auto& trigger : triggersOut) {
|
||||
_animVars.setTrigger(trigger);
|
||||
}
|
||||
HACKY_GLOBAL_RIG_POINTER = nullptr;
|
||||
OUTOFBODY_HACK_RIG_POINTER = nullptr;
|
||||
}
|
||||
|
||||
applyOverridePoses();
|
||||
|
|
Loading…
Reference in a new issue