Class PoMesh
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
PoBaseStreamLine,PoCellShape,PoMesh2D,PoMesh3D,PoMeshProbePoint
If the method setMesh(mesh) is called with "mesh" derived from PbMesh, the current mesh is "mesh". Otherwise the current mesh has a type derived from PoMeshProperty and is inherited during the traversal. If the setMesh method is not called and if there is not any node PoMeshProperty before the PoMesh node in the scene graph, the representation is empty.
If the method setDataMapping(data_mapping) is called with "data_mapping" derived from PbDataMapping, the current data mapping is "data_mapping". Otherwise the current data-mapping has a type derived from PoDataMapping and is inherited during the traversal. The current data-mapping is not used if coloringType == COLOR_INHERITED, or if valuesIndex is not defined (i.e. < 0), or if the set of values refered by valuesIndex does not exist in the current mesh. If there is no current data-mapping (i.e setDataMapping not called and no PoDataMapping node before in the scene graph), the inherited color is used for part of the representation.
If the method setModuleDataMapping(mod_data_mapping) is called with "mod_data_mapping" derived from PbDataMapping, the current module data mapping is "mod_data_mapping". Otherwise if the field moduleDataMapping contains a node of a type derived from PoDataMapping, the current module data-mapping is defined by this nod. Otherwise the current module data-mapping has a type derived from PoDataMapping and is inherited during the traversal. The current module data mapping is used by PoMesh2DVec and PoMesh3DVec class.
If the setIsovaluesList(isovalues_list) is called with "isovalues_list" derived from PbIsovaluesList, the current isovalues list is "isovalues_list".Otherwise the current isovalues list has a type PoIsovaluesList and is inherited during the traversal. If the current isovalues list does not exist (i.e. setIsovaluesList not called and no PoIsovaluesList before in the scene graph), the PoMeshContouring make an empty representation, and the other representation classes work like if coloringType was equal COLOR_MAPPING.
See PoBase for definition of the current domain.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFEnum<PoMesh.ColoringTypes> Defines the type of method used to color each mesh element, mesh edge or mesh contour line of a representation.final SoSFFloatIndicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.final SoSFNodeField used to do coloring according the module of the vectors.final SoSFBoolIf set to true and combined with COLOR_TEXTURE_CONTOURING coloring type, the texture used for coloring appears smoothed, since a linear interpolation is used instead of a nearest one.final SoSFInt32Defines the index of the set of values for the coloring.final SoSFInt32Specifies the index of the set of values used to filter cells for this mesh representation.final SoSFInt32Defines the index of the set of vectors for all representations which need a vector at each mesh node (PoBaseStreamLine,PoMesh2DVec,PoMesh3DVec,...)Fields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoringFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Method Summary
Modifier and TypeMethodDescriptionstatic SoNodekitCatalogReturns theSoNodekitCatalogfor this class.Returns the currentPbDataMappingobject.Returns the currentPbIsovaluesListobject.getMesh()Gets the currentPbMeshobject.Returns the currentPbDataMappingobject for the association color-vectors module.voidsetDataMapping(PbDataMapping data_mapping) Sets a reference to aPbDataMappingobject for the association color-value.voidsetIsovaluesList(PbIsovaluesList isovalues_list) Sets a reference to aPbIsovaluesListobject to define a list of isovalues.voidSets a reference to aPbMeshobject.voidsetModuleDataMapping(PbDataMapping mod_data_mapping) Sets a reference to aPbDataMappingobject for the association color-vectors module.Methods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKitMethods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildrenMethods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
valuesIndex
Defines the index of the set of values for the coloring. If valuesIndex = -1, (the valuesIndex is called undefined) a mesh representation is colored with only one color which is inherited. If valuesIndex >= 0, the representation is colored relating to each node value, and relating to the coloring method defined by the field coloringType. -
valuesIndexForCellFilter
Specifies the index of the set of values used to filter cells for this mesh representation. The value of the cell is checked as follows:If
PoCellFilter.acceptCell(id,(getMesh()->getValuesSet(valuesIndexForCellFilter))[id]) returns false, the cell is not taken into account by this representation. (id is the index of the cell to be checked.)Warning: The values of the selected data set must be located at cells (see PoMeshProperty.addValuesSet(int,DataBinding,float *), use DataBinding.PER_CELL).
-
vecsIndex
Defines the index of the set of vectors for all representations which need a vector at each mesh node (PoBaseStreamLine,PoMesh2DVec,PoMesh3DVec,...) -
coloringType
Defines the type of method used to color each mesh element, mesh edge or mesh contour line of a representation.COLOR_INHERITED: Each element of a mesh representation is colored with the same inherited color, even if valuesIndex field is defined (valuesIndex >= 0).COLOR_AVERAGE: Each edge of a wireframe representation of the mesh (classesPoMeshLimit,PoMeshLines) is colored by a single color defined by the average value of its extremities mapped on aPbDataMappingobject. Each element of a solid surface representation of the mesh (classesPoMeshSides,PoMeshFilled) is colored by a single color defined by the average value of its nodes mapped on aPbDataMappingobject. However, an inherited coloring is done if the field valuesIndex is not defined or if there is no set of values of which the index is valuesIndex.COLOR_MAPPING: Each mesh edge or mesh element of a representation is colored by using the "data mapping" method defined by aPbDataMappingobject. ThePbDataMappingobject defines how the mesh values (referenced by valuesIndex field) are transformed into colors. However, an inherited coloring is done if the valuesIndex field is not defined or if there is no set of values of which index is valuesIndex.COLOR_CONTOURING: Each mesh edge of a wireframe representation is colored relating to both of its extremity values v1 and v2, to the isovalues between v1 and v2, and to thePbDataMappingobject which defines the color associated to these values. If some isovalues of thePbIsovaluesListobject exist between v1 and v2, the edge is cut into several segments. Each segment is colored with a single color. Each mesh element of a filled representation is colored relating to its node values, to the isovalues between these values, and to thePbDataMappingobject which defines the color associated to these values. If some isovalues of thePbIsovaluesListobject exist between these values, the element is cut up into several small surfaces. Each small surface is colored with a single color. The boundary between 2 small surfaces is part of a contour line. However, an inherited coloring is done if the valuesIndex field is not defined or if there is no set of values of which the index is valuesIndex.COLOR_TEXTURE_CONTOURING: Same asCOLOR_CONTOURINGbut a texture is used for creating contours. This method dramatically decreases the amount of generated geometry and speeds up the computation time of filled representations relative to theCOLOR_CONTOURINGmethod. This mode should be used for all animations.The catalog part appearance.texture2 contains the contour texture and the catalog part appearance.complexity.textureQuality is set to 0.1f to activate nearest (as opposed to linear) texture filtering.
This method should not be used for wireframe representations because texturing is not active in wireframe. Also, you may see some slight differences compared to
COLOR_CONTOURINGfor meshes with few cells. Shapes or cells that contain an undefined value will not be discarded. For example, cells that are more transparent than the value specified byPoDataMapping.transparencyValueDeletedPartswill not be discarded when using this mode. -
moduleDataMapping
Field used to do coloring according the module of the vectors. It is used only if setModuleDataMapping is not called and if the field contains a node derived fromPoDataMapping. -
smoothTextureContouring
If set to true and combined with COLOR_TEXTURE_CONTOURING coloring type, the texture used for coloring appears smoothed, since a linear interpolation is used instead of a nearest one.- Since:
- Open Inventor 8.1
-
creaseAngle
Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used. Default is 0. Default in Open Inventor 5.0 and earlier was 0.8.You can specify the default crease angle using the configuration parameter OIV_3DDATA_CREASE_ANGLE. See
SoPreferencesfor details.- Since:
- Open Inventor 6.0
-
-
Method Details
-
getMesh
Gets the currentPbMeshobject. -
getClassNodekitCatalog
Returns theSoNodekitCatalogfor this class. -
getDataMapping
Returns the currentPbDataMappingobject. -
getModuleDataMapping
Returns the currentPbDataMappingobject for the association color-vectors module. -
getIsovaluesList
Returns the currentPbIsovaluesListobject. -
setIsovaluesList
Sets a reference to aPbIsovaluesListobject to define a list of isovalues. The isovalues list is used by aPoMeshContouringobject, and by the others mesh representations objects when coloringType = COLOR_CONTOURING. -
setMesh
Sets a reference to aPbMeshobject. -
setDataMapping
Sets a reference to aPbDataMappingobject for the association color-value. The data mapping is not used if the field coloringType = COLOR_INHERITED -
setModuleDataMapping
Sets a reference to aPbDataMappingobject for the association color-vectors module.
-