Class MoMesh

  • All Implemented Interfaces:
    SafeDisposable

    public class MoMesh
    extends MoActionNode
    Property node that defines a mesh.

    This node stores the object implementing a mesh interface in the scene graph. Several types of meshes can be stored in the scene graph (see the list of setMesh() methods for more details). All mesh representation nodes derived from MoMeshRepresentation use this mesh. The mesh can be set explicitly using one of the setMesh() methods or implicitly by using the connectFrom() method to use the result of a previous representation.

    Note: Each time the current mesh geometry and/or topology are updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), touch() must be called to mark the node as modified.

    See Also:
    MoMeshElement, MiMesh
    • Constructor Detail

      • MoMesh

        public MoMesh()
        Constructs a property node with no mesh defined.
    • Method Detail

      • reset

        public void reset()
        Resets the mesh interface to null (same as calling setMesh(null)). Sets the node as modified by calling touch().
      • setMesh

        public <CellT extends MiVolumeCell,​TopologyT extends MiVolumeTopologyExplicitI<CellT>,​GeometryT extends MiGeometryI> void setMesh​(MiVolumeMeshUnstructured<CellT,​TopologyT,​GeometryT> mesh)
        Sets the mesh interface to an unstructured volume mesh. The node will automatically be marked as modified by calling touch() and all associated representations will be cleared, resulting in a full rendering of the corresponding scenegraph.

        Note: When the current mesh geometry and topology have simply been updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), it is then better to just call touch() instead.

        If the mesh must come from the output of another representation, use the connectFrom() method instead of setMesh().

        Parameters:
        mesh - the unstructured volume mesh
      • setMesh

        public <TopologyT extends MiHexahedronTopologyExplicitIjk,​GeometryT extends MiGeometryI> void setMesh​(MiVolumeMeshHexahedronIjk<TopologyT,​GeometryT> mesh)
        Sets the mesh interface to an IJK Hexahedron volume mesh. This node will automatically be marked as modified by calling touch() and all associated representations will be cleared, resulting in a full rendering of the corresponding scenegraph.

        Note: When the current mesh geometry and topology have simply been updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), it is then better to just call touch() instead.

        If the mesh must come from the output of another representation, use the connectFrom() method instead of setMesh().

        Parameters:
        mesh - the IJK Hexahedron volume mesh
      • setMesh

        public <TopologyT extends MiTopologyIjk,​GeometryT extends MiGeometryHexahedronIjk> void setMesh​(MiVolumeMeshVertexHexahedronIjk<TopologyT,​GeometryT> mesh)
        Sets the mesh interface to a non indexed IJK Hexahedron volume mesh. This node will automatically be marked as modified by calling touch() and all associated representations will be cleared, resulting in a full rendering of the corresponding scenegraph.

        Note: When the current mesh geometry and topology have simply been updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), it is then better to just call touch() instead.

        If the mesh must come from the output of another representation, use the connectFrom() method instead of setMesh().

        Parameters:
        mesh - the non indexed IJK Hexahedron volume mesh
      • setMesh

        public <Cell extends MiSurfaceCell,​Topology extends MiSurfaceTopologyExplicitI<Cell>,​Geometry extends MiGeometryI> void setMesh​(MiSurfaceMeshUnstructured<Cell,​Topology,​Geometry> mesh)
        Sets the mesh interface to an unstructured surface mesh. This node will automatically be marked as modified by calling touch() and all associated representations will be cleared, resulting in a full rendering of the corresponding scenegraph.

        Note: When the current mesh geometry and topology have simply been updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), it is then better to just call touch() instead.

        If the mesh must come from the output of another representation, use the connectFrom() method instead of setMesh().

        Parameters:
        mesh - the unstructured surface mesh
      • setMesh

        public <Topology extends MiTopologyIj,​Geometry extends MiGeometryIj> void setMesh​(MiSurfaceMeshCurvilinear<Topology,​Geometry> mesh)
        Sets the mesh interface to a curvilinear surface mesh. This node will automatically be marked as modified by calling touch() and all associated representations will be cleared, resulting in a full rendering of the corresponding scenegraph.

        Note: When the current mesh geometry and topology have simply been updated (see MiTopology.getTimeStamp() and MiGeometry.getTimeStamp() ), it is then better to just call touch() instead.

        If the mesh must come from the output of another representation, use the connectFrom() method instead of setMesh().

        Parameters:
        mesh - the curvilinear surface mesh
      • getMesh

        public MiMesh getMesh()
        Gets the mesh interface stored.
        Returns:
        the mesh interface
      • connectFrom

        public void connectFrom​(MoMeshRepresentation inputRep)
        Sets the mesh interface by giving the mesh representation node from which the input mesh will be created.
        When calling this method, the mesh is set internally each time the input mesh representation changes during traversal. This is useful when a representation must be made on top of another one such as isolines on top of an isosurface.
        Parameters:
        inputRep - input mesh representation node from which the input mesh will be created.