PbMesh2D Class Reference
[Property/Data]

MeshViz Defines an abstract surface mesh. More...

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

Inheritance diagram for PbMesh2D:
PbMesh PbBase PbGrid2D PbIndexedMesh2D PbCartesianGrid2D PbPolarGrid2D PbRegularCartesianGrid2D PbQuadrangleMesh2D PbTriangleMesh2D PbParalCartesianGrid2D

List of all members.

Public Types

enum  ExtrapolationMethod {
  USE_ADJACENT_DERIVS,
  USE_ADJACENT_VALUES
}

Public Member Functions

void addVecsSet (int set_index, const SbVec2f *val, const SbString &setName="")
virtual SbBox2f getBoundingBox () const
virtual float getVolume () const
virtual float getArea () const
PbMesh2DgetFaultMesh (int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord, ExtrapolationMethod extrapol_method, PbDefinedValue &definedValue) const
PbMesh2DgetFaultMesh (int num_fault_lines, const int *fault_line_sizes, const SbVec3f *coord) const

Detailed Description

MeshViz Defines an abstract surface mesh.

A surface mesh is made of polygonal cells that define a 2D or 3D surface. The topology of this mesh is either regular (see derived class PbGrid2D) or irregular (see derived class PbIndexedMesh2D).


Member Enumeration Documentation

Specifies the type of extrapolation used by getFaultMesh() when computing values on the fault lines.

Enumerator:
USE_ADJACENT_DERIVS 

Computes the value at a point of the fault line by using the derivatives at its adjacent nodes.

USE_ADJACENT_VALUES 

Computes the value at a point of the fault line as the average values of its adjacent nodes.


Member Function Documentation

void PbMesh2D::addVecsSet ( int  set_index,
const SbVec2f val,
const SbString setName = "" 
)

Adds a set of 2D vectors on the mesh.

set_index is the index of the set. Note that even if the isDataDuplicated field is FALSE, this set of 2D vectors is always duplicated in a PbMesh2D object. If you do not want to duplicate your vectors set, you must set is_data_duplicated to FALSE in your mesh constructor and use the method PbMesh::addVecsSet().

virtual float PbMesh2D::getArea (  )  const [virtual]

Gets the area of the mesh.

Implements PbMesh.

Reimplemented in PbParalCartesianGrid2D, and PbRegularCartesianGrid2D.

virtual SbBox2f PbMesh2D::getBoundingBox (  )  const [virtual]

Gets the 2D mesh's bounding box.

Reimplemented from PbMesh.

PbMesh2D* PbMesh2D::getFaultMesh ( int  num_fault_lines,
const int *  fault_line_sizes,
const SbVec3f coord 
) const [inline]

Same as calling getFaultMesh(num_fault_lines, fault_line_sizes, coord,PbMesh2D::USE_ADJACENT_DERIVS, PbDefinedValue()).

PbMesh2D* PbMesh2D::getFaultMesh ( int  num_fault_lines,
const int *  fault_line_sizes,
const SbVec3f coord,
ExtrapolationMethod  extrapol_method,
PbDefinedValue definedValue 
) const

Builds a new mesh by inserting some fault lines in this mesh.

Each point of the fault line is inserted in the new mesh to cut the cells. The resulting mesh contains the fault lines as holes with "null width".

LIMITATIONS: The coordinates of the fault line must not be outside the mesh geometry. Furthemore, this method may not work correctly if the fault lines contain many segments that cross other segments or if some segments are tangent or almost tangent to other segments.

Parameters:
num_fault_lines number of fault lines.
fault_line_sizes each element in this array is the number of points in each line.
For instance, if fault_line_sizes = {3,5}, two fault lines are inserted; the first one has 3 points and the second one has 5 points.
coord the coordinate of each point of the fault lines. For instance, if fault_line_sizes = {3,5}, coord must contain 8 elements. coord[0] ... coord[2] are the coordinates of the first fault line and coord[3] ... coord[7] are the coordinates of the second fault line.
LIMITATION: These coordinates must be inside the mesh.
extrapol_method type of extrapolation used to compute the nodes values on the fault lines. See ExtrapolationMethod
definedValue instance of a class that is used to determine if a node has a value that should be considered as "defined" or "undefined". getFaultMesh needs to know this because only adjacent nodes with "defined" values are taken into account when computing the value of a node on the fault line. When all adjacent nodes are "undefined", the value at a point of the fault line is set to PbDefinedValue::getUndef().
The default instance of PbDefinedValue assumes all nodes are "defined" (because PbDefinedValue::operator()() returns always TRUE) and that the "undefined" value is 0 (PbDefinedValue::getUndef() returns 0). PbDefinedValue should be subclassed to change these default behaviors.
See also:
PbDefinedValue
virtual float PbMesh2D::getVolume (  )  const [inline, virtual]

Always returns 0.

Implements PbMesh.


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/