Package com.openinventor.meshviz.data
Class PbCell
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.meshviz.graph.PbBase
com.openinventor.meshviz.data.PbCell
- Direct Known Subclasses:
PbHexahedronCell
,PbPixelCell
,PbPyramidCell
,PbQuadrangleCell
,PbTetrahedronCell
,PbTriangleCell
,PbVoxelCell
,PbWedgeCell
Defines an abstract cell of a mesh.
A cell is a "simple" basic volume or surface element that connects adjacent nodes of a mesh.
-
Nested Class Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getArea()
Gets the area of a cell.Gets the cell's bounding box.float[]
Gets the cell's bounds.Gets the cell's geometric center.int
getIndex()
Gets the index of the cell in the mesh.float
Gets the length of the longest edge of the cell.getNodeCoord
(int nod) Gets the coordinate of the nod (nod must be >=0 and <getNumNodes()
).int
getNodeIndex
(int nod) Gets the index (in the mesh) of a nod (nod must be >=0 and <getNumNodes()
).int
Gets the number of edges.int
Gets the number of facets.int
Gets the number of nodes.float
getValue
(float[] weight, float[] s) Gets the scalar value of a point in this cell, given the point's weights.Gets the vector value of a point in this cell, given the point's weights.float
Get the scalar value of a point in the cell.Get the vector value of a point in the cell.float
Gets the volume of the cell.locatePoint
(SbVec3f coord, float tolerance) Returns 1 if the point is inside the cell, 0 otherwise.Methods inherited from class com.openinventor.meshviz.graph.PbBase
enableConnection, isConnectionEnabled, touch
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
getValue
public float getValue(float[] weight, float[] s) Gets the scalar value of a point in this cell, given the point's weights. -
getBoundingBox
Gets the cell's bounding box. -
getLongestEdgeLength
public float getLongestEdgeLength()Gets the length of the longest edge of the cell. -
getValue
Gets the vector value of a point in this cell, given the point's weights. -
getValue
Get the vector value of a point in the cell.- Parameters:
pcoord
- [in] Parametric [0..1] coordinate of the point inside the cell.v
- [in] The vector dataset to interpolate- Returns:
- The interpolated value
-
getNumEdges
public int getNumEdges()Gets the number of edges. -
getNumFacets
public int getNumFacets()Gets the number of facets. -
getNodeCoord
Gets the coordinate of the nod (nod must be >=0 and <getNumNodes()
). -
getNodeIndex
public int getNodeIndex(int nod) Gets the index (in the mesh) of a nod (nod must be >=0 and <getNumNodes()
). -
getNumNodes
public int getNumNodes()Gets the number of nodes. -
getIndex
public int getIndex()Gets the index of the cell in the mesh. -
getCenter
Gets the cell's geometric center. -
getBounds
public float[] getBounds()Gets the cell's bounds. Similar togetBoundingBox()
but it does not use any SbBox object. -
getValue
Get the scalar value of a point in the cell.- Parameters:
pcoord
- [in] Parametric [0..1] coordinate of the point inside the cell.s
- [in] The scalar dataset to interpolate- Returns:
- The interpolated value
-
getArea
public float getArea()Gets the area of a cell. -
getVolume
public float getVolume()Gets the volume of the cell. Returns always 0 for a 2D cell. -
locatePoint
Returns 1 if the point is inside the cell, 0 otherwise. Gets also the parametric coordinate of the point and its weights
-