PoMesh Class Reference
[Representation]

MeshViz Base class for all mesh representations. More...

#include <MeshViz/3Ddata/PoMesh.h>

Inheritance diagram for PoMesh:
Po3DdataMaster PoBase SoBaseKit SoNode SoGetView SoFieldContainer SoBase SoRefCounter SoTypedObject PoBaseStreamLine PoCellShape PoMesh2D PoMesh3D PoMeshProbePoint PoStreamLine PoStreamParticleMotion PoStreamSurface PoCellEdges PoCellFacets PoCellIndices PoMesh2DVec PoMeshContouring PoMeshFilled PoMeshLimit PoMeshLines PoMeshSides PoMesh3DVec PoMeshCrossContour PoMeshCrossSection PoMeshLevelSurf PoMeshSkeleton PoMeshSkin

List of all members.

Public Types

enum  ColoringType {
  COLOR_INHERITED,
  COLOR_AVERAGE,
  COLOR_MAPPING,
  COLOR_CONTOURING,
  COLOR_TEXTURE_CONTOURING
}

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
void setMesh (PbMesh *mesh)
void setDataMapping (PbDataMapping *data_mapping)
void setModuleDataMapping (PbDataMapping *mod_data_mapping)
void setIsovaluesList (PbIsovaluesList *isovalues_list)
const PbMeshgetMesh () const
const PbDataMappinggetDataMapping () const
const PbDataMappinggetModuleDataMapping () const
const PbIsovaluesListgetIsovaluesList () const

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()

Public Attributes

SoSFInt32 valuesIndex
SoSFInt32 valuesIndexForCellFilter
SoSFInt32 vecsIndex
SoSFEnum coloringType
SoSFNode moduleDataMapping
SoSFBool smoothTextureContouring
SoSFFloat creaseAngle

Detailed Description

MeshViz Base class for all mesh representations.

A representation of a mesh may depend on other MeshViz objects : The current mesh, the current data-mapping, the current module-data-mapping, the current isovalues list, the current domain, the current numeric display format and the current miscellaneous text attributes.

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.


Member Enumeration Documentation

Coloring type.

Enumerator:
COLOR_INHERITED 
COLOR_AVERAGE 
COLOR_MAPPING 
COLOR_CONTOURING 
COLOR_TEXTURE_CONTOURING 

Member Function Documentation

static const SoNodekitCatalog* PoMesh::getClassNodekitCatalog (  )  [static]
static SoType PoMesh::getClassTypeId (  )  [static]
const PbDataMapping* PoMesh::getDataMapping (  )  const

Returns the current PbDataMapping object.

const PbIsovaluesList* PoMesh::getIsovaluesList (  )  const

Returns the current PbIsovaluesList object.

const PbMesh* PoMesh::getMesh (  )  const

Gets the current PbMesh object.

Reimplemented in PoMesh2D, and PoMesh3D.

const PbDataMapping* PoMesh::getModuleDataMapping (  )  const

Returns the current PbDataMapping object for the association color-vectors module.

virtual const SoNodekitCatalog* PoMesh::getNodekitCatalog (  )  const [virtual]
virtual SoType PoMesh::getTypeId (  )  const [virtual]
void PoMesh::setDataMapping ( PbDataMapping data_mapping  ) 

Sets a reference to a PbDataMapping object for the association color-value.

The data mapping is not used if the field coloringType = COLOR_INHERITED

void PoMesh::setIsovaluesList ( PbIsovaluesList isovalues_list  ) 

Sets a reference to a PbIsovaluesList object to define a list of isovalues.

The isovalues list is used by a PoMeshContouring object, and by the others mesh representations objects when coloringType = COLOR_CONTOURING.

void PoMesh::setMesh ( PbMesh mesh  ) 

Sets a reference to a PbMesh object.

void PoMesh::setModuleDataMapping ( PbDataMapping mod_data_mapping  ) 

Sets a reference to a PbDataMapping object for the association color-vectors module.


Member Data Documentation

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 (classes PoMeshLimit, PoMeshLines) is colored by a single color defined by the average value of its extremities mapped on a PbDataMapping object. Each element of a solid surface representation of the mesh (classes PoMeshSides, PoMeshFilled) is colored by a single color defined by the average value of its nodes mapped on a PbDataMapping object. 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 a PbDataMapping object. The PbDataMapping object 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 the PbDataMapping object which defines the color associated to these values. If some isovalues of the PbIsovaluesList object 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 the PbDataMapping object which defines the color associated to these values. If some isovalues of the PbIsovaluesList object 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 as COLOR_CONTOURING but 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 the COLOR_CONTOURING method. 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_CONTOURING for 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 by PoDataMapping::transparencyValueDeletedParts will not be discarded when using this mode.

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 SoPreferences for details.

NOTE: field available since Open Inventor 6.0

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 from PoDataMapping.

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. NOTE: field available since Open Inventor 8.1

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.

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).

Defines the index of the set of vectors for all representations which need a vector at each mesh node (PoBaseStreamLine, PoMesh2DVec, PoMesh3DVec,.

..)


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/