Class WorldToCamDirection

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

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

This is the inverse of the standard camera transformation. It's used to determine how world-space objects and directions should appear relative to the camera's viewpoint. For example, this is essential for the rendering pipeline where all world objects are transformed into the camera's local coordinate system before projection.

The matrices generated by this class are the transpose (and thus the inverse) of the matrices from CamToWorldDirection. The order of multiplication is also reversed, typically becoming M = Roll * Pitch * Yaw.

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
    WorldToCamDirection(double pitch, double yaw, double roll)
    Constructs a new WorldToCamDirection transformer.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Creates an inverse rotation matrix for pitch (rotation around the X-axis).
    Creates an inverse rotation matrix for roll (rotation around the Z-axis).
    Creates an inverse 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

    • WorldToCamDirection

      public WorldToCamDirection(double pitch, double yaw, double roll)
      Constructs a new WorldToCamDirection 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