Class Rotate

  • All Implemented Interfaces:
    Transformer

    public class Rotate
    extends Object
    implements Transformer
    Rotate is a Transformer that stores the angle and rotate values required to perform the effective OpenGL rotation in the ModelView matrix.
    Author:
    Martin Pernollet
    • Constructor Detail

      • Rotate

        public Rotate​(float angle,
                      Coord3d rotate)
        Initialize a Rotation of angle degrees around the vector (x,y,z)
        Parameters:
        angle -
        rotate -
      • Rotate

        public Rotate​(double angle,
                      Coord3d rotate)
    • Method Detail

      • execute

        public void execute​(IPainter painter)
        produces a rotation of angle degrees around the vector (𝑥,𝑦,𝑧)
        Specified by:
        execute in interface Transformer
        Parameters:
        painter - TODO
      • compute

        public Coord3d compute​(Coord3d input)
        Description copied from interface: Transformer
        Apply the transformations to the input coordinates. Computation is performed by CPU.
        Specified by:
        compute in interface Transformer
      • getAngle

        public float getAngle()
      • setAngle

        public void setAngle​(float angle)
      • getRotate

        public Coord3d getRotate()
      • setRotate

        public void setRotate​(Coord3d rotate)