public class Geometry extends Entity
Mesh
, NurbsSurface
, Patch
and etc.).
The Geometry
base class supports:
VertexElement
for more details.Deformer
can be bonded to animate geometry's shape.name, properties
Constructor and Description |
---|
Geometry(java.lang.String name)
Initializes a new instance of the
Geometry class. |
Modifier and Type | Method and Description |
---|---|
void |
addElement(VertexElement element)
Adds an existing vertex element to current geometry
|
VertexElement |
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 a
VertexElementUV with given texture mapping type. |
VertexElementUV |
createElementUV(TextureMapping uvMapping,
MappingMode mappingMode,
ReferenceMode referenceMode)
Creates a
VertexElementUV with given texture mapping type. |
boolean |
getCastShadows()
Gets whether this geometry can cast shadow
|
java.util.List<Vector4> |
getControlPoints()
Gets all control points
|
java.util.Collection<Deformer> |
getDeformers()
Gets all deformers associated with this geometry.
|
<T extends Deformer> |
getDeformers2()
Gets all deformers with specified deformer types
|
VertexElement |
getElement(VertexElementType type)
Gets a vertex element with specified type
|
boolean |
getReceiveShadows()
Gets whether this geometry can receive shadow.
|
VertexElementUV |
getVertexElementOfUV(TextureMapping textureMapping)
Gets a
VertexElementUV instance with given texture mapping type |
java.util.List<VertexElement> |
getVertexElements()
Gets all vertex elements
|
boolean |
getVisible()
Gets if the geometry is visible
|
void |
setCastShadows(boolean value)
Sets whether this geometry can cast shadow
|
void |
setReceiveShadows(boolean value)
Sets whether this geometry can receive shadow.
|
void |
setVisible(boolean value)
Sets if the geometry is visible
|
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Geometry(java.lang.String name)
Geometry
class.name
- Namepublic boolean getVisible()
public void setVisible(boolean value)
value
- New valuepublic java.util.Collection<Deformer> getDeformers()
public java.util.List<Vector4> getControlPoints()
public boolean getCastShadows()
public void setCastShadows(boolean value)
value
- New valuepublic boolean getReceiveShadows()
public void setReceiveShadows(boolean value)
value
- New valuepublic java.util.List<VertexElement> getVertexElements()
public VertexElement getElement(VertexElementType type)
type
- which vertex element type to findVertexElement
instance if found, otherwise null will be returned.public VertexElementUV getVertexElementOfUV(TextureMapping textureMapping)
VertexElementUV
instance with given texture mapping typetextureMapping
- public VertexElement createElement(VertexElementType type)
type
- Vertex element typepublic void addElement(VertexElement element)
element
- The vertex element to addpublic VertexElement createElement(VertexElementType type, MappingMode mappingMode, ReferenceMode referenceMode)
type
- Vertex element typemappingMode
- Default mapping modereferenceMode
- Default reference modepublic VertexElementUV createElementUV(TextureMapping uvMapping)
VertexElementUV
with given texture mapping type.uvMapping
- Which texture mapping type to createpublic VertexElementUV createElementUV(TextureMapping uvMapping, MappingMode mappingMode, ReferenceMode referenceMode)
VertexElementUV
with given texture mapping type.uvMapping
- Which texture mapping type to createmappingMode
- Default mapping modereferenceMode
- Default reference modepublic <T extends Deformer> java.util.Collection<T> getDeformers2()