com.cult3d.world
Class World

java.lang.Object
  |
  +--com.cult3d.world.World

public class World
extends java.lang.Object

This class provides a representation of a Cult3D world.
Use the methods getWorld and loadWorld to get an instance of this class

Since:
Cult3D 5.2

Method Summary
 java.lang.String getActionName(java.lang.String name)
          Returns the new name for an action.
 java.lang.String getEventName(java.lang.String name)
          Returns the new name for an event.
 java.lang.String getExpressionName(java.lang.String name)
          Returns the new name for a expression.
 java.lang.String getInfo()
           Returns a string representation of the values of this object.
 java.lang.String getMaterialName(java.lang.String name)
          Returns the new name for a material.
 java.lang.String getSceneGraphName(java.lang.String name)
          Returns the new name for a scene graph.
 java.lang.String getSoundName(java.lang.String name)
          Returns the new name for a sound.
 java.lang.String getTextureName(java.lang.String name)
          Returns the new name for a texture.
 java.lang.String getToolTipName(java.lang.String name)
          Returns the new name for a Tooltip.
static World getWorld(java.lang.String name)
          Constructs a Java representation of a Cult3D world.
 java.lang.String getWorldName(java.lang.String name)
          Returns the new name for a world.
 boolean isVisible()
          Checks if the world is hidden or not.
static World loadWorld(java.lang.String url, java.lang.String name, java.lang.String event)
          Loads a world from a given url and constructs a Java representation of the Cult3D world.
static World loadWorld(java.lang.String url, java.lang.String name, java.lang.String event, Matrix4x4 transform)
          Loads a world from a given url and constructs a Java representation of the Cult3D world.
static World loadWorld(java.lang.String url, java.lang.String name, java.lang.String event, Node node)
          Loads a world from a given url and constructs a Java representation of the Cult3D world.
static World loadWorld(java.lang.String url, java.lang.String name, java.lang.String event, Node node, Matrix4x4 transform)
          Loads a world from a given url and constructs a Java representation of the Cult3D world.
 void setVisible(boolean visible)
          Shows or hides the world.
 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.
 void unloadWorld()
          Unloads the world.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getWorld

public static World getWorld(java.lang.String name)
Constructs a Java representation of a Cult3D world.
Parameters:
name - the name of the world.
Throws:
NameNotFoundException - for an invalid name.
Since:
Cult3D 5.2

loadWorld

public static World loadWorld(java.lang.String url,
                              java.lang.String name,
                              java.lang.String event,
                              Node node,
                              Matrix4x4 transform)
Loads a world from a given url and constructs a Java representation of the Cult3D world.
Parameters:
url - URL address
name - gives the world a name witch can be retrived by getWorld(name), must be unique or it can be null if not needed.
event - event name to trigger when the world has been loaded, can be set to null if no event is needed.
node - attach to a node, set to null to attach to the root node.
transform - world transformation, can be set to null if no transformation is needed.
Since:
Cult3D 5.2

loadWorld

public static World loadWorld(java.lang.String url,
                              java.lang.String name,
                              java.lang.String event,
                              Node node)
Loads a world from a given url and constructs a Java representation of the Cult3D world.
Parameters:
url - URL address
name - gives the world a name witch can be retrived by getWorld(name), must be unique or it can be null if not needed.
event - event name to trigger when the world has been loaded, can be set to null if no event is needed.
node - attach to a node, set to null to attach to the root node.
Since:
Cult3D 5.2

loadWorld

public static World loadWorld(java.lang.String url,
                              java.lang.String name,
                              java.lang.String event,
                              Matrix4x4 transform)
Loads a world from a given url and constructs a Java representation of the Cult3D world.
Parameters:
url - URL address
name - gives the world a name witch can be retrived by getWorld(name), must be unique or it can be null if not needed.
event - event name to trigger when the world has been loaded, can be set to null if no event is needed.
transform - world transformation, can be set to null if no transformation is needed.
Since:
Cult3D 5.2

loadWorld

public static World loadWorld(java.lang.String url,
                              java.lang.String name,
                              java.lang.String event)
Loads a world from a given url and constructs a Java representation of the Cult3D world.
Parameters:
url - URL address
name - gives the world a name witch can be retrived by getWorld(name), must be unique or it can be null if not needed.
event - event name to trigger when the world has been loaded, can be set to null if no event is needed.
Since:
Cult3D 5.2

unloadWorld

public void unloadWorld()
Unloads the world.
Since:
Cult3D 5.2

setVisible

public void setVisible(boolean visible)
Shows or hides the world.
Parameters:
visible - set to true if the world should be visible, set to false if the world should be hidden.
Since:
Cult3D 5.2

isVisible

public boolean isVisible()
Checks if the world is hidden or not.
Returns:
True if the world is visible; otherwise false
Since:
Cult3D 5.2

getTextureName

public java.lang.String getTextureName(java.lang.String name)
Returns the new name for a texture. All names must be unique and if a name is already defined when loading a new world, the texture gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this texture.
Returns:
The new name for this texture.
Since:
Cult3D 5.2

getMaterialName

public java.lang.String getMaterialName(java.lang.String name)
Returns the new name for a material. All names must be unique and if a name is already defined when loading a new world, the material gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this material.
Returns:
The new name for this material.
Since:
Cult3D 5.2

getSceneGraphName

public java.lang.String getSceneGraphName(java.lang.String name)
Returns the new name for a scene graph. All names must be unique and if a name is already defined when loading a new world, the scene graph gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this scene graph.
Returns:
The new name for this scene graph.
Since:
Cult3D 5.2

getSoundName

public java.lang.String getSoundName(java.lang.String name)
Returns the new name for a sound. All names must be unique and if a name is already defined when loading a new world, the sound gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this sound.
Returns:
The new name for this sound.
Since:
Cult3D 5.2

getExpressionName

public java.lang.String getExpressionName(java.lang.String name)
Returns the new name for a expression. All names must be unique and if a name is already defined when loading a new world, the expression gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this expression.
Returns:
The new name for this expression.
Since:
Cult3D 5.2

getToolTipName

public java.lang.String getToolTipName(java.lang.String name)
Returns the new name for a Tooltip. All names must be unique and if a name is already defined when loading a new world, the tool tip gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this tooltip.
Returns:
The new name for this tooltip.
Since:
Cult3D 5.2

getEventName

public java.lang.String getEventName(java.lang.String name)
Returns the new name for an event. All names must be unique and if a name is already defined when loading a new world, the event gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this event.
Returns:
The new name for this event.
Since:
Cult3D 5.2

getActionName

public java.lang.String getActionName(java.lang.String name)
Returns the new name for an action. All names must be unique and if a name is already defined when loading a new world, the action gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this action.
Returns:
The new name for this action.
Since:
Cult3D 5.2

getWorldName

public java.lang.String getWorldName(java.lang.String name)
Returns the new name for a world. All names must be unique and if a name is already defined when loading a new world, the world gets a new unique name. Use this method to retrieve the new name.
Parameters:
name - The old name for this world
Returns:
The new name for this world
Since:
Cult3D 5.2

getInfo

public java.lang.String getInfo()

Returns a string representation of the values of this object.

The string contains the name of this class and if the world is visible.

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()

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.