com.cult3d.world
Class Camera

java.lang.Object
  |
  +--com.cult3d.world.Node
        |
        +--com.cult3d.world.Camera

public class Camera
extends Node

This class provides a Java representation for a Cult3D camera that exists in the scene graph of the Cult3D Designer.

Since:
Cult3D 4.0

Fields inherited from class com.cult3d.world.Node
LOCAL, WORLD, X, Y, Z
 
Constructor Summary
Camera(java.lang.String name)
          Constructs a Java representation of an existing camera in the scene graph.
 
Method Summary
 float getFarPlane()
          Returns the far plane of the active camera
 float getHorizontalFieldOfView()
          Return the horizontal field of view of the active camera
 java.lang.String getInfo()
           Returns a string representation of the values of this object.
 float getNearPlane()
          Returns the near plane of the active camera
 float getVerticalFieldOfView()
          Return the vertical field of view of the active camera.
 boolean isActive()
          Checks if the camera is active.
 void setAsActive()
          Sets this camera as the active one.
 java.lang.String toString()
           This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.
 
Methods inherited from class com.cult3d.world.Node
addChild, addChildToRoot, disconnect, equals, getChildAt, getChildCount, getFirstChild, getFirstNode, getName, getNextSibling, getOrientation, getParent, getPosition, getTransform, isBoundingBoxVisible, isVisible, nodeToWorld, rotate, rotate, rotate, rotate, rotateDegrees, rotateDegrees, rotateDegrees, rotateDegrees, setBoundingBoxVisible, setName, setOrientation, setPosition, setTransform, setVisible, setVisible, stopRotation, stopTranslation, translate, translate, translate, translate, worldToNode
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Camera

public Camera(java.lang.String name)
Constructs a Java representation of an existing camera in the scene graph. The uniqe name of the camera, as defined in the Cult3D Designer, is given as parameter. Make sure that the spelling of the name is exactly as in the Designer, including any captial letters.
Parameters:
name - The name of the camera.
Throws:
NameNotFoundException - if a camera with the given name can't be found.
Since:
Cult3D 4.0
Method Detail

setAsActive

public void setAsActive()
Sets this camera as the active one. This method deactivates the currently active camera and activates this one, so there is no need to deactivate a camera that has been activated. The active camera is the one used as the viewer when rendering the scene.
Since:
Cult3D 4.0

isActive

public boolean isActive()
Checks if the camera is active.
Returns:
true if the camera is active, false otherwise
Since:
Cult3D 5.3

getNearPlane

public float getNearPlane()
Returns the near plane of the active camera
Since:
Cult3D 5.3

getFarPlane

public float getFarPlane()
Returns the far plane of the active camera
Since:
Cult3D 5.3

getHorizontalFieldOfView

public float getHorizontalFieldOfView()
Return the horizontal field of view of the active camera
Since:
Cult3D 5.3

getVerticalFieldOfView

public float getVerticalFieldOfView()
Return the vertical field of view of the active camera.
Since:
Cult3D 5.3

getInfo

public java.lang.String getInfo()

Returns a string representation of the values of this object.

This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

Overrides:
getInfo in class Node
Returns:
A string representing this object.
Since:
Cult3D 5.3

toString

public java.lang.String toString()

This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

Overrides:
toString in class Node
Returns:
A string representing this object