Class MoMesh
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.meshvizxlm.mapping.nodes.MoActionNode
-
- com.openinventor.meshvizxlm.mapping.nodes.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 fromMoMeshRepresentation
use this mesh. The mesh can be set explicitly using one of thesetMesh()
methods or implicitly by using theconnectFrom()
method to use the result of a previous representation.Note: Each time the current mesh geometry and/or topology are updated (see
MiTopology.getTimeStamp()
andMiGeometry.getTimeStamp()
), touch() must be called to mark the node as modified.- See Also:
MoMeshElement
,MiMesh
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description MoMesh()
Constructs a property node with no mesh defined.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
doAction(SoAction action)
MiMesh
getMesh()
Gets the mesh interface stored.MoMeshVizDataMapping.MeshType
getMeshType()
Gets the type of mesh stored.void
reset()
Resets the mesh interface tonull
(same as callingsetMesh(null)
).<Topology extends MiTopologyIj,Geometry extends MiGeometryIj>
voidsetMesh(MiSurfaceMeshCurvilinear<Topology,Geometry> mesh)
Sets the mesh interface to a curvilinear surface mesh.<Cell extends MiSurfaceCell,Topology extends MiSurfaceTopologyExplicitI<Cell>,Geometry extends MiGeometryI>
voidsetMesh(MiSurfaceMeshUnstructured<Cell,Topology,Geometry> mesh)
Sets the mesh interface to an unstructured surface mesh.<TopologyT extends MiHexahedronTopologyExplicitIjk,GeometryT extends MiGeometryI>
voidsetMesh(MiVolumeMeshHexahedronIjk<TopologyT,GeometryT> mesh)
Sets the mesh interface to an IJK Hexahedron volume mesh.<CellT extends MiVolumeCell,TopologyT extends MiVolumeTopologyExplicitI<CellT>,GeometryT extends MiGeometryI>
voidsetMesh(MiVolumeMeshUnstructured<CellT,TopologyT,GeometryT> mesh)
Sets the mesh interface to an unstructured volume mesh.<TopologyT extends MiTopologyIjk,GeometryT extends MiGeometryHexahedronIjk>
voidsetMesh(MiVolumeMeshVertexHexahedronIjk<TopologyT,GeometryT> mesh)
Sets the mesh interface to a non indexed IJK Hexahedron volume mesh.-
Methods inherited from class com.openinventor.meshvizxlm.mapping.nodes.MoActionNode
callback, distribute, getBoundingBox, getMatrix, getPrimitiveCount, getRenderEngineMode, GLRender, handleEvent, pick, rayPick
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, copy, copy, getAlternateRep, getByName, getRenderUnitID, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, isBoundingBoxIgnoring, isOverride, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
reset
public void reset()
Resets the mesh interface tonull
(same as callingsetMesh(null)
). Sets the node as modified by callingtouch()
.
-
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 callingtouch()
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()
andMiGeometry.getTimeStamp()
), it is then better to just calltouch()
instead.If the mesh must come from the output of another representation, use the
connectFrom()
method instead ofsetMesh()
.- 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 callingtouch()
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()
andMiGeometry.getTimeStamp()
), it is then better to just calltouch()
instead.If the mesh must come from the output of another representation, use the
connectFrom()
method instead ofsetMesh()
.- 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 callingtouch()
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()
andMiGeometry.getTimeStamp()
), it is then better to just calltouch()
instead.If the mesh must come from the output of another representation, use the
connectFrom()
method instead ofsetMesh()
.- 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 callingtouch()
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()
andMiGeometry.getTimeStamp()
), it is then better to just calltouch()
instead.If the mesh must come from the output of another representation, use the
connectFrom()
method instead ofsetMesh()
.- 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 callingtouch()
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()
andMiGeometry.getTimeStamp()
), it is then better to just calltouch()
instead.If the mesh must come from the output of another representation, use the
connectFrom()
method instead ofsetMesh()
.- Parameters:
mesh
- the curvilinear surface mesh
-
getMesh
public MiMesh getMesh()
Gets the mesh interface stored.- Returns:
- the mesh interface
-
getMeshType
public MoMeshVizDataMapping.MeshType getMeshType()
Gets the type of mesh stored.- Returns:
- the type of mesh
-
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.
-
-