Class PbIndexedMesh2D
- 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.PbIndexedMesh2D
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
PbQuadrangleMesh2D
,PbTriangleMesh2D
public class PbIndexedMesh2D extends PbMesh2D implements java.lang.Cloneable
Defines a surface mesh of polygons. Class to define an indexed 2D mesh. Each cell of this type of mesh is a polygon with any number of nodes. Each polygon cell is defined by a list of indices in an array of nodes.The nodes coordinates are defined by 2 (or 3) arrays x_nod, y_nod (and z_nod) of num_nodes floats. The cells are defined by the array cell_type (size num_cells) and cell_index. cell_type[n] defines the number of nodes in the n-th cells: if cell_type[i] = 3, the i-th cell is a triangle, if cell_type[i] = 4, it is a quadrangle... cell_index is an array of S integers, where S = cell_type[0] + cell_type[1] + ... + cell_type[num_nodes - 1]. cell_index contains the num_cells lists of node indices which define each cell topology.
Each edge of a cell may have 2 references in the mesh, that is, one edge is common to 2 cells. The edges which are referred to once in the mesh define the limits of the mesh.
The values on the mesh nodes are defined by the PbMesh.addValuesSet(set_index,val) method, where val argument is an array of num_nodes floats.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PbIndexedMesh2D.ElemOrientations
Cell orientation for visualization of 2D surface mesh.static class
PbIndexedMesh2D.NodesInfo
-
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
-
-
Constructor Summary
Constructors Constructor Description PbIndexedMesh2D()
Calls PbIndexedMesh2D(true).PbIndexedMesh2D(boolean is_data_duplicate)
Constructor of a default simple mesh.PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type)
Calls PbIndexedMesh2D(num_nodes, x_nod, y_nod, z_nod, num_cells, cell_index, cell_type, true).PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type, boolean is_data_duplicate)
Constructor of a 3D surface mesh.PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type)
Calls PbIndexedMesh2D(num_nodes, x_nod, y_nod, num_cells, cell_index, cell_type, true).PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type, boolean is_data_duplicate)
Constructor of a 2D surface mesh.PbIndexedMesh2D(PbIndexedMesh2D mesh)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
PbIndexedMesh2D.NodesInfo
get2DNodes()
Gets the mesh nodes coordinates (only x,y coordinates) .PbIndexedMesh2D.NodesInfo
getNodes()
Gets the mesh nodes coordinates (x,y,z coordinates) .void
setElemOrientation(PbIndexedMesh2D.ElemOrientations cell_orient)
Changes orientation of cells during visualization of 2D surface mesh.void
setGeometry(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type)
Sets a new 3D geometry.void
setGeometry(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type)
Sets a new 2D 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
-
-
-
-
Constructor Detail
-
PbIndexedMesh2D
public PbIndexedMesh2D()
Calls PbIndexedMesh2D(true).
-
PbIndexedMesh2D
public PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type)
Calls PbIndexedMesh2D(num_nodes, x_nod, y_nod, num_cells, cell_index, cell_type, true).
-
PbIndexedMesh2D
public PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type)
Calls PbIndexedMesh2D(num_nodes, x_nod, y_nod, z_nod, num_cells, cell_index, cell_type, true).
-
PbIndexedMesh2D
public PbIndexedMesh2D(boolean is_data_duplicate)
Constructor of a default simple mesh. See alsoPbMesh
for more explanations about data duplication.
-
PbIndexedMesh2D
public PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type, boolean is_data_duplicate)
Constructor of a 2D surface mesh. See alsoPbMesh
for more explanations about data duplication.
-
PbIndexedMesh2D
public PbIndexedMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type, boolean is_data_duplicate)
Constructor of a 3D surface mesh. See alsoPbMesh
for more explanations about data duplication.
-
PbIndexedMesh2D
public PbIndexedMesh2D(PbIndexedMesh2D mesh)
Copy constructor.
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
get2DNodes
public PbIndexedMesh2D.NodesInfo get2DNodes()
Gets the mesh nodes coordinates (only x,y coordinates) .
-
setElemOrientation
public void setElemOrientation(PbIndexedMesh2D.ElemOrientations cell_orient)
Changes orientation of cells during visualization of 2D surface mesh. The ordering of the indices of an cell defines the direction of its normal vector and so its orientation. When the mesh is visualized in 2D, the direction of the normal of an cell is either Z+ or Z-. If any cell of the mesh does not have the same orientation, it can change the representation because the lighting depends on the orientation.
-
setGeometry
public void setGeometry(int num_nodes, float[] x_nod, float[] y_nod, int num_cells, int[] cell_index, int[] cell_type)
Sets a new 2D geometry.
-
getNodes
public PbIndexedMesh2D.NodesInfo getNodes()
Gets the mesh nodes coordinates (x,y,z coordinates) .
-
setGeometry
public void setGeometry(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_cells, int[] cell_index, int[] cell_type)
Sets a new 3D geometry.
-
-