Class Primitive3d
- java.lang.Object
-
- jadex.extension.envsupport.observer.graphics.drawable3d.AbstractVisual3d
-
- jadex.extension.envsupport.observer.graphics.drawable3d.Primitive3d
-
- Direct Known Subclasses:
Cylinder3d
,Dome3d
,Effect
,Object3d
,PointLight3d
,Sky3d
,Sound3d
,Terrain3d
,Text3d
,Torus3d
public class Primitive3d extends AbstractVisual3d
-
-
Field Summary
Fields Modifier and Type Field Description static int
ABSOLUTE_POSITION
static int
ABSOLUTE_ROTATION
static int
ABSOLUTE_SIZE
protected java.lang.Object
color_
Color or Color binding of the primitive.protected IParsedExpression
drawcondition
The condition deciding if the drawable should be drawn.protected boolean
enableDCPos
Enable DrawableCombiner positionprotected boolean
enableDCRot
Enable DrawableCombiner positionprotected boolean
enableDCSize
Enable DrawableCombiner positionprotected java.lang.String
materialPath_
Path to the Materialstatic int
PRIMITIVE_TYPE_ARROW
static int
PRIMITIVE_TYPE_BOX
static int
PRIMITIVE_TYPE_CYLINDER
static int
PRIMITIVE_TYPE_DIRECTIONALLIGHT
static int
PRIMITIVE_TYPE_DOME
static int
PRIMITIVE_TYPE_EFFECT
static int
PRIMITIVE_TYPE_OBJECT3D
static int
PRIMITIVE_TYPE_POINTLIGHT
static int
PRIMITIVE_TYPE_QUAD
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
protected java.lang.Object[]
renderinfos
Cached render informationstatic java.lang.String
SHADOW_CAST
static java.lang.String
SHADOW_OFF
static java.lang.String
SHADOW_RECEIVE
protected java.lang.String
shadowtype
Primitive shadowprotected java.lang.String
texturePath_
Path to the Textureprotected int
type
Primitive type
-
Constructor Summary
Constructors Constructor Description Primitive3d()
Primitive3d(int type)
Primitive3d(int type, java.lang.Object position, IParsedExpression drawcondition)
Primitive3d(int type, java.lang.Object position, java.lang.Object c, IParsedExpression drawcondition)
Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, int absFlags, java.lang.Object c, java.lang.String materialPath, java.lang.String texturePath, IParsedExpression drawcondition, java.lang.String shadowtype, java.util.ArrayList<SpatialControl> controler)
Initializes the drawable.Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, IParsedExpression drawcondition)
Initializes the drawable.Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, java.lang.Object c)
Initializes the drawable.Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, java.lang.Object c, IParsedExpression drawcondition, java.lang.String shadowtype)
Initializes the drawable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.java.lang.Object
getColor()
Gets the color or color binding of the drawablejava.util.ArrayList<SpatialControl>
getControler()
IParsedExpression
getDrawCondition()
Gets the draw condition.java.lang.String
getMaterialPath()
java.lang.String
getShadowtype()
java.lang.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(java.lang.Object c)
Sets a new color or binding for the drawablevoid
setControler(java.util.ArrayList<SpatialControl> controler)
void
setDrawCondition(IParsedExpression drawcondition)
Sets the draw condition.void
setMaterialPath(java.lang.String materialPath_)
void
setShadowtype(java.lang.String shadowtype)
void
setTexturePath(java.lang.String texturepath)
Set the texture path.void
setType(int type)
Set the primitive type.-
Methods inherited from class jadex.extension.envsupport.observer.graphics.drawable3d.AbstractVisual3d
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSize
-
-
-
-
Field Detail
-
ABSOLUTE_POSITION
public static final int ABSOLUTE_POSITION
- See Also:
- Constant Field Values
-
ABSOLUTE_SIZE
public static final int ABSOLUTE_SIZE
- See Also:
- Constant Field Values
-
ABSOLUTE_ROTATION
public static final int ABSOLUTE_ROTATION
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_SPHERE
public static final int PRIMITIVE_TYPE_SPHERE
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_BOX
public static final int PRIMITIVE_TYPE_BOX
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_CYLINDER
public static final int PRIMITIVE_TYPE_CYLINDER
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_ARROW
public static final int PRIMITIVE_TYPE_ARROW
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_DOME
public static final int PRIMITIVE_TYPE_DOME
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_TORUS
public static final int PRIMITIVE_TYPE_TORUS
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_OBJECT3D
public static final int PRIMITIVE_TYPE_OBJECT3D
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_TEXT3D
public static final int PRIMITIVE_TYPE_TEXT3D
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_SKY
public static final int PRIMITIVE_TYPE_SKY
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_TERRAIN
public static final int PRIMITIVE_TYPE_TERRAIN
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_SOUND
public static final int PRIMITIVE_TYPE_SOUND
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_POINTLIGHT
public static final int PRIMITIVE_TYPE_POINTLIGHT
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_DIRECTIONALLIGHT
public static final int PRIMITIVE_TYPE_DIRECTIONALLIGHT
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_EFFECT
public static final int PRIMITIVE_TYPE_EFFECT
- See Also:
- Constant Field Values
-
PRIMITIVE_TYPE_QUAD
public static final int PRIMITIVE_TYPE_QUAD
- See Also:
- Constant Field Values
-
SHADOW_OFF
public static final java.lang.String SHADOW_OFF
- See Also:
- Constant Field Values
-
SHADOW_CAST
public static final java.lang.String SHADOW_CAST
- See Also:
- Constant Field Values
-
SHADOW_RECEIVE
public static final java.lang.String SHADOW_RECEIVE
- See Also:
- Constant Field Values
-
enableDCPos
protected boolean enableDCPos
Enable DrawableCombiner position
-
enableDCSize
protected boolean enableDCSize
Enable DrawableCombiner position
-
enableDCRot
protected boolean enableDCRot
Enable DrawableCombiner position
-
color_
protected java.lang.Object color_
Color or Color binding of the primitive.
-
texturePath_
protected java.lang.String texturePath_
Path to the Texture
-
materialPath_
protected java.lang.String materialPath_
Path to the Material
-
drawcondition
protected IParsedExpression drawcondition
The condition deciding if the drawable should be drawn.
-
renderinfos
protected java.lang.Object[] renderinfos
Cached render information
-
type
protected int type
Primitive type
-
shadowtype
protected java.lang.String shadowtype
Primitive shadow
-
-
Constructor Detail
-
Primitive3d
public Primitive3d()
-
Primitive3d
public Primitive3d(int type)
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, IParsedExpression drawcondition)
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, java.lang.Object c, IParsedExpression drawcondition)
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, IParsedExpression drawcondition)
Initializes the drawable.- Parameters:
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 binding
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, java.lang.Object c)
Initializes the drawable.- Parameters:
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 binding
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, java.lang.Object c, IParsedExpression drawcondition, java.lang.String shadowtype)
Initializes the drawable.- Parameters:
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 binding
-
Primitive3d
public Primitive3d(int type, java.lang.Object position, java.lang.Object rotation, java.lang.Object size, int absFlags, java.lang.Object c, java.lang.String materialPath, java.lang.String texturePath, IParsedExpression drawcondition, java.lang.String shadowtype, java.util.ArrayList<SpatialControl> controler)
Initializes the drawable.- Parameters:
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 binding
-
-
Method Detail
-
getType
public int getType()
Get the primitive type.- Returns:
- The type.
-
setType
public void setType(int type)
Set the primitive type.- Parameters:
type
- The type to set.
-
enableAbsolutePosition
public void enableAbsolutePosition(boolean enable)
Enables using absolute positioning.- Parameters:
enable
- true, to use the drawable's value as an absolute.
-
enableAbsoluteSize
public void enableAbsoluteSize(boolean enable)
Enables using absolute scaling.- Parameters:
enable
- true, to use the drawable's value as an absolute.
-
enableAbsoluteRotation
public void enableAbsoluteRotation(boolean enable)
Enables using absolute rotation.- Parameters:
enable
- true, to use the drawable's value as an absolute.
-
isRelativePosition
public boolean isRelativePosition()
Tests if primitive is using relative positioning.- Returns:
- true, if the drawable's value is an absolute.
-
isRelativeSize
public boolean isRelativeSize()
Tests if primitive is using relative scaling.- Returns:
- true, if the drawable's value is an absolute.
-
isRelativeRotation
public boolean isRelativeRotation()
Tests if primitive is using relative rotation.- Returns:
- true, if the drawable's value is an absolute.
-
setDrawCondition
public void setDrawCondition(IParsedExpression drawcondition)
Sets the draw condition.- Parameters:
drawcondition
- the draw condition
-
getDrawCondition
public IParsedExpression getDrawCondition()
Gets the draw condition.- Returns:
- the draw condition
-
getColor
public java.lang.Object getColor()
Gets the color or color binding of the drawable- Returns:
- color or color binding of the drawable
-
setColor
public void setColor(java.lang.Object c)
Sets a new color or binding for the drawable- Parameters:
c
- new color or binding
-
setTexturePath
public void setTexturePath(java.lang.String texturepath)
Set the texture path.
-
getTexturePath
public java.lang.String getTexturePath()
Returns the texture path.- Returns:
- The texture path.
-
getShadowtype
public java.lang.String getShadowtype()
- Returns:
- the shadowtype
-
setShadowtype
public void setShadowtype(java.lang.String shadowtype)
- Parameters:
shadowtype
- the shadowtype to set
-
getMaterialPath
public java.lang.String getMaterialPath()
-
setMaterialPath
public void setMaterialPath(java.lang.String materialPath_)
-
getControler
public java.util.ArrayList<SpatialControl> getControler()
- Returns:
- the controler
-
setControler
public void setControler(java.util.ArrayList<SpatialControl> controler)
- Parameters:
controler
- the controler to set
-
-