Package com.aspose.threed
Class Geometry
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.Geometry
-
- Direct Known Subclasses:
Line
,Mesh
,NurbsCurve
,NurbsSurface
,Patch
,Shape
public class Geometry extends Entity
The base class of all renderable geometric objects (likeMesh
,NurbsSurface
,Patch
and etcs).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 informations like normals/uv coordinates/vertex colors to the geometry, see
VertexElement
for more details. - Object deforming,
Deformer
can be binded to animate geometry's shape.
-
-
Method Summary
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.BoundingBox
getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.boolean
getCastShadows()
Gets wheather this geometry can cast shadowjava.util.List<Vector4>
getControlPoints()
Gets all control pointsjava.util.Collection<Deformer>
getDeformers()
Gets all deformers assocated 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 wheather 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 wheather this geometry can cast shadowvoid
setReceiveShadows(boolean value)
Sets wheather this geometry can receive shadow.void
setVisible(boolean value)
Sets if the geometry is visible-
Methods inherited from class com.aspose.threed.Entity
createRenderableResource, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, 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
-
getBoundingBox
public BoundingBox getBoundingBox()
Gets the bounding box of current entity in its object space coordinate system.- Overrides:
getBoundingBox
in classEntity
-
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 assocated with this geometry.
-
getControlPoints
public java.util.List<Vector4> getControlPoints()
Gets all control points
-
getCastShadows
public boolean getCastShadows()
Gets wheather this geometry can cast shadow
-
setCastShadows
public void setCastShadows(boolean value)
Sets wheather this geometry can cast shadow- Parameters:
value
- New value
-
getReceiveShadows
public boolean getReceiveShadows()
Gets wheather this geometry can receive shadow.
-
setReceiveShadows
public void setReceiveShadows(boolean value)
Sets wheather 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
-
-