Class Engine3D

  • All Implemented Interfaces:
    IConstants

    public final class Engine3D
    extends java.lang.Object
    implements IConstants
    Engine3D
    • Field Detail

      • OUT_OF_RANGE_NONE

        public static final byte OUT_OF_RANGE_NONE
        Indicates the both points are in range in clipping.
        See Also:
        Constant Field Values
      • OUT_OF_RANGE_END

        public static final byte OUT_OF_RANGE_END
        Indicates the ending point is out of range in clipping.
        See Also:
        Constant Field Values
      • OUT_OF_RANGE_START

        public static final byte OUT_OF_RANGE_START
        Indicates the starting point is out of range in clipping.
        See Also:
        Constant Field Values
      • OUT_OF_RANGE_BOTH

        public static final byte OUT_OF_RANGE_BOTH
        Indicates the both points are out of range in clipping.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Engine3D

        public Engine3D​(Rotation3D rotation,
                        Vector lightDirection,
                        double viewerWidth,
                        double viewerHeight,
                        double viewingDistance,
                        double modelingDistance,
                        double hitherDistance,
                        double yonDistance,
                        double perspectiveDistance)
        Parameters:
        rotation -
        lightDirection -
        viewerWidth -
        viewerHeight -
        viewingDistance -
        hitherDistance -
        yonDistance -
      • Engine3D

        public Engine3D​(Rotation3D rotation,
                        Vector lightDirection,
                        double viewerWidth,
                        double viewerHeight)
        Parameters:
        rotation -
        lightDirection -
        viewerWidth -
        viewerHeight -
    • Method Detail

      • reset

        public void reset()
        Resets the engine to default state.
      • translate

        public void translate​(Vector v)
        Translates the view frame.
        Parameters:
        v -
      • checkClipping

        public byte checkClipping​(Vector start,
                                  Vector end)
        Clipping the lines according to viewing volumn.
        Parameters:
        start -
        end -
        Returns:
      • processEvent

        public java.util.List processEvent​(java.util.List renderingEvents,
                                           double xOffset,
                                           double yOffset)
        Transforms 3D polygons and sort their rendering order, and antialias.
        Parameters:
        renderingEvents -
        xOffset -
        yOffset -
        Returns:
      • processEvent

        public java.util.List processEvent​(java.util.List renderingEvents,
                                           double xOffset,
                                           double yOffset,
                                           boolean antialiasing)
        Transforms 3D polygons and sort their rendering order, and antialias.
        Parameters:
        renderingEvents -
        xOffset -
        yOffset -
        antialiasing -
        Returns:
      • getViewReferencePoint

        public Vector getViewReferencePoint()
      • getObjectFromEvent

        public static Object3D getObjectFromEvent​(java.lang.Object event)
      • getParentObject

        public static Object3D getParentObject​(java.lang.Object event)
        Parameters:
        event -
        Returns:
      • getObjectFromEvent

        public static Object3D getObjectFromEvent​(java.lang.Object event,
                                                  boolean bParent)