Known Direct Subclasses |
Base class for rendering in 3D space by attaching to a Node
with
setRenderable(Renderable)
.
Constants
int | RENDER_PRIORITY_DEFAULT | |
int | RENDER_PRIORITY_FIRST | |
int | RENDER_PRIORITY_LAST |
Fields
protected CollisionShape | collisionShape |
Protected Constructors
Renderable(Renderable other)
|
Public Methods
CollisionShape |
getCollisionShape()
Get the
CollisionShape used for collision detection with this Renderable . |
Material |
getMaterial(int submeshIndex)
Returns the material bound to the specified submesh.
|
Material |
getMaterial()
Returns the material bound to the first submesh.
|
int |
getRenderPriority()
Get the render priority that controls the order of rendering.
|
int |
getSubmeshCount()
Returns the number of submeshes that this renderable has.
|
String |
getSubmeshName(int submeshIndex)
Returns the name associated with the specified submesh.
|
boolean |
isShadowCaster()
Returns true if configured to cast shadows on other renderables.
|
boolean |
isShadowReceiver()
Returns true if configured to receive shadows cast by other renderables.
|
abstract Renderable |
makeCopy()
Creates a new instance of this Renderable.
|
void |
setCollisionShape(CollisionShape collisionShape)
Set the
CollisionShape used for collision detection with this Renderable . |
void | |
void | |
void |
setRenderPriority(int renderPriority)
Set the render priority to control the order of rendering.
|
void |
setShadowCaster(boolean isShadowCaster)
Sets whether the renderable casts shadow on other renderables in the scene.
|
void |
setShadowReceiver(boolean isShadowReceiver)
Sets whether the renderable receives shadows cast by other renderables in the scene.
|
void |
updateFromDefinition(RenderableDefinition definition)
|
Inherited Methods
Constants
public static final int RENDER_PRIORITY_DEFAULT
public static final int RENDER_PRIORITY_FIRST
public static final int RENDER_PRIORITY_LAST
Fields
Protected Constructors
Public Methods
public CollisionShape getCollisionShape ()
Get the CollisionShape
used for collision detection with this Renderable
.
public Material getMaterial (int submeshIndex)
Returns the material bound to the specified submesh.
Parameters
submeshIndex |
---|
public int getRenderPriority ()
Get the render priority that controls the order of rendering. The priority is between a range of 0 (rendered first) and 7 (rendered last). The default value is 4.
public int getSubmeshCount ()
Returns the number of submeshes that this renderable has. All Renderables have at least one.
public String getSubmeshName (int submeshIndex)
Returns the name associated with the specified submesh.
Parameters
submeshIndex |
---|
Throws
IllegalArgumentException | if the index is out of range |
---|
public boolean isShadowCaster ()
Returns true if configured to cast shadows on other renderables.
public boolean isShadowReceiver ()
Returns true if configured to receive shadows cast by other renderables.
public abstract Renderable makeCopy ()
Creates a new instance of this Renderable.
The new renderable will have unique copy of all mutable state. All materials referenced by the Renderable will also be instanced. Immutable data will be shared between the instances.
public void setCollisionShape (CollisionShape collisionShape)
Set the CollisionShape
used for collision detection with this Renderable
.
Parameters
collisionShape |
---|
public void setMaterial (Material material)
Sets the material bound to the first submesh.
Parameters
material |
---|
public void setMaterial (int submeshIndex, Material material)
Sets the material bound to the specified submesh.
Parameters
submeshIndex | |
---|---|
material |
public void setRenderPriority (int renderPriority)
Set the render priority to control the order of rendering. The priority is between a range of 0 (rendered first) and 7 (rendered last). The default value is 4.
Parameters
renderPriority |
---|
public void setShadowCaster (boolean isShadowCaster)
Sets whether the renderable casts shadow on other renderables in the scene.
Parameters
isShadowCaster |
---|
public void setShadowReceiver (boolean isShadowReceiver)
Sets whether the renderable receives shadows cast by other renderables in the scene.
Parameters
isShadowReceiver |
---|