Examples of rotateAroundY()


Examples of net.minecraft.src.Vec3.rotateAroundY()

        //Rel is the relative coordinate in hydra reference frame
        Vec3 rel = origin.subtract(raw);
       
        //Account for hydra base station / head tracker orientation not aligned
        //After this, rel is in body coordinates (relative to head tracker reference frame, not accounting for mouse-induced world yaw offset)
        rel.rotateAroundY(baseStationYawOffset*PIOVER180);

        //Now, compute the offset from the hydra controller to the camera location. Straight from the settings (although negated -
        //vrSettings stores eye center -> hydra values for user readability. We need hydra -> eye center values here)
        float hydraXOffset = -vrSettings.getPosTrackHydraOffsetX();
        float hydraYOffset = -vrSettings.getPosTrackHydraOffsetY();
View Full Code Here

Examples of net.minecraft.src.Vec3.rotateAroundY()

        // The configured offset is for a 0,0,0 rotation head. Apply current head orientation to get final offset
        Vec3 correctionToCentreEyePosition = Vec3.createVectorHelper(hydraXOffset, hydraYOffset, hydraZOffset);

        correctionToCentreEyePosition.rotateAroundZ(rollHeadDegrees*PIOVER180);
        correctionToCentreEyePosition.rotateAroundX(pitchHeadDegrees*PIOVER180);
        correctionToCentreEyePosition.rotateAroundY(-yawHeadDegrees*PIOVER180);

        //Add the hydra position (in head tracker reference frame) to the camera offset
        //to get the camera position in head tracker reference frame
        headPos = vecAdd(rel,correctionToCentreEyePosition);

View Full Code Here

Examples of net.minecraft.src.Vec3.rotateAroundY()

        {
          //We compute the "ideal" neck model position, in head tracker reference frame
          Vec3 neckModelToCentreEyePosition = Vec3.createVectorHelper(0, vrSettings.neckBaseToEyeHeight, -vrSettings.eyeProtrusion);
          neckModelToCentreEyePosition.rotateAroundZ(rollHeadDegrees*PIOVER180);
          neckModelToCentreEyePosition.rotateAroundX(pitchHeadDegrees*PIOVER180);
          neckModelToCentreEyePosition.rotateAroundY(-yawHeadDegrees*PIOVER180);

          //The actual hydra position on the head is offset from the eye center by this amount
          Vec3 originOffset = correctionToCentreEyePosition.subtract(neckModelToCentreEyePosition);
       
          //Counteract the base station yaw to get back to absolute razer coordinates
View Full Code Here

Examples of net.minecraft.src.Vec3.rotateAroundY()

          //The actual hydra position on the head is offset from the eye center by this amount
          Vec3 originOffset = correctionToCentreEyePosition.subtract(neckModelToCentreEyePosition);
       
          //Counteract the base station yaw to get back to absolute razer coordinates
          originOffset.rotateAroundY(-baseStationYawOffset*PIOVER180);

            // save raw - originOffset as origin. That way, when origin is subtracted in the future,
          // positions very close to the current location+orientation will have the eye in the correct spot
          origin = originOffset.subtract(raw);
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.