Package com.openinventor.meshviz.data
Class PbGrid2D
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.meshviz.graph.PbBase
-
- com.openinventor.meshviz.data.PbMesh
-
- com.openinventor.meshviz.data.PbMesh2D
-
- com.openinventor.meshviz.data.PbGrid2D
-
- Direct Known Subclasses:
PbCartesianGrid2D
,PbPolarGrid2D
,PbRegularCartesianGrid2D
public class PbGrid2D extends PbMesh2D
Defines an abstract grid surface mesh. This class defines a mesh of which topology is a regular grid made of num_x * num_y nodes. Each node with index (i, j) in the mesh (except for points along the mesh border) is connected to four points with indices (i+1,j), (i,j+1), (i-1,j), (i,j-1).The values on the mesh nodes are defined by the
PbMesh.addValuesSet()
method, where val argument is an array of num_x * num_y floats.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PbMesh2D
PbMesh2D.ExtrapolationMethods
-
Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PbMesh
PbMesh.CellBox, PbMesh.ContainingCell, PbMesh.CoordinatesInfo, PbMesh.DataBindings
-
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 int[]
getCellIndices(int cell_index)
Calculates indices i,j that verify cell_index = i*(num_y-1) + j.int[]
getDim()
Gets the dimensions num_x, num_y of the grid.SbVec3f
getNodeCoord(int i, int j)
Gets the coordinates of a node defined by its i,j indices on the grid.int[]
getNodeIndices(int nod_index)
Calculates indices i,j that verify nod_index = i*num_y + j.void
setGeometry(int num_x, int num_y, float[] x, float[] y)
Defines a 2D surface mesh geometry.void
setGeometry(int num_x, int num_y, float[] x, float[] y, float[] z)
Defines a 3D surface mesh geometry.-
Methods inherited from class com.openinventor.meshviz.data.PbMesh2D
addVecsSet, addVecsSet, get2DBoundingBox, getFaultMesh
-
Methods inherited from class com.openinventor.meshviz.data.PbMesh
addStringsSet, addStringsSet, addValuesSet, addValuesSet, addValuesSet, addValuesSet, addVecsSet, addVecsSet, findContainingCell, findContainingCell, getArea, getBiggestCellBox, getBoundingBox, getCell, getCoordinates, getDirectValuesSet, getDirectVecsSet, getMaxValuesSet, getMaxVecsSet, getMinValuesSet, getMinVecsSet, getNodeCoord, getNumCells, getNumNodes, getNumStringsSet, getNumValuesSet, getNumVecsSet, getSmallestCellBox, getStringsSetName, getValuesBinding, getValuesSet, getValuesSetName, getVecsSet, getVecsSetName, getVolume, isDataDuplicated, removeAllStringsSet, removeAllValuesSet, removeAllVecsSet, removeStringsSet, removeValuesSet, removeVecsSet, setCoordinates
-
Methods inherited from class com.openinventor.meshviz.graph.PbBase
enableConnection, isConnectionEnabled, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getDim
public int[] getDim()
Gets the dimensions num_x, num_y of the grid.
-
setGeometry
public void setGeometry(int num_x, int num_y, float[] x, float[] y)
Defines a 2D surface mesh geometry. The size of the x array depends on the derived class that calls this method. It is either num_x or num_x * num_y. Idem for y array.
-
getNodeIndices
public int[] getNodeIndices(int nod_index)
Calculates indices i,j that verify nod_index = i*num_y + j.
-
getNodeCoord
public SbVec3f getNodeCoord(int i, int j)
Gets the coordinates of a node defined by its i,j indices on the grid.
-
setGeometry
public void setGeometry(int num_x, int num_y, float[] x, float[] y, float[] z)
Defines a 3D surface mesh geometry. The size of the x array depends on the derived class that calls this method. It is either num_x or num_x * num_y. Idem for y array. The size of z array is always num_x * num_y.
-
getCellIndices
public int[] getCellIndices(int cell_index)
Calculates indices i,j that verify cell_index = i*(num_y-1) + j.
-
-