public class PwShapeOperator extends PjWorkshop
PgElementSet
.Modifier and Type | Field and Description |
---|---|
static boolean |
m_useConvolutionMask
This flag specifies if all edges will be weighted equally or if edges that are closer to the
center of the ball get higher weight.
|
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwShapeOperator()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
static PdVector[] |
calcEigensystem(PdMatrix matrix,
PdVector normal,
PdVector[] eigenVectors,
PdVector eigenValues)
Calculate the eigenvectors of the shape operator restricted to a given plane.
|
static void |
enableAbsoluteValue(boolean useAbsoluteValue)
Use absolute curvature values are used for curvature tensor calculation.
|
static void |
enableConvolution(boolean useConvolution)
Use a weighting mask.
|
static void |
getPrincipalCurvatures(PgElementSet geom,
PdMatrix[] shape,
PdVector[] pcValues,
PdVector[][] pcDirections,
boolean projectToTangentPlane,
boolean vertexBased)
Computes the principal curvatures and directions at each vertex of the surface.
|
static PdMatrix[] |
getShapeOperator(PgElementSet geom,
double radius,
boolean vertexBased,
PdMatrix[] shape)
Calculate the shape operator for the whole geometry
geom . |
static PdMatrix |
getShapeOperator(PgElementSet geom,
int elementInd,
double radius,
PdMatrix shape)
Calculates the shape operator for the element with
elementInd of the PgElementSet geom . |
static PdMatrix |
getShapeOperator(PgElementSet geom,
int vertexInd,
int elemInd,
double radius,
PdMatrix shape)
Calculates the shape operator for the vertex with index
vertexInd of the PgElementSet geom
and stores it in the PdMatrix shape . |
static PdMatrix |
getShapeOperator(PgElementSet geom,
PdBary bary,
double radius,
PdMatrix shape)
Calculates the shape operator for the point on the PgElementSet
geom within the element with index
elementInd given by the barycentric coordinates baryCoords and stores it in the PdMatrix
shape . |
static boolean |
isEnabledAbsoluteValue()
Check if absolute curvature values are used for curvature tensor calculation.
|
static boolean |
isEnabledConvolution()
Check if convolution with a weighting mask is enabled.
|
static PgVectorField[] |
makeElementBasedPrincipalCurvatures(PgElementSet geom,
PdVector[] curvatureValues)
Make element based principal curvature vector fields with an automatic calculated
integration radius.
|
static PgVectorField[] |
makeElementBasedPrincipalCurvatures(PgElementSet geom,
PdVector[] curvatureValues,
boolean bIntegrated)
Make element based principal curvature vector fields.
|
static PgVectorField[] |
makeElementBasedPrincipalCurvatures(PgElementSet geom,
PdVector[] curvatureValues,
double radius)
Make element based principal curvature vector fields.
|
static PdVector |
makeTrustFunction(PgVectorField vf,
PdVector[] curvatures,
boolean useSmoothProperty)
Computes a scalar function indicating, how trusted the curvature information
are in the actual point.
|
static PgVectorField[] |
makeVertexBasedPrincipalCurvatures(PgElementSet geom,
PdVector[] curvatures,
boolean bIntegrated)
Make vertex based principal curvature vector fields.
|
static PgVectorField[] |
makeVertexBasedPrincipalCurvatures(PgElementSet geom,
PdVector[] curvatures,
double radius)
Make vertex based principal curvature vector fields.
|
static void |
normalizeFrame(PdVector v1,
PdVector v2,
PdVector baseX,
PdVector baseY,
PdVector normal)
Normalizes a vector frame consisting of two vectors v1, v2.
|
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, init, isModal, isStandalone, ok, removeGeometry, reset, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer, update
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, getName, setParent
public static boolean m_useConvolutionMask
public static boolean isEnabledConvolution()
public static void enableConvolution(boolean useConvolution)
public static boolean isEnabledAbsoluteValue()
public static void enableAbsoluteValue(boolean useAbsoluteValue)
public static PdMatrix[] getShapeOperator(PgElementSet geom, double radius, boolean vertexBased, PdMatrix[] shape)
geom
. The shape operator is being calculated
for every vertex or every element depending on vertexBased
. The shape operator is calculated over
every edge within a Euclidean ball of radius radius
by adding the curvature (the signed
angle between face normals) weighted by the length of the edge within the ball, divided by the total area of
the surface enclosed by the ball.geom
- A PgElementSet to work on.radius
- The radius of the ball determining the edges to be included in the calculation of the
shape operator.vertexBased
- If true, calculates shape operator for every vertex, if false, calculate shape
operator for every elementshape
- An PdMatrix array of length equal to the number of vertices or elements, depending on
vertexBased
, may be null.public static PdMatrix getShapeOperator(PgElementSet geom, int vertexInd, int elemInd, double radius, PdMatrix shape)
vertexInd
of the PgElementSet geom
and stores it in the PdMatrix shape
. Normals of the geometry must exist.geom
- A PgElementSet of which the shape operator is to be calculated.vertexInd
- The index of the vertex which shape operator shall be calculated.elemInd
- Index of one element containing the vertex with index vertexInd
, maybe -1, but then a linear
search is required to find one.radius
- The radius of the ball determining the edges to be included in the calculation of the
shape operator of the vertex.shape
- A possibly null reference to a PdMatrix object in which the shape operator for the
vertex will be stored.public static PdMatrix getShapeOperator(PgElementSet geom, PdBary bary, double radius, PdMatrix shape)
geom
within the element with index
elementInd
given by the barycentric coordinates baryCoords
and stores it in the PdMatrix
shape
.geom
- A PgElementSet of which the shape operator is to be calculated.bary
- PdBary containing the relevant element index and barycentric coordinates of the center vertexradius
- The radius of the ball determining the edges to be included in the calculation of the
shape operator of any given vertex.shape
- A possibly null reference to a PdMatrix object in which the shape operator for the
point will be stored.public static PdMatrix getShapeOperator(PgElementSet geom, int elementInd, double radius, PdMatrix shape)
elementInd
of the PgElementSet geom
.
The result will be the shape operator of the barycentric center of the element.geom
- A PgElementSet of which the shape operator is to be calculated.elementInd
- The element containing the point of which the shape operator shall be calculated.radius
- The radius of the ball determining the edges to be included in the calculation of the
shape operator of any given vertex.shape
- A possibly null reference to a PdMatrix object in which the shape operator for the
point will be stored.public static void getPrincipalCurvatures(PgElementSet geom, PdMatrix[] shape, PdVector[] pcValues, PdVector[][] pcDirections, boolean projectToTangentPlane, boolean vertexBased)
PnMassMatrix.multInvMassMatrix(PgElementSet, PdMatrix[], boolean)
.
If only the only the direction or the values are needed, the other argument can be null.geom
- geometry to operate on.pcValues
- array with length 2 and vector length equal to the number of vertices.pcDirections
- array with length [2][nov] where nov is the number of vertices.
Each vector must have dimension equal to the dimension of the ambient space.shape
- array of length equal to the number of vertices of the geometry.public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom, PdVector[] curvatureValues, boolean bIntegrated)
geom
- Given geometry.curvatureValues
- Output vector for curvature values. Dimension [numElements] or null.bIntegrated
- If true, computes the curvatures integrated over the actual element.public static PgVectorField[] makeVertexBasedPrincipalCurvatures(PgElementSet geom, PdVector[] curvatures, boolean bIntegrated)
The field is returned as PgVectorField[] because PgFrameField does not support vertex based vectors yet.
geom
- Given geometry.bIntegrated
- If true, computes the curvatures integrated over the actual element.public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom, PdVector[] curvatureValues)
geom
- Given geometry.public static PgVectorField[] makeElementBasedPrincipalCurvatures(PgElementSet geom, PdVector[] curvatureValues, double radius)
geom
- Given geometry.public static PgVectorField[] makeVertexBasedPrincipalCurvatures(PgElementSet geom, PdVector[] curvatures, double radius)
geom
- Given geometry.public static PdVector[] calcEigensystem(PdMatrix matrix, PdVector normal, PdVector[] eigenVectors, PdVector eigenValues)
matrix
- 3x3 matrix representing the shape operator.normal
- Normal vector to the plane.eigenVectors
- Preallocated memory for eigenvectors. May be null.public static PdVector makeTrustFunction(PgVectorField vf, PdVector[] curvatures, boolean useSmoothProperty)
vf
- TODOcurvatures
- minimal and maximal curvature value of field.public static void normalizeFrame(PdVector v1, PdVector v2, PdVector baseX, PdVector baseY, PdVector normal)
"