public abstract class Primitive extends Entity implements IMeshConvertible
name, properties
Constructor and Description |
---|
Primitive(java.lang.String name)
Initializes a new instance of the
Primitive class. |
Modifier and Type | Method and Description |
---|---|
protected Mesh |
createEmptyMesh()
Create an empty mesh object with inherited properties.
|
boolean |
getCastShadows()
Gets whether this geometry can cast shadow
|
boolean |
getReceiveShadows()
Gets whether this geometry can receive shadow.
|
protected static java.util.ArrayList<int[]> |
merge(Mesh mesh,
Vector4[][] positions,
Vector4[][] normals,
Vector2[][] uvs)
Merge the specified mesh, positions, normals and uvs.
|
void |
setCastShadows(boolean value)
Sets whether this geometry can cast shadow
|
void |
setReceiveShadows(boolean value)
Sets whether this geometry can receive shadow.
|
protected static void |
setup(Mesh mesh,
Vector4[] positions,
Vector4[] normals,
Vector4[] uvs)
Build the mesh from given positions/normals/uvs.
|
abstract Mesh |
toMesh()
Convert current object to mesh
|
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Primitive(java.lang.String name)
Primitive
class.name
- Name.public boolean getCastShadows()
public void setCastShadows(boolean value)
value
- New valuepublic boolean getReceiveShadows()
public void setReceiveShadows(boolean value)
value
- New valueprotected static java.util.ArrayList<int[]> merge(Mesh mesh, Vector4[][] positions, Vector4[][] normals, Vector2[][] uvs)
mesh
- Mesh.positions
- Positions.normals
- Normals.uvs
- Uvs.protected static void setup(Mesh mesh, Vector4[] positions, Vector4[] normals, Vector4[] uvs)
mesh
- Mesh.positions
- Positions.normals
- Normals.uvs
- Uvs.protected Mesh createEmptyMesh()
public abstract Mesh toMesh()
toMesh
in interface IMeshConvertible