Class UserRelativityTracker

java.lang.Object
eu.svjatoslav.sixth.e3d.gui.UserRelativityTracker

public class UserRelativityTracker extends Object
Tracks the position of the user in the 3D space.

It can be used to determine the angle between the user and the object. Also, it can be used to determine the distance between the user and the object.

  • Field Details

    • center

      public Vertex center
      Points to 0, 0, 0 in object own relative space.
    • down

      public Vertex down
      Points to 0, 10, 0 in object own relative space if orientation tracking is enabled. It is used to determine the angle between the user and the object.
  • Constructor Details

    • UserRelativityTracker

      public UserRelativityTracker()
  • Method Details

    • analyze

      public void analyze(TransformsStack transformPipe, RenderingContext renderingContext)
    • enableOrientationTracking

      public void enableOrientationTracking()
      Initializes the orientation tracking. Orientation tracking is used to determine the angle between the user and the object. Orientation tracking is disabled by default and it is optional.
    • getAngleXY

      public double getAngleXY()
      Calculates the angle between the user and the object in the XY plane.
      Returns:
      the angle between the user and the object in the XY plane.
    • getAngleXZ

      public double getAngleXZ()
      Calculates the angle between the user and the object in the XZ plane.
      Returns:
      the angle between the user and the object in the XZ plane.
    • getAngleYZ

      public double getAngleYZ()
      Calculates the angle between the user and the object in the YZ plane.
      Returns:
      the angle between the user and the object in the YZ plane.
    • getDistanceToUser

      public double getDistanceToUser()
      Calculates the distance between the user and the object. Distance to the user can be used to determine object detail level.
    • proposeSliceFactor

      public double proposeSliceFactor()