Class RMTransform3D

java.lang.Object
com.reportmill.graphics.RMTransform3D
All Implemented Interfaces:
Cloneable

public class RMTransform3D extends Object implements Cloneable
This class represents a 3D transform.
  • Field Details

    • m

      public float[][] m
  • Constructor Details

    • RMTransform3D

      public RMTransform3D()
      Creates a transform3d with the identity matrix.
  • Method Details

    • multiply

      public RMTransform3D multiply(RMTransform3D aTransform)
      Multiplies receiver by given transform.
    • translate

      public RMTransform3D translate(float x, float y, float z)
      Translates by given x, y & z.
    • rotateX

      public RMTransform3D rotateX(float anAngle)
      Rotate x axis by given degrees.
    • rotateY

      public RMTransform3D rotateY(float anAngle)
      Rotate y axis by given degrees.
    • rotateZ

      public RMTransform3D rotateZ(float anAngle)
      Rotate z axis by given degrees.
    • rotate

      public RMTransform3D rotate(RMVector3D anAxis, float anAngle)
      Rotate about arbitrary axis.
    • rotate

      public RMTransform3D rotate(float rx, float ry, float rz)
      Rotate x,y,z with three Euler angles (same as rotateX(rx).rotateY(ry).rotateZ(rz))
    • worldAlign

      public RMTransform3D worldAlign(RMPoint3D originPt)
      Returns a matrix whose axes are aligned with the world (screen) coordinate system. All rotations & skews are removed, and perspective is replaced by uniform scaling.
    • skew

      public RMTransform3D skew(float skx, float sky)
      Skew by the given degrees.
    • perspective

      public RMTransform3D perspective(float d)
      Apply perspective transform.
    • invert

      public RMTransform3D invert()
    • transform

      public RMPoint3D transform(RMPoint3D aPoint)
      Transforms a given point (and returns it as a convenience).
    • transform

      public RMVector3D transform(RMVector3D aVector)
      Transforms a given vector (and returns it as a convenience).
    • toArray

      public float[][] toArray()
      Returns a float array for the transform.
    • fromArray

      public RMTransform3D fromArray(float[][] m2)
      Loads the transform flom a float array.
    • clone

      public Object clone()
      Overrides:
      clone in class Object