Page Summary
-
Renderableis an abstract base class for rendering objects in 3D space within Sceneform by attaching to aNode. -
It provides functionalities like setting materials, collision shapes, render priority, and shadow behavior.
-
ModelRenderableandViewRenderableare direct subclasses used for rendering 3D models and 2D Android views, respectively. -
Renderables can be customized with materials, collision shapes, and rendering order using dedicated methods.
-
This class allows developers to control how objects appear and interact within the AR scene.
| ModelRenderable | Renders a 3D Model by attaching it to a Node
with setRenderable(Renderable)
. |
| ViewRenderable | Renders a 2D Android view in 3D space by attaching it to a Node
with setRenderable(Renderable)
. |
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
Public Methods
| CollisionShape | |
| Material | |
| Material | |
| int | |
| int | |
| String | |
| boolean | |
| boolean | |
| abstract Renderable | |
| void | |
| void | |
| void | |
| void | |
| 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 |
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 CollisionShape collisionShape
Protected Constructors
protected Renderable ( Renderable other)
Parameters
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
public Material getMaterial ()
Returns the material bound to the first submesh.
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
Throws
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
public void setMaterial ( Material material)
Sets the material bound to the first submesh.
Parameters
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
public void setShadowCaster (boolean isShadowCaster)
Sets whether the renderable casts shadow on other renderables in the scene.
Parameters
public void setShadowReceiver (boolean isShadowReceiver)
Sets whether the renderable receives shadows cast by other renderables in the scene.

