Method Summary |
|
nlvm.math3d.Matrix4x4f |
getAbsoluteMatrix() Returns the scene object instance's transformation matrix as used for displaying the object on screen. |
Block |
getBlockParameter(String id) Query a block parameter from the script parameters. |
Boolean |
getBooleanParameter(String id) Query a boolean parameter from the script parameters. |
Coaster |
getCoasterParameter(String id) Query a coaster parameter from the script parameters. |
Double |
getDoubleParameter(String id) Query a double parameter from the script parameters. |
SceneObjectElement |
getElementAt(int n) Returns an element at index n |
int |
getElementCount() Returns the number of elements |
SceneObjectElement |
getElementForName(String name) Find an element for a given name, as part of this object. |
Integer |
getIntegerParameter(String id) Query an integer parameter from the script parameters. |
double |
getKeyFrameAnimationTime() Gets the current key frame animation time. |
SceneObjectLight |
getLightAt(int n) Returns a light at index n |
int |
getLightCount() Returns the number of lights |
SceneObjectLight |
getLightForName(String name) Find a light for a given name as part of this object |
nlvm.math3d.Matrix4x4f |
getMatrix() Returns the scene object instance's scale/rotation/translation as a transformation matrix |
void |
getMatrix(nlvm.math3d.Matrix4x4f m) Stores the scene object instance's scale/rotation/translation as a transformation matrix |
double |
getMaxKeyFrameAnimationTime() Returns the length of the key frame animation in seconds. |
String |
getName() Returns the name of the object, as specified inside the editor for the scene object instance. |
ResourcePath |
getResourcePathParameter(String id) Query a resource path parameter from the script parameters. |
nlvm.math3d.Vector3f |
getRotation() Returns the scene object instance's rotation as pitch/heading/banking (all values in radians) |
void |
getRotation(nlvm.math3d.Vector3f v) Returns the scene object instance's rotation as pitch/heading/banking (all values in radians) |
nlvm.math3d.Vector3f |
getScale() Returns the scene object instance's scale |
void |
getScale(nlvm.math3d.Vector3f v) Returns the scene object instance's scale |
SpecialTrack |
getSpecialTrackParameter(String id) Query a special track parameter from the script parameters. |
String |
getStringParameter(String id) Query a string parameter from the script parameters. |
TrackTrigger |
getTrackTriggerParameter(String id) Query a track trigger parameter from the script parameters. |
nlvm.math3d.Vector3f |
getTranslation() Returns the scene object instance's translation |
void |
getTranslation(nlvm.math3d.Vector3f v) Get the scene object instance's translation |
void |
setElementsVisible(bool b) Can be used to show/hide all elements |
void |
setEntityColor(int slot, nlvm.math3d.Vector4f color) Sets a specific instance wide entity color. This will affect all elements. |
void |
setEntityColor(nlvm.math3d.Vector4f color) Sets the scene object instance wide entity color at slot 0. This will affect all elements. |
void |
setEntityVideoStream(int texUnit, StreamedVideo stream) Assigns a video stream to a texture slot. |
void |
setKeyFrameAnimationTime(double t) Sets the key frame animation time. |
void |
setMatrix(nlvm.math3d.Matrix4x4f m) Sets the scene object instance's scale/rotation/translation from a transformation matrix |
void |
setRotation(float pitchRad, float headingRad, float bankingRad) Sets the scene object instance's rotation as pitch/heading/banking (all values in radians) |
void |
setRotation(nlvm.math3d.Vector3f v) Sets the scene object instance's rotation as pitch/heading/banking |
void |
setScale(float x, float y, float z) Sets the scene object instance's scale |
void |
setScale(nlvm.math3d.Vector3f v) Sets the scene object instance's scale |
void |
setTranslation(float x, float y, float z) Set the scene object instance's translation |
void |
setTranslation(nlvm.math3d.Vector3f v) Set the scene object instance's translation |
Method Detail |
public final nlvm.math3d.Matrix4x4f getAbsoluteMatrix()
Returns the scene object instance's transformation matrix as used for displaying the object on screen.
This is similiar to what getMatrix returns, but also contains the base transformation set in the SCO editor.
Returns:
Transformation matrix of the object as displayed on screen
Since:
2.0.7.3
public final Block getBlockParameter(String id)
Query a block parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a block parameter or if a coaster and block with a name that equals the parameter's value cannot be found
Since:
2.5.7.0
public final Boolean getBooleanParameter(String id)
Query a boolean parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a Boolean parameter
Since:
2.5.7.0
public final Coaster getCoasterParameter(String id)
Query a coaster parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a coaster parameter or if a coaster with the name of the parameter cannot be found
Since:
2.5.7.0
public final Double getDoubleParameter(String id)
Query a double parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a Double parameter
Since:
2.5.7.0
public final SceneObjectElement getElementAt(int n)
Returns an element at index n
An element is a sub-object or layer in a 3d model
Parameters:
n | - | must be >= 0 and < getElementCount() |
Returns:
handle to element.
public final int getElementCount()
Returns the number of elements
An element is a sub-object or layer in a 3d model
Returns:
number of elements
public final SceneObjectElement getElementForName(String name)
Find an element for a given name, as part of this object.
An element is a sub-object or layer in a 3d model
Parameters:
name | - | Name of element. Must not be null. |
Returns:
handle to element or null if not found.
public final Integer getIntegerParameter(String id)
Query an integer parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing an Integer parameter
Since:
2.5.7.0
public final double getKeyFrameAnimationTime()
Gets the current key frame animation time.
Returns:
Key frame animation time in seconds.
Since:
2.5.7.4
public final SceneObjectLight getLightAt(int n)
Returns a light at index n
Parameters:
n | - | must be >= 0 and < getLightCount() |
Returns:
handle to light
Since:
2.2.5.6
public final int getLightCount()
Returns the number of lights
Returns:
number of lights
Since:
2.2.5.6
public final SceneObjectLight getLightForName(String name)
Find a light for a given name as part of this object
Returns:
Handle to light or null if not found.
public final nlvm.math3d.Matrix4x4f getMatrix()
Returns the scene object instance's scale/rotation/translation as a transformation matrix
Returns:
Transformation matrix encoded from scale/rotation/translation
public final void getMatrix(nlvm.math3d.Matrix4x4f m)
Stores the scene object instance's scale/rotation/translation as a transformation matrix
Parameters:
m | - | Will be set to the transformation matrix as encoded from scale/rotation/translation. Must not be null. |
public final double getMaxKeyFrameAnimationTime()
Returns the length of the key frame animation in seconds.
Returns:
Length of key frame animation in seconds
Since:
2.2.0.0
public final String getName()
Returns the name of the object, as specified inside the editor for the scene object instance.
public final ResourcePath getResourcePathParameter(String id)
Query a resource path parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a ResourcePath parameter or if parameter is empty
Since:
2.5.7.0
public final nlvm.math3d.Vector3f getRotation()
Returns the scene object instance's rotation as pitch/heading/banking (all values in radians)
Returns:
Vector with returned rotations (x=pitch, y=heading, z=banking, all values in radians).
Since:
2.5.7.0
public final void getRotation(nlvm.math3d.Vector3f v)
Returns the scene object instance's rotation as pitch/heading/banking (all values in radians)
Parameters:
v | - | Vector with returned rotations (x=pitch, y=heading, z=banking, all values in radians). Must not be null. |
public final nlvm.math3d.Vector3f getScale()
Returns the scene object instance's scale
Returns:
Vector with returned scale values.
Since:
2.5.7.0
public final void getScale(nlvm.math3d.Vector3f v)
Returns the scene object instance's scale
Parameters:
v | - | Vector with returned scale values. Must not be null. |
public final SpecialTrack getSpecialTrackParameter(String id)
Query a special track parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a special track parameter or if a coaster and special track with a name that equals the parameter's value cannot be found
Since:
2.5.7.0
public final String getStringParameter(String id)
Query a string parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a String parameter
Since:
2.5.7.0
public final TrackTrigger getTrackTriggerParameter(String id)
Query a track trigger parameter from the script parameters.
The script parameters can be specified in the NL2SCO settings and can be changed in the instance panel for each instance.
Parameters:
id | - | The script parameter id as specified in the NL2SCO editor |
Returns:
returns null if id is not referencing a track trigger parameter or if a coaster and track trigger with a name that equals the parameter's value cannot be found
Since:
2.5.7.0
public final nlvm.math3d.Vector3f getTranslation()
Returns the scene object instance's translation
Returns:
Translation vector. All values in meters.
public final void getTranslation(nlvm.math3d.Vector3f v)
Get the scene object instance's translation
Parameters:
v | - | Vector with returned translation. All values in meters. Must not be null. |
public void setElementsVisible(bool b)
Can be used to show/hide all elements
Will call setVisible for all elements
Parameters:
b | - | false=hide, true=show |
Since:
2.5.7.0
public final void setEntityColor(int slot, nlvm.math3d.Vector4f color)
Sets a specific instance wide entity color. This will affect all elements.
The entity colors are custom colors that can be accessed in NL2MAT materials. They can be used for all kinds of effects. There are up to 8 colors per object.
Parameters:
slot | - | the slot index, needs to be 0..7 | |
color | - | the color (RGBA) in gamma space |
Since:
2.2.4.0
public final void setEntityColor(nlvm.math3d.Vector4f color)
Sets the scene object instance wide entity color at slot 0. This will affect all elements.
The entity colors are custom colors that can be accessed in NL2MAT materials. They can be used for all kinds of effects. There are up to 8 colors per object.
Parameters:
color | - | Vector with red, green, blue, alpha intensities (0..1). Must not be null. RGB values are in gamma-space. |
public void setEntityVideoStream(int texUnit, StreamedVideo stream)
Assigns a video stream to a texture slot.
Each scene object has 4 slots for video streams. They are mapped to the corresponding texture unit slots for NL2MATs when they make use of the video stream texture type.
Parameters:
texUnit | - | Texture unit slot 0..3 | |
stream | - | A video stream, can be null |
Since:
2.5.7.0
public final void setKeyFrameAnimationTime(double t)
Sets the key frame animation time.
Parameters:
t | - | Key frame animation time in seconds. Will be clamped to 0..getMaxKeyFrameAnimationTime(). |
Since:
2.2.0.0
public final void setMatrix(nlvm.math3d.Matrix4x4f m)
Sets the scene object instance's scale/rotation/translation from a transformation matrix
Parameters:
m | - | The matrix will be decoded and must contain scale,rotation,translation parts only (e.g. no shear, no projection). Must not be null. |
public final void setRotation(float pitchRad, float headingRad, float bankingRad)
Sets the scene object instance's rotation as pitch/heading/banking (all values in radians)
Parameters:
pitchRad | - | pitch angle in radians | |
headingRad | - | heading angle in radians | |
bankingRad | - | banking angle in radians |
public final void setRotation(nlvm.math3d.Vector3f v)
Sets the scene object instance's rotation as pitch/heading/banking
Parameters:
v | - | Vector with x=pitch, y=heading, z=banking (all values in radians). Must not be null. |
public final void setScale(float x, float y, float z)
Sets the scene object instance's scale
Parameters:
x | - | scale in x axis. Must not be 0. | |
y | - | scale in y axis. Must not be 0. | |
z | - | scale in z axis. Must not be 0. |
public final void setScale(nlvm.math3d.Vector3f v)
Sets the scene object instance's scale
Parameters:
v | - | Vector with scale values. Must not be null. Values must not 0. |
public final void setTranslation(float x, float y, float z)
Set the scene object instance's translation
All values in meters
public final void setTranslation(nlvm.math3d.Vector3f v)
Set the scene object instance's translation
All values in meters
Parameters:
v | - | the translation vector, must not be null |