public class Primitive3d extends AbstractVisual3d
Modifier and Type | Field and Description |
---|---|
static int |
ABSOLUTE_POSITION |
static int |
ABSOLUTE_ROTATION |
static int |
ABSOLUTE_SIZE |
static int |
PRIMITIVE_TYPE_ARROW |
static int |
PRIMITIVE_TYPE_BOX |
static int |
PRIMITIVE_TYPE_CYLINDER |
static int |
PRIMITIVE_TYPE_DOME |
static int |
PRIMITIVE_TYPE_OBJECT3D |
static int |
PRIMITIVE_TYPE_SKY |
static int |
PRIMITIVE_TYPE_SOUND |
static int |
PRIMITIVE_TYPE_SPHERE |
static int |
PRIMITIVE_TYPE_TERRAIN |
static int |
PRIMITIVE_TYPE_TEXT3D |
static int |
PRIMITIVE_TYPE_TORUS |
static String |
SHADOW_CAST |
static String |
SHADOW_OFF |
static String |
SHADOW_RECEIVE |
Constructor and Description |
---|
Primitive3d() |
Primitive3d(int type) |
Primitive3d(int type,
Object position,
Object rotation,
Object size,
int absFlags,
Object c,
String texturePath,
IParsedExpression drawcondition,
String shadowtype)
Initializes the drawable.
|
Primitive3d(int type,
Object position,
Object rotation,
Object size,
Object c)
Initializes the drawable.
|
Primitive3d(int type,
Object position,
Object rotation,
Object size,
Object c,
IParsedExpression drawcondition,
String shadowtype)
Initializes the drawable.
|
Modifier and Type | Method and Description |
---|---|
void |
enableAbsolutePosition(boolean enable)
Enables using absolute positioning.
|
void |
enableAbsoluteRotation(boolean enable)
Enables using absolute rotation.
|
void |
enableAbsoluteSize(boolean enable)
Enables using absolute scaling.
|
Object |
getColor()
Gets the color or color binding of the drawable
|
IParsedExpression |
getDrawCondition()
Gets the draw condition.
|
String |
getShadowtype() |
String |
getTexturePath()
Returns the texture path.
|
int |
getType()
Get the primitive type.
|
boolean |
isRelativePosition()
Tests if primitive is using relative positioning.
|
boolean |
isRelativeRotation()
Tests if primitive is using relative rotation.
|
boolean |
isRelativeSize()
Tests if primitive is using relative scaling.
|
void |
setColor(Object c)
Sets a new color or binding for the drawable
|
void |
setDrawCondition(IParsedExpression drawcondition)
Sets the draw condition.
|
void |
setShadowtype(String shadowtype) |
void |
setTexturePath(String texturepath)
Set the texture path.
|
void |
setType(int type)
Set the primitive type.
|
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, isCreated, setCreated, setPosition, setRotation, setSize
public static final int ABSOLUTE_POSITION
public static final int ABSOLUTE_SIZE
public static final int ABSOLUTE_ROTATION
public static final int PRIMITIVE_TYPE_SPHERE
public static final int PRIMITIVE_TYPE_BOX
public static final int PRIMITIVE_TYPE_CYLINDER
public static final int PRIMITIVE_TYPE_ARROW
public static final int PRIMITIVE_TYPE_DOME
public static final int PRIMITIVE_TYPE_TORUS
public static final int PRIMITIVE_TYPE_OBJECT3D
public static final int PRIMITIVE_TYPE_TEXT3D
public static final int PRIMITIVE_TYPE_SKY
public static final int PRIMITIVE_TYPE_TERRAIN
public static final int PRIMITIVE_TYPE_SOUND
public static final String SHADOW_OFF
public static final String SHADOW_CAST
public static final String SHADOW_RECEIVE
public Primitive3d()
public Primitive3d(int type)
public Primitive3d(int type, Object position, Object rotation, Object size, Object c)
position
- position or position-bindingxrotation
- xrotation or rotation-bindingyrotation
- yrotation or rotation-bindingzrotation
- zrotation or rotation-bindingsize
- size or size-bindingc
- the drawable's color or color bindingpublic Primitive3d(int type, Object position, Object rotation, Object size, Object c, IParsedExpression drawcondition, String shadowtype)
position
- position or position-bindingxrotation
- xrotation or rotation-bindingyrotation
- yrotation or rotation-bindingzrotation
- zrotation or rotation-bindingsize
- size or size-bindingc
- the drawable's color or color bindingpublic Primitive3d(int type, Object position, Object rotation, Object size, int absFlags, Object c, String texturePath, IParsedExpression drawcondition, String shadowtype)
position
- position or position-bindingxrotation
- xrotation or rotation-bindingyrotation
- yrotation or rotation-bindingzrotation
- zrotation or rotation-bindingsize
- size or size-bindingabsFlags
- flags for setting position, size and rotation as absolutesc
- the drawable's color or color bindingpublic int getType()
public void setType(int type)
type
- The type to set.public void enableAbsolutePosition(boolean enable)
enable
- true, to use the drawable's value as an absolute.public void enableAbsoluteSize(boolean enable)
enable
- true, to use the drawable's value as an absolute.public void enableAbsoluteRotation(boolean enable)
enable
- true, to use the drawable's value as an absolute.public boolean isRelativePosition()
public boolean isRelativeSize()
public boolean isRelativeRotation()
public void setDrawCondition(IParsedExpression drawcondition)
drawcondition
- the draw conditionpublic IParsedExpression getDrawCondition()
public Object getColor()
public void setColor(Object c)
c
- new color or bindingpublic void setTexturePath(String texturepath)
public String getTexturePath()
public String getShadowtype()
public void setShadowtype(String shadowtype)
shadowtype
- the shadowtype to setCopyright © 2012. All Rights Reserved.