Class SbLineProjector

    • Constructor Detail

      • SbLineProjector

        public SbLineProjector()
        Constructor. The default line passes through the origin and is aligned with the Y axis.
    • Method Detail

      • setStartPosition

        public void setStartPosition​(SbVec2f mousePosition)
        Sets the initial position from a mouse position.
      • project

        public SbVec3f project​(SbVec2f point)
        Applies the projector using the given point, returning the point in three dimensions that it projects to and the status. The point should be normalized from 0-1, with (0,0) at the lower-left.
        project in class SbProjector
      • setStartPosition

        public void setStartPosition​(SbVec3f point)
        Sets the initial position from a point on the projector.
      • getLine

        public SbLine getLine()
        Gets the line on which to project 2D points.
      • setLine

        public void setLine​(SbLine line)
        Sets the line on which to project 2D points.
      • getVector

        public SbVec3f getVector​(SbVec2f mousePosition)
        Gets a vector given the current mouse point. Uses the last point on this projector from the previous call to getVector() or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one.
      • getVector

        public SbVec3f getVector​(SbVec2f mousePosition1,
                                 SbVec2f mousePosition2)
        Gets a vector on this line given two normalized mouse points.