|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.cult3d.world.Node | +--com.cult3d.world.CultObject
This class provides a Java representation for a Cult3D object that exists in the scene graph of the Cult3D
Designer.
Here is an example which creates an CultObject. After
creation a rotatin around the x-axis and a translation
along the y-axis is performed.
CultObject cube = new CultObject("RedCube"); cube.rotate(Node.X, 2.0); cube.translate(0.0, 1.0, 0.0, 2000);Note, methods have been moved to the parent/super class in 5.3 release to achieve a better structure.
Field Summary | |
static byte |
AA_DEFAULT
Sets the object to a none antialiased state when changing materials. |
static byte |
AA_IGNORE
The object stays in its current antialiased mode when changing materials, as opposed to AA_DEFAULT. |
Fields inherited from class com.cult3d.world.Node |
LOCAL,
WORLD,
X,
Y,
Z |
Constructor Summary | |
CultObject(java.lang.String name)
Constructs a Java representation of a Cult3D Object that exists in the scene graph of the Cult3D Designer. |
Method Summary | |
java.lang.String |
getInfo()
Returns a string representation of the values of this object. |
Material |
getMaterialAt(int index)
Gets the material at the specified index. |
int |
getMaterialCount()
Returns the number of materials assigned to this object. |
Vector3 |
getMaxVertexPosition()
Returns one position of one of the max corner of the bounding box of this object. |
Vector3 |
getMinVertexPosition()
Returns one position of one of the min corner of the bounding box of this object. |
void |
replaceTextureColor(java.awt.Color oldColor,
java.awt.Color newColor,
boolean applyToChildren)
Replaces one color in all textures of this object. |
void |
replaceTextureColor(java.awt.Color oldColor,
java.awt.Color newColor,
boolean applyToChildren,
int tolerance)
Replaces one color in all textures of this object. |
void |
replaceTextureColor(RGB oldColor,
RGB newColor,
boolean applyToChildren)
Replaces one color in all textures of this object. |
void |
replaceTextureColor(RGB oldColor,
RGB newColor,
boolean applyToChildren,
int tolerance)
Replaces one color in all textures of this object. |
void |
setInteractivityFeedbackStatus(boolean status)
Changes the feedback of the cursor when hoovering over this object. |
void |
setMaterialAt(int index,
Material material,
boolean applyToChilren,
boolean applyUniformly)
Sets the material at the specified index. |
void |
setMaterialAt(int index,
Material material,
boolean applyToChilren,
boolean applyUniformly,
byte antiAliasingMode)
Sets the material at the specified index. |
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 |
Field Detail |
public static final byte AA_DEFAULT
public static final byte AA_IGNORE
Constructor Detail |
public CultObject(java.lang.String name)
name
- The name of the object.Method Detail |
public Vector3 getMinVertexPosition()
Use getMaxVertexPosition() to obtain the position of the opposite corner of the bounding box.
getMaxVertexPosition()
public Vector3 getMaxVertexPosition()
Use getMinVertexPosition() to obtain the position of the opposite corner of the bounding box.
getMaxVertexPosition()
public void setInteractivityFeedbackStatus(boolean status)
status
- If true, the interactive cursor is used on this object. Otherwise, it's not used.public int getMaterialCount()
public Material getMaterialAt(int index)
index
- the index.setMaterialAt(int, com.cult3d.world.Material, boolean, boolean)
public void setMaterialAt(int index, Material material, boolean applyToChilren, boolean applyUniformly)
index
- the index.material
- the new Material.applyToChildren
- if true
this is applied to this objects children.applyUniformly
- if true
all Materials of this objects are set to the new material.getMaterialAt(int)
public void setMaterialAt(int index, Material material, boolean applyToChilren, boolean applyUniformly, byte antiAliasingMode)
index
- the index.material
- the new Material.applyToChildren
- if true
this is applied to this objects children.applyUniformly
- if true
all Materials of this objects are set to the new material.antiAliasingMode
- AntiAliasing behaviour. Set to AA_DEFAULT for default behavior, AA_IGNORE for Antialiasing not to care about this call.getMaterialAt(int)
public void replaceTextureColor(RGB oldColor, RGB newColor, boolean applyToChildren)
oldColor
- the old color.newColor
- the new color.applyToChildren
- if true
this is applied to this objects children.public void replaceTextureColor(java.awt.Color oldColor, java.awt.Color newColor, boolean applyToChildren)
oldColor
- the old color.newColor
- the new color.applyToChildren
- if true
this is applied to this objects children.public void replaceTextureColor(RGB oldColor, RGB newColor, boolean applyToChildren, int tolerance)
oldColor
- the old color.newColor
- the new color.applyToChildren
- if true
this is applied to this objects children.tolerance
- how tolerant should the change be.public void replaceTextureColor(java.awt.Color oldColor, java.awt.Color newColor, boolean applyToChildren, int tolerance)
oldColor
- the old color.newColor
- the new color.applyToChildren
- if true
this is applied to this objects children.tolerance
- 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.
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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |