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 intABSOLUTE_POSITIONstatic intABSOLUTE_ROTATIONstatic intABSOLUTE_SIZEprotected java.lang.Objectcolor_Color or Color binding of the primitive.protected IParsedExpressiondrawconditionThe condition deciding if the drawable should be drawn.protected booleanenableDCPosEnable DrawableCombiner positionprotected booleanenableDCRotEnable DrawableCombiner positionprotected booleanenableDCSizeEnable DrawableCombiner positionprotected java.lang.StringmaterialPath_Path to the Materialstatic intPRIMITIVE_TYPE_ARROWstatic intPRIMITIVE_TYPE_BOXstatic intPRIMITIVE_TYPE_CYLINDERstatic intPRIMITIVE_TYPE_DIRECTIONALLIGHTstatic intPRIMITIVE_TYPE_DOMEstatic intPRIMITIVE_TYPE_EFFECTstatic intPRIMITIVE_TYPE_OBJECT3Dstatic intPRIMITIVE_TYPE_POINTLIGHTstatic intPRIMITIVE_TYPE_QUADstatic intPRIMITIVE_TYPE_SKYstatic intPRIMITIVE_TYPE_SOUNDstatic intPRIMITIVE_TYPE_SPHEREstatic intPRIMITIVE_TYPE_TERRAINstatic intPRIMITIVE_TYPE_TEXT3Dstatic intPRIMITIVE_TYPE_TORUSprotected java.lang.Object[]renderinfosCached render informationstatic java.lang.StringSHADOW_CASTstatic java.lang.StringSHADOW_OFFstatic java.lang.StringSHADOW_RECEIVEprotected java.lang.StringshadowtypePrimitive shadowprotected java.lang.StringtexturePath_Path to the Textureprotected inttypePrimitive 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 voidenableAbsolutePosition(boolean enable)Enables using absolute positioning.voidenableAbsoluteRotation(boolean enable)Enables using absolute rotation.voidenableAbsoluteSize(boolean enable)Enables using absolute scaling.java.lang.ObjectgetColor()Gets the color or color binding of the drawablejava.util.ArrayList<SpatialControl>getControler()IParsedExpressiongetDrawCondition()Gets the draw condition.java.lang.StringgetMaterialPath()java.lang.StringgetShadowtype()java.lang.StringgetTexturePath()Returns the texture path.intgetType()Get the primitive type.booleanisRelativePosition()Tests if primitive is using relative positioning.booleanisRelativeRotation()Tests if primitive is using relative rotation.booleanisRelativeSize()Tests if primitive is using relative scaling.voidsetColor(java.lang.Object c)Sets a new color or binding for the drawablevoidsetControler(java.util.ArrayList<SpatialControl> controler)voidsetDrawCondition(IParsedExpression drawcondition)Sets the draw condition.voidsetMaterialPath(java.lang.String materialPath_)voidsetShadowtype(java.lang.String shadowtype)voidsetTexturePath(java.lang.String texturepath)Set the texture path.voidsetType(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
-
-