Package com.aspose.threed
Class Geometry
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.SceneObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Geometry
-
- All Implemented Interfaces:
INamedObject
- Direct Known Subclasses:
Mesh
,NurbsSurface
,Patch
,PointCloud
,Shape
public class Geometry extends Entity
The base class of all renderable geometric objects (likeMesh
,NurbsSurface
,Patch
and etc.).The
Geometry
base class supports:- Control point management, control points defines the base 3D spatial structure of the geometry, different geometric types has different way to define concrete 3D models.
- Vertex element definition, vertex elements applies extra information like normals/uv coordinates/vertex colors to the geometry, see
VertexElement
for more details. - Object deforming,
Deformer
can be bonded to animate geometry's shape.
-
-
Field Summary
-
Fields inherited from class com.aspose.threed.A3DObject
name, properties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(VertexElement element)
Adds an existing vertex element to current geometryVertexElement
createElement(VertexElementType type)
Creates a vertex element with specified type and add it to the geometry.VertexElement
createElement(VertexElementType type, MappingMode mappingMode, ReferenceMode referenceMode)
Creates a vertex element with specified type and add it to the geometry.VertexElementUV
createElementUV(TextureMapping uvMapping)
Creates aVertexElementUV
with given texture mapping type.VertexElementUV
createElementUV(TextureMapping uvMapping, MappingMode mappingMode, ReferenceMode referenceMode)
Creates aVertexElementUV
with given texture mapping type.boolean
getCastShadows()
Gets whether this geometry can cast shadowjava.util.List<Vector4>
getControlPoints()
Gets all control pointsjava.util.Collection<Deformer>
getDeformers()
Gets all deformers associated with this geometry.<T extends Deformer>
java.util.Collection<T>getDeformers2()
Gets all deformers with specified deformer typesVertexElement
getElement(VertexElementType type)
Gets a vertex element with specified typeboolean
getReceiveShadows()
Gets whether this geometry can receive shadow.VertexElementUV
getVertexElementOfUV(TextureMapping textureMapping)
Gets aVertexElementUV
instance with given texture mapping typejava.util.List<VertexElement>
getVertexElements()
Gets all vertex elementsboolean
getVisible()
Gets if the geometry is visiblevoid
setCastShadows(boolean value)
Sets whether this geometry can cast shadowvoid
setReceiveShadows(boolean value)
Sets whether this geometry can receive shadow.void
setVisible(boolean value)
Sets if the geometry is visible-
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
-
Geometry
public Geometry(java.lang.String name)
Initializes a new instance of theGeometry
class.- Parameters:
name
- Name
-
-
Method Detail
-
getVisible
public boolean getVisible()
Gets if the geometry is visible
-
setVisible
public void setVisible(boolean value)
Sets if the geometry is visible- Parameters:
value
- New value
-
getDeformers
public java.util.Collection<Deformer> getDeformers()
Gets all deformers associated with this geometry.
-
getControlPoints
public java.util.List<Vector4> getControlPoints()
Gets all control points
-
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
-
getVertexElements
public java.util.List<VertexElement> getVertexElements()
Gets all vertex elements
-
getElement
public VertexElement getElement(VertexElementType type)
Gets a vertex element with specified type- Parameters:
type
- which vertex element type to find- Returns:
VertexElement
instance if found, otherwise null will be returned.
-
getVertexElementOfUV
public VertexElementUV getVertexElementOfUV(TextureMapping textureMapping)
Gets aVertexElementUV
instance with given texture mapping type- Parameters:
textureMapping
-- Returns:
- VertexElementUV with the texture mapping type
-
createElement
public VertexElement createElement(VertexElementType type)
Creates a vertex element with specified type and add it to the geometry.- Parameters:
type
- Vertex element type- Returns:
- Created element.
-
addElement
public void addElement(VertexElement element)
Adds an existing vertex element to current geometry- Parameters:
element
- The vertex element to add
-
createElement
public VertexElement createElement(VertexElementType type, MappingMode mappingMode, ReferenceMode referenceMode)
Creates a vertex element with specified type and add it to the geometry.- Parameters:
type
- Vertex element typemappingMode
- Default mapping modereferenceMode
- Default reference mode- Returns:
- Created element.
-
createElementUV
public VertexElementUV createElementUV(TextureMapping uvMapping)
Creates aVertexElementUV
with given texture mapping type.- Parameters:
uvMapping
- Which texture mapping type to create- Returns:
- Created element uv
-
createElementUV
public VertexElementUV createElementUV(TextureMapping uvMapping, MappingMode mappingMode, ReferenceMode referenceMode)
Creates aVertexElementUV
with given texture mapping type.- Parameters:
uvMapping
- Which texture mapping type to createmappingMode
- Default mapping modereferenceMode
- Default reference mode- Returns:
- Created element uv
-
getDeformers2
public <T extends Deformer> java.util.Collection<T> getDeformers2()
Gets all deformers with specified deformer types- Returns:
- Deformer collection
-
-