Package com.openinventor.meshviz.data
Class PbTriangleMesh2D
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
com.openinventor.meshviz.data.PbTriangleMesh2D
- All Implemented Interfaces:
Cloneable
Defines a surface mesh of triangles.
Class to define an indexed 2D mesh made up of triangles cells. This mesh is defined by a list of triangles. Each triangles is defined by 3 indices of nodes.
The nodes coordinates are defined by 2 (or 3) arrays x_nod, y_nod, (and z_nod) of num_nodes floats. The triangles are defined by the array triangle_index of num_triangles*3 integers. triangle_index[(n*3)+p] is the p-th node index of the n-th triangle of the mesh (0 <= p <= 3).
Each edge of a triangle may have 2 references in the mesh, that is, one edge is common to 2 triangles. The edges which are referred to once in the mesh define the limits of the mesh.
The geometry of this mesh can be defined also from a points field. In this case the Voronoi method is used to build the triangle 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/interfaces inherited from class com.openinventor.meshviz.data.PbIndexedMesh2D
PbIndexedMesh2D.ElemOrientations, 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
ConstructorsConstructorDescriptionCalls PbTriangleMesh2D(true).PbTriangleMesh2D
(boolean isDataDuplicate) Constructor of a default simple mesh.PbTriangleMesh2D
(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index) Calls PbTriangleMesh2D(num_nodes, x_nod, y_nod, z_nod, num_triangles, triangle_index, true).PbTriangleMesh2D
(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index, boolean is_data_duplicate) Constructor of a 3D surface mesh.PbTriangleMesh2D
(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index) Calls PbTriangleMesh2D(num_nodes, x_nod, y_nod, num_triangles, triangle_index, true).PbTriangleMesh2D
(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index, boolean is_data_duplicate) Constructor of a 2D surface mesh.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
setGeometry
(int numPoints, float[] xPointsField, float[] yPointsField) Set a new 2D geometry from a points field.void
setGeometry
(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index) Sets a new 3D geometry.void
setGeometry
(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index) Sets a new 2D geometry.Methods inherited from class com.openinventor.meshviz.data.PbIndexedMesh2D
get2DNodes, getNodes, setElemOrientation, setGeometry, setGeometry
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 Details
-
PbTriangleMesh2D
public PbTriangleMesh2D()Calls PbTriangleMesh2D(true). -
PbTriangleMesh2D
public PbTriangleMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index) Calls PbTriangleMesh2D(num_nodes, x_nod, y_nod, z_nod, num_triangles, triangle_index, true). -
PbTriangleMesh2D
public PbTriangleMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index) Calls PbTriangleMesh2D(num_nodes, x_nod, y_nod, num_triangles, triangle_index, true). -
PbTriangleMesh2D
Copy constructor. -
PbTriangleMesh2D
public PbTriangleMesh2D(boolean isDataDuplicate) Constructor of a default simple mesh. See alsoPbMesh
for more explanations about data duplication. -
PbTriangleMesh2D
public PbTriangleMesh2D(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index, boolean is_data_duplicate) Constructor of a 2D surface mesh. See alsoPbMesh
for more explanations about data duplication. -
PbTriangleMesh2D
public PbTriangleMesh2D(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index, boolean is_data_duplicate) Constructor of a 3D surface mesh. See alsoPbMesh
for more explanations about data duplication.
-
-
Method Details
-
clone
- Overrides:
clone
in classPbIndexedMesh2D
-
setGeometry
public void setGeometry(int num_nodes, float[] x_nod, float[] y_nod, float[] z_nod, int num_triangles, int[] triangle_index) Sets a new 3D geometry. -
setGeometry
public void setGeometry(int numPoints, float[] xPointsField, float[] yPointsField) Set a new 2D geometry from a points field. The triangulation is realized by the DELAUNAY method. -
setGeometry
public void setGeometry(int num_nodes, float[] x_nod, float[] y_nod, int num_triangles, int[] triangle_index) Sets a new 2D geometry.
-