mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
Removed outdated and incorrect getFingerTipPosition()
This commit is contained in:
parent
45421ffb0e
commit
fc21f7bbac
4 changed files with 3 additions and 10 deletions
|
@ -60,7 +60,7 @@ BuckyBalls::BuckyBalls() {
|
||||||
|
|
||||||
void BuckyBalls::grab(PalmData& palm, float deltaTime) {
|
void BuckyBalls::grab(PalmData& palm, float deltaTime) {
|
||||||
float penetration;
|
float penetration;
|
||||||
glm::vec3 fingerTipPosition = palm.getFingerTipPosition();
|
glm::vec3 fingerTipPosition = palm.getTipPosition();
|
||||||
|
|
||||||
if (palm.getControllerButtons() & BUTTON_FWD) {
|
if (palm.getControllerButtons() & BUTTON_FWD) {
|
||||||
if (!_bballIsGrabbed[palm.getSixenseID()]) {
|
if (!_bballIsGrabbed[palm.getSixenseID()]) {
|
||||||
|
|
|
@ -145,7 +145,7 @@ void Hand::renderHandTargets(bool isMine) {
|
||||||
if (!palm.isActive()) {
|
if (!palm.isActive()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
glm::vec3 targetPosition = palm.getFingerTipPosition();
|
glm::vec3 targetPosition = palm.getTipPosition();
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef(targetPosition.x, targetPosition.y, targetPosition.z);
|
glTranslatef(targetPosition.x, targetPosition.y, targetPosition.z);
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ void Hand::renderHandTargets(bool isMine) {
|
||||||
PalmData& palm = getPalms()[i];
|
PalmData& palm = getPalms()[i];
|
||||||
if (palm.isActive()) {
|
if (palm.isActive()) {
|
||||||
glColor4f(handColor.r, handColor.g, handColor.b, alpha);
|
glColor4f(handColor.r, handColor.g, handColor.b, alpha);
|
||||||
glm::vec3 tip = palm.getFingerTipPosition();
|
glm::vec3 tip = palm.getTipPosition();
|
||||||
glm::vec3 root = palm.getPosition();
|
glm::vec3 root = palm.getPosition();
|
||||||
|
|
||||||
//Scale the positions based on avatar scale
|
//Scale the positions based on avatar scale
|
||||||
|
|
|
@ -109,12 +109,6 @@ glm::vec3 HandData::getBasePosition() const {
|
||||||
return _owningAvatarData->getPosition();
|
return _owningAvatarData->getPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 PalmData::getFingerTipPosition() const {
|
|
||||||
glm::vec3 fingerOffset(0.0f, 0.0f, 0.3f);
|
|
||||||
glm::vec3 palmOffset(0.0f, -0.08f, 0.0f);
|
|
||||||
return getPosition() + _owningHandData->localToWorldDirection(_rawRotation * (fingerOffset + palmOffset));
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::vec3 PalmData::getFingerDirection() const {
|
glm::vec3 PalmData::getFingerDirection() const {
|
||||||
const glm::vec3 LOCAL_FINGER_DIRECTION(0.0f, 0.0f, 1.0f);
|
const glm::vec3 LOCAL_FINGER_DIRECTION(0.0f, 0.0f, 1.0f);
|
||||||
return _owningHandData->localToWorldDirection(_rawRotation * LOCAL_FINGER_DIRECTION);
|
return _owningHandData->localToWorldDirection(_rawRotation * LOCAL_FINGER_DIRECTION);
|
||||||
|
|
|
@ -140,7 +140,6 @@ public:
|
||||||
void getBallHoldPosition(glm::vec3& position) const;
|
void getBallHoldPosition(glm::vec3& position) const;
|
||||||
|
|
||||||
// return world-frame:
|
// return world-frame:
|
||||||
glm::vec3 getFingerTipPosition() const;
|
|
||||||
glm::vec3 getFingerDirection() const;
|
glm::vec3 getFingerDirection() const;
|
||||||
glm::vec3 getNormal() const;
|
glm::vec3 getNormal() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue