public class MxPolyhedronCellExtract
extends java.lang.Object
Utility class that provides a static implementation of the
MiVolumeCell
methods for a polyhedron cell. This class is provided to
make easier the creation of a class that implements the MiVolumeCell
interface for a polyhedron cell.
Localization test
See isPointInsideCell(MiGeometryI, MiVolumeCell, double[], double[])
This implementation assumes that a polyhedron is defined as a set of oriented polygons such that their normal is pointing to the inside ( each facet vertices are ordered in an counter-clockwise direction looking from the inside).
Modifier and Type | Method and Description |
---|---|
static double |
getLongestDistance(MiGeometryI meshGeometry,
MiVolumeCell polyhedronCell)
Gets the longest distance inside the given polyhedron cell.
|
static double |
getShortestEdgeLength(MiGeometryI meshGeometry,
MiVolumeCell polyhedronCell)
Gets the shortest distance inside the given polyhedron cell.
|
static boolean |
isPointInsideCell(MiGeometryI meshGeometry,
MiVolumeCell polyhedronCell,
double[] point,
double[] weights)
Checks if a point is inside the given polyhedron cell.
|
public static double getLongestDistance(MiGeometryI meshGeometry, MiVolumeCell polyhedronCell)
meshGeometry
- The geometry of the mesh.polyhedronCell
- The input cell.public static double getShortestEdgeLength(MiGeometryI meshGeometry, MiVolumeCell polyhedronCell)
meshGeometry
- The geometry of the mesh.polyhedronCell
- The input cell.public static boolean isPointInsideCell(MiGeometryI meshGeometry, MiVolumeCell polyhedronCell, double[] point, double[] weights)
MiCell.isPointInsideCell(MiGeometryI, double[], double[])
for a polyhedron cell.
Note: Each node coordinate of the given cell is retrieved in the
following way:
for each i with 0 <= i < polyhedronCell.getNumNodes()
nodeIndex = polyhedronCell.getNodeIndex(i)
meshGeometry.getX(nodeIndex)
meshGeometry.getY(nodeIndex)
meshGeometry.getZ(nodeIndex)
meshGeometry
- The geometry of the mesh.polyhedronCell
- The input cell.point
- The input point given in the same space coordinate as
meshGeometry
.weights
- The array into which the weight values are to be stored.This
method computes the N values weights[0,N-1], where
N=polygonCell.getNumNodes()
. It assumes the weights array
has been already allocated. Its size must be set to N (at least)
before calling this method.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com