com.aspose.threed

Interfaces

Classes

Enums

Exceptions

Class Geometry

  • Direct Known Subclasses:
    Line, Mesh, NurbsCurve, NurbsSurface, Patch, Shape


    public class Geometry
    extends Entity
    The base class of all renderable geometric objects (like Mesh, 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.
    • Constructor Detail

      • Geometry

        public Geometry(String name)
        Initializes a new instance of the Geometry 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 class Entity
      • 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 Collection<Deformer> getDeformers()
        Gets all deformers assocated with this geometry.
      • getControlPoints

        public 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 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 a VertexElementUV 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 type
        mappingMode - Default mapping mode
        referenceMode - Default reference mode
        Returns:
        Created element.
      • createElementUV

        public VertexElementUV createElementUV(TextureMapping uvMapping)
        Creates a VertexElementUV 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 a VertexElementUV with given texture mapping type.
        Parameters:
        uvMapping - Which texture mapping type to create
        mappingMode - Default mapping mode
        referenceMode - Default reference mode
        Returns:
        Created element uv
      • getDeformers2

        public <T extends DeformerCollection<T> getDeformers2()
        Gets all deformers with specified deformer types
        Returns:
        Deformer collection