com.cult3d.device
Class CultWindow

java.lang.Object
  |
  +--com.cult3d.device.CultWindow

public class CultWindow
extends java.lang.Object

This class represents the window where the Cult3D scene is hosted.
Use the method getReference to get an instance of this class.

Since:
Cult3D 5.3

Method Summary
 java.awt.Dimension getCultWindowDimension()
          Get the curren size of the window hosting the Cult3D scene.
 java.lang.String getInfo()
          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.
 Node getNodeAtCoordinate(int x, int y)
          This method returns the topmost Node at the given screen coordinate, or null if there is none.
static CultWindow getReference()
          Use this method to get an reference to a Cult3D Viewer window
 java.lang.String toString()
           Returns a string representation of the values of this object.
 java.awt.Point worldToWindow(float x, float y, float z)
          Converts a world coordinate to a coordinate relative Cult3D Viewer window
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getReference

public static CultWindow getReference()
Use this method to get an reference to a Cult3D Viewer window
Since:
Cult3D 5.3

getCultWindowDimension

public java.awt.Dimension getCultWindowDimension()
Get the curren size of the window hosting the Cult3D scene.
Returns:
The current dimension of the Cult3D window
Since:
Cult3D 5.3

getNodeAtCoordinate

public Node getNodeAtCoordinate(int x,
                                int y)
This method returns the topmost Node at the given screen coordinate, or null if there is none.
Parameters:
x - The x component of the coordindate relative to topleft corner of the Cult3D Viewer window.
y - x The y component of the coordindate relative to topleft corner of the Cult3D Viewer window.
Returns:
If there is a node under the given X,Y coordinate return the node, else return null.
Since:
Cult3D 5.3
See Also:
MouseDevice.getMouseOverNode()

worldToWindow

public java.awt.Point worldToWindow(float x,
                                    float y,
                                    float z)
Converts a world coordinate to a coordinate relative Cult3D Viewer window
Returns:
A com.cult3d.Math.Vector3 with the converted coordinates
Since:
Cult3D 5.3

getInfo

public java.lang.String getInfo()
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.
Returns:
A string representing this object.
Since:
Cult3D 5.3

toString

public java.lang.String toString()

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:
toString in class java.lang.Object
Returns:
A string representing this object.
Since:
Cult3D 5.3