Class Camera

java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.pose.Pose
com.marginallyclever.ro3.node.nodes.pose.poses.Camera
All Implemented Interfaces:
PoseChangeListener, EventListener

public class Camera extends Pose

The Camera class is a subclass of the Pose class and is used by a Viewport to viewport the scene in a 3D graphics or game engine. This class provides several functionalities:

  • It can be set to viewport in orthographic projection.
  • It has a vertical field of view, a near and far clipping plane for perspective rendering.
  • It can translate and rotate relative to its current orientation.
  • It can look at a specific point in the scene.
  • It can orbit around a point at a certain radius.
  • It can get the point it is orbiting around.
  • It can change the distance from itself to the orbit point.
  • It can get the distance from itself to the orbit point.
  • It can get the perspective frustum and orthographic matrix.
  • It can get the chosen projection matrix based on whether it is set to draw in orthographic or not.
  • It can get the view matrix.
  • It can build a Swing Component that represents itself.