Package com.aspose.threed
Class Primitive
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.SceneObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Primitive
-
- All Implemented Interfaces:
IMeshConvertible
,INamedObject
public abstract class Primitive extends Entity implements IMeshConvertible
Base class for all primitives
-
-
Field Summary
-
Fields inherited from class com.aspose.threed.A3DObject
name, properties
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Mesh
createEmptyMesh()
Create an empty mesh object with inherited properties.boolean
getCastShadows()
Gets whether this geometry can cast shadowboolean
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 shadowvoid
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-
Methods inherited from class com.aspose.threed.Entity
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.SceneObject
getScene
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Constructor Detail
-
Primitive
public Primitive(java.lang.String name)
Initializes a new instance of thePrimitive
class.- Parameters:
name
- Name.
-
-
Method Detail
-
getCastShadows
public boolean getCastShadows()
Gets whether this geometry can cast shadow
-
setCastShadows
public void setCastShadows(boolean value)
Sets whether this geometry can cast shadow- Parameters:
value
- New value
-
getReceiveShadows
public boolean getReceiveShadows()
Gets whether this geometry can receive shadow.
-
setReceiveShadows
public void setReceiveShadows(boolean value)
Sets whether this geometry can receive shadow.- Parameters:
value
- New value
-
merge
protected static java.util.ArrayList<int[]> merge(Mesh mesh, Vector4[][] positions, Vector4[][] normals, Vector2[][] uvs)
Merge the specified mesh, positions, normals and uvs.- Parameters:
mesh
- Mesh.positions
- Positions.normals
- Normals.uvs
- Uvs.
-
setup
protected static void setup(Mesh mesh, Vector4[] positions, Vector4[] normals, Vector4[] uvs)
Build the mesh from given positions/normals/uvs.- Parameters:
mesh
- Mesh.positions
- Positions.normals
- Normals.uvs
- Uvs.
-
createEmptyMesh
protected Mesh createEmptyMesh()
Create an empty mesh object with inherited properties.
-
toMesh
public abstract Mesh toMesh()
Convert current object to mesh- Specified by:
toMesh
in interfaceIMeshConvertible
- Returns:
- The mesh.
-
-