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
public class PbCell extends PbBase
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetArea()Gets the area of a cell.SbBox3fgetBoundingBox()Gets the cell's bounding box.float[]getBounds()Gets the cell's bounds.SbVec3fgetCenter()Gets the cell's geometric center.intgetIndex()Gets the index of the cell in the mesh.floatgetLongestEdgeLength()Gets the length of the longest edge of the cell.SbVec3fgetNodeCoord(int nod)Gets the coordinate of the nod (nod must be >=0 and <getNumNodes()).intgetNodeIndex(int nod)Gets the index (in the mesh) of a nod (nod must be >=0 and <getNumNodes()).intgetNumEdges()Gets the number of edges.intgetNumFacets()Gets the number of facets.intgetNumNodes()Gets the number of nodes.floatgetValue(float[] weight, float[] s)Gets the scalar value of a point in this cell, given the point's weights.SbVec3fgetValue(float[] weight, SbVec3f[] v)Gets the vector value of a point in this cell, given the point's weights.floatgetValue(SbVec3f pcoord, float[] s)Get the scalar value of a point in the cell.SbVec3fgetValue(SbVec3f pcoord, SbVec3f[] v)Get the vector value of a point in the cell.floatgetVolume()Gets the volume of the cell.SbVec3flocatePoint(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 Detail
-
getValue
public float getValue(float[] weight, float[] s)Gets the scalar value of a point in this cell, given the point's weights.
-
getBoundingBox
public SbBox3f getBoundingBox()
Gets the cell's bounding box.
-
getLongestEdgeLength
public float getLongestEdgeLength()
Gets the length of the longest edge of the cell.
-
getValue
public SbVec3f getValue(float[] weight, SbVec3f[] v)
Gets the vector value of a point in this cell, given the point's weights.
-
getValue
public SbVec3f getValue(SbVec3f pcoord, SbVec3f[] v)
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
public SbVec3f getNodeCoord(int nod)
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
public SbVec3f 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
public float getValue(SbVec3f pcoord, float[] s)
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.
-
-