Class CamToWorldDirection

java.lang.Object
com.j3d.engine.math.rot.CamToWorldDirection
All Implemented Interfaces:
RotationMatrixDirection

public class CamToWorldDirection extends Object implements RotationMatrixDirection
Implements the RotationMatrixDirection interface to create rotation matrices that transform a direction from camera space to world space.

This is the standard transformation used to orient an object (like a camera) in the world. For example, applying these rotations to a base "forward" vector (e.g., [0, 0, 1]) will point it in the correct direction in the world scene.

The order of multiplication typically matters. For a standard Tait-Bryan rotation (yaw, pitch, roll), the combined matrix would be M = Yaw * Pitch * Roll.

Author:
Lehlogonolo Poole
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
     
    private final double
     
    private final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CamToWorldDirection(double pitch, double yaw, double roll)
    Constructs a new CamToWorldDirection transformer.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Creates a standard rotation matrix for pitch (rotation around the X-axis).
    Creates a standard rotation matrix for roll (rotation around the Z-axis).
    Creates a standard rotation matrix for yaw (rotation around the Y-axis).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pitch

      private final double pitch
    • yaw

      private final double yaw
    • roll

      private final double roll
  • Constructor Details

    • CamToWorldDirection

      public CamToWorldDirection(double pitch, double yaw, double roll)
      Constructs a new CamToWorldDirection transformer.
      Parameters:
      pitch - The pitch angle in radians (rotation around the X-axis).
      yaw - The yaw angle in radians (rotation around the Y-axis).
      roll - The roll angle in radians (rotation around the Z-axis).
  • Method Details