|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.graphics.g3d.Renderable
public class Renderable
A renderable defines a world transform, the Mesh
to render
along with the offset into the mesh's indices and the number of indices to use plus the
primitive type to render the part of the mesh with. Finally, a renderable defines
a Material
to be applied to the mesh.
ModelBatch
, either directly, or by passing a
RenderableProvider
like ModelInstance
to the RenderBatch.
A ModelInstance returns all Renderables via its ModelInstance.getRenderables(Array, Pool)
method.
When using a ModelBatch to render a renderable, The renderable and all its values must not be changed
in between the call to ModelBatch.begin(com.badlogic.gdx.graphics.Camera)
and ModelBatch.end()
.
When the shader
member of the Renderable is set, the ShaderProvider
of the ModelBatch
may try to use that shader instead of the default shader. Therefor, to assure the default shader is used, the
shader
member must be set to null.
Field Summary | |
---|---|
Matrix4[] |
bones
the bones transformations used for skinning, or null if not applicable |
Environment |
environment
the Environment to be used to render this Renderable, may be null |
Material |
material
the Material to be applied to the mesh |
Mesh |
mesh
the Mesh to render |
int |
meshPartOffset
the offset into the mesh's indices |
int |
meshPartSize
the number of indices/vertices to use |
int |
primitiveType
the primitive type, encoded as an OpenGL constant, like GL20.GL_TRIANGLES |
Shader |
shader
the Shader to be used to render this Renderable, may be null. |
Object |
userData
user definable value. |
Matrix4 |
worldTransform
the model transform |
Constructor Summary | |
---|---|
Renderable()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Matrix4 worldTransform
public Mesh mesh
Mesh
to render
public int meshPartOffset
public int meshPartSize
public int primitiveType
GL20.GL_TRIANGLES
public Material material
Material
to be applied to the mesh
public Matrix4[] bones
public Environment environment
Environment
to be used to render this Renderable, may be null
public Shader shader
Shader
to be used to render this Renderable, may be null.
It is not guaranteed that the shader will be used, the used ShaderProvider
is responsible
for actually choosing the correct shader to use.
public Object userData
Constructor Detail |
---|
public Renderable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |