Class MxPyramidCellExtract
- java.lang.Object
-
- com.openinventor.meshvizxlm.extractors.cell.MxGenericCellExtract
-
- com.openinventor.meshvizxlm.extractors.cell.MxCellExtract
-
- com.openinventor.meshvizxlm.extractors.cell.MxPyramidCellExtract
-
public class MxPyramidCellExtract extends MxCellExtract
Utility class for pyramid cells.Utility class that provides a static implementation of
MiVolumeCell
's methods for a pyramid cell. This class is provided to make easier the creation of a class that implements theMiVolumeCell
interface for a pyramid cell.- Extraction of the topology of an isosurface in a pyramid
SeegetIsosurfTopology(int, int[])
- Localization test
SeeisPointInsideCell(MiGeometryI, MiVolumeCell, double[], double[])
getIsosurfTopology
) is defined according to this node numbering.Nodes and faces numbering
- Extraction of the topology of an isosurface in a pyramid
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[]
getIsosurfTopology(int caseId, int[] edges)
Returns the isosurface topology of the associated case Id.static double
getLongestEdgeLength(MiGeometryI meshGeometry, MiVolumeCell cell)
Gets the longest edge of a pyramid cell.static boolean
isPointInsideCell(MiGeometryI meshGeometry, MiVolumeCell pyramidCell, double[] point, double[] weights)
Checks if a point is inside or outside a pyramid cell.-
Methods inherited from class com.openinventor.meshvizxlm.extractors.cell.MxCellExtract
getCenter
-
-
-
-
Method Detail
-
isPointInsideCell
public static boolean isPointInsideCell(MiGeometryI meshGeometry, MiVolumeCell pyramidCell, double[] point, double[] weights)
Checks if a point is inside or outside a pyramid cell.This static method helps to implement the method
MiCell.isPointInsideCell(MiGeometryI, double[], double[])
for a pyramid cell.- Parameters:
meshGeometry
- the geometry of the meshpyramidCell
- the input cell.point
- the input point given in the same space coordinate as meshGeometryweights
- the array into which the weight values are to be stored. This method computes the 5 values weights[0-4] if the point is inside the cell. It assumes the weights array has been already allocated. Its size must be set to 5 (at least) before calling this method- Returns:
true
if the point is inside the cell
-
getLongestEdgeLength
public static double getLongestEdgeLength(MiGeometryI meshGeometry, MiVolumeCell cell)
Gets the longest edge of a pyramid cell.- Parameters:
meshGeometry
- the geometry of the meshcell
- the input cell- Returns:
- the longest edge of the specified cell
-
getIsosurfTopology
public static int[] getIsosurfTopology(int caseId, int[] edges)
Returns the isosurface topology of the associated case Id.This method can be used in the
getIsosurfTopology
implementation of an pyramid cell interface to return the information to the isosurface extraction module.- Parameters:
caseId
- the isosurf "marching cube" entry for the celledges
- The array into which the isosurface topology is to be stored: array of node indices ordered by pair defining an edge, polygons are separated byMxMeshViz.END_LIST
, the end of the topology definition is indicated by a pair ofMxMeshViz.END_LIST
.- Returns:
- The array into which the isosurface topology is stored.
- Throws:
java.lang.IllegalArgumentException
- if the caseId>
0x1F
-
-