public class PwTetraSet extends PjWorkshop
Modifier and Type | Field and Description |
---|---|
static int |
INPUT_FUNCTION
Identifier for computing level surface from a scalar function, which will be evaluated at vertices and along edges.
|
static int |
INPUT_SCALAR_DATA
Identifier for computing level surface from scalar data on vertices.
|
int |
m_inputType
Flag to select input data.
|
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 |
---|
PwTetraSet()
Constructor
|
Modifier and Type | Method and Description |
---|---|
static PgVectorField[] |
addTestFrameField(PgTetraSet tetraSet,
boolean addFieldsToGeometry)
Add a test frame field to the given PgTetraSet.
|
static void |
addTestTexture(PgTetraSet tetraSet)
Add a test tetra-based texture.
|
static void |
addTestVectorField(PgTetraSet tetraSet)
Test for using element based vector field in PgTetraSet.
|
void |
colorVertices()
Color the vertices of the workshop's PgTetraSet by function values.
|
static float[] |
colorVertices(PgPointSet geom,
float[] data)
Colors the vertices according to the ind-th data set.
|
static PgEdgeStar |
computeEdgeStar(PgTetraSet tetraSet,
int tetIndex,
int vertexIndex1,
int vertexIndex2,
PgEdgeStar edgeStar)
Compute the edge star.
|
static PgEdgeStar |
computeEdgeStar(PgTetraSet tetraSet,
int tetIndex,
int edgeIndex,
PgEdgeStar edgeStar)
Compute the edge star.
|
PgElementSet |
computeLevelSurface()
Compute the level surface in the Workshop's PgTetraSet volume.
|
static PgElementSet |
convertFacesToElementSet(PgTetraSet geom)
Compute a polygon set with a polygon for each edge in this tetra set.
|
static PgElementSet |
convertToElementSet(PgTetraSet tetraSet)
Store tetrahedra to quadrilaterals in a PgElementSet.
|
static PgPolygonSet |
convertToPolygonSet(PgTetraSet geom)
Compute a polygon set with a polygon for each edge in this tetra set.
|
static PgVectorField[] |
deriveTexture(PgTetraSet geom)
Compute two vector fields as the gradients of the actual textures.
|
static boolean |
edgeStarIsClosed(PgTetraSet tetraSet,
PgEdgeStar edgeStar)
Check if an edge star is closed.
|
int |
getInputType()
Get the kind of data for computing level surfaces.
|
static PgElementSet |
getLevelSurface(PgTetraSet tetraSet,
PgElementSet surface,
PdVector scalarData,
double levelValue)
Scan the tetrahedra of the geometry for intersections with the level surface of the passed function.
|
static PgElementSet |
getLevelSurface(PgTetraSet tetraSet,
PgElementSet surface,
PuFunction function,
double levelValue)
Scan the tetrahedra of the geometry for intersections with the level surface of the passed function.
|
double |
getLevelValue()
Get current level value.
|
static int |
getLocalEdgeIndex(PgTetraSet tetraSet,
int tetIndex,
int vertexIndex1,
int vertexIndex2)
Get the local edge index in a tetrahedron.
|
void |
getNegativeTetraSet()
Add the negative part of the workshops tetraSet as new PgetraSet to the display
|
void |
getPositiveTetraSet()
Add the positive part of the workshops tetraSet as new PgetraSet to the display
|
PdVector |
getScalarData()
Get Scalar Data per PgTetraSet Vertex.
|
PgElementSet |
getSurface()
Get the computed level surface.
|
PiVector[] |
getTetToBndIndices(PgBndElementSet bnd)
Generate the inverse information to PgBndELementSet.m_tetraInd.
|
static PdVector |
getVertex(PdVector vertex,
PgTetraSet geom,
PdBary bary)
Get vertex from barycentric coordinates on a tetraset.
|
void |
globalRefine()
Refine the workshop's PgTetraSet globally.
|
static java.util.Vector |
grepValue(PgTetraSet tetra,
PdVector scalarData,
double value)
Find all tetrahedra that have an intersection with the level surface
with given value of a given function.
|
static java.util.Vector |
grepValue(PgTetraSet tetra,
PuFunction function,
double value)
Find all tetrahedra that have an intersection with the level surface
with given value of a given function.
|
void |
init()
Initialization.
|
static void |
intersect(PgTetraSet tetra,
PgElementSet surface,
PuFunction func)
Scans the tetrahedron of the geometry for intersections with the zero surface of the passed function.
|
static void |
intersect(PgTetraSet tetra,
PgElementSet surface,
PuFunction func,
double levelValue)
Scan all tetrahedra of the geometry for intersections with a level surface of the passed function.
|
static PgTetraSet |
intersectTetraSet(PgTetraSet tetraSet,
PgTetraSet partTetraSet,
PdVector scalarData,
double levelValue,
boolean bPositive)
Compute a PgTetraSet showing the lower or upper part of the workshop's PgTetraSet, evaluated by scalar data.
|
static PgTetraSet |
intersectTetraSet(PgTetraSet tetraSet,
PgTetraSet partTetraSet,
PuFunction function,
double levelValue,
boolean bPositive)
Compute a PgTetraSet showing the lower or upper part of the workshop's PgTetraSet, evaluated by the function.
|
static boolean |
is3Dim(double[][] vertex)
Checks if four vertices span a three dimensional volume.
|
static void |
makeBoundary(PgTetraSet tetraSet)
Compute the boundary connectivity.
|
static PiVector[] |
makeBoundaryFaces(PgTetraSet tetraSet)
Compute list of boundary triangles, keep original vertex indices.
|
static PdVector |
makeFaceNormal(PgTetraSet geom,
int tet,
int locFaceInd)
Compute the normal on a face of a given tetrahedron.
|
int |
removeNonIntersectingTetrahedra(boolean bRemovePositive)
Remove tetrahedra not intersecting the level set.
|
static int |
removeNonIntersectingTetrahedra(PgTetraSet tetraSet,
PuFunction function,
double levelValue,
boolean bRemovePositive) |
void |
rivaraRefine()
In the workshop's PgTetraSet refine all tetrahedra intersected by the level surface.
|
void |
setGeometry(PgGeometry geom)
Set the geometry to work on.
|
void |
setInputType(int inputType)
Define the kind of data for computing level surfaces.
|
void |
setLevelValue(double value)
Set level value.
|
void |
setScalarData(PdVector scalarData)
Set Scalar Data per PgTetraSet Vertex.
|
static PiVector |
splitNonManifoldVertices(PgTetraSet geom)
Search for vertices with more than one coherent link of adjacent elements and disconnect
those to good discrete manifold vertices, each belonging to one of the element links.
|
static void |
testEdgeStars(PgTetraSet tetraSet)
Test ComputeEdgeStar method.
|
static void |
testVertexStars(PgTetraSet tetraSet)
Test PgTetraVertexSTar.makeVertexStar method.
|
static void |
unfoldByTexture(PgTetraSet geom)
Copies texture coordinates into vertex coordinates.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, reset, setDisplay, setDisplays, setModal, setMode, setStandalone, setViewer
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 final int INPUT_FUNCTION
public static final int INPUT_SCALAR_DATA
public int m_inputType
public void init()
init
in class PjWorkshop
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public PgElementSet getSurface()
public void setGeometry(PgGeometry geom)
setGeometry
in interface PjWorkshopIf
setGeometry
in class PjWorkshop
geom
- the workshop modifies this geometry.public void setInputType(int inputType)
public int getInputType()
public void setScalarData(PdVector scalarData)
public PdVector getScalarData()
public void setLevelValue(double value)
public double getLevelValue()
public void getPositiveTetraSet()
public void getNegativeTetraSet()
public PgElementSet computeLevelSurface()
public void globalRefine()
public void rivaraRefine()
public void colorVertices()
public static java.util.Vector grepValue(PgTetraSet tetra, PuFunction function, double value)
tetra
- A PgTetraSet
to scan.value
- A double
with the wanted value.Vector
with the indices of the matching tetrahedra.public static java.util.Vector grepValue(PgTetraSet tetra, PdVector scalarData, double value)
tetra
- A PgTetraSet
to scan.value
- A double
with the wanted value.Vector
with the indices of the matching tetrahedra.public static PgElementSet getLevelSurface(PgTetraSet tetraSet, PgElementSet surface, PuFunction function, double levelValue)
tetraSet
- A PgTetraSet
to be scanned.surface
- A PgElementSet
that gets the intersection (may be null).function
- A PuFunction
to be used.levelValue
- A level value
to be used.public static PgElementSet getLevelSurface(PgTetraSet tetraSet, PgElementSet surface, PdVector scalarData, double levelValue)
tetraSet
- A PgTetraSet
to be scanned.surface
- A PgElementSet
that gets the intersection (may be null).scalarData
- A PdVector
to be used.levelValue
- A level value
to be used.public static PgTetraSet intersectTetraSet(PgTetraSet tetraSet, PgTetraSet partTetraSet, PuFunction function, double levelValue, boolean bPositive)
public static PgTetraSet intersectTetraSet(PgTetraSet tetraSet, PgTetraSet partTetraSet, PdVector scalarData, double levelValue, boolean bPositive)
public static void intersect(PgTetraSet tetra, PgElementSet surface, PuFunction func)
tetra
- A PgTetraSet
to be scanned.surface
- A PgElementSet
that gets the intersection.func
- A PuFunction
to be used.public static void intersect(PgTetraSet tetra, PgElementSet surface, PuFunction func, double levelValue)
tetra
- A PgTetraSet
to be scanned.surface
- A PgElementSet
that gets the intersection.func
- A PuFunction
to be used.levelValue
- value for level surface.public static boolean is3Dim(double[][] vertex)
vertex
- A double[][]
with the vertices coordinates.boolean
indicating if spanned volume is three dimensional.public int removeNonIntersectingTetrahedra(boolean bRemovePositive)
bRemovePositive
- Flag to remove strict positive or strict negative tetrahedra.public static int removeNonIntersectingTetrahedra(PgTetraSet tetraSet, PuFunction function, double levelValue, boolean bRemovePositive)
public static float[] colorVertices(PgPointSet geom, float[] data)
geom
- A PgPointSet
with the geometry to color.data
- A PdVector[]
with the data sets.float[]
with the minimum and maximum.public static void makeBoundary(PgTetraSet tetraSet)
public static PiVector[] makeBoundaryFaces(PgTetraSet tetraSet)
public PiVector[] getTetToBndIndices(PgBndElementSet bnd)
public static PgElementSet convertToElementSet(PgTetraSet tetraSet)
public static void addTestVectorField(PgTetraSet tetraSet)
public static PgVectorField[] addTestFrameField(PgTetraSet tetraSet, boolean addFieldsToGeometry)
public static PgEdgeStar computeEdgeStar(PgTetraSet tetraSet, int tetIndex, int vertexIndex1, int vertexIndex2, PgEdgeStar edgeStar)
public static PgEdgeStar computeEdgeStar(PgTetraSet tetraSet, int tetIndex, int edgeIndex, PgEdgeStar edgeStar)
public static void testEdgeStars(PgTetraSet tetraSet)
public static int getLocalEdgeIndex(PgTetraSet tetraSet, int tetIndex, int vertexIndex1, int vertexIndex2)
public static boolean edgeStarIsClosed(PgTetraSet tetraSet, PgEdgeStar edgeStar)
computeEdgeStar
.public static void testVertexStars(PgTetraSet tetraSet)
public static void addTestTexture(PgTetraSet tetraSet)
tetraSet
- public static PgVectorField[] deriveTexture(PgTetraSet geom)
public static void unfoldByTexture(PgTetraSet geom)
public static PiVector splitNonManifoldVertices(PgTetraSet geom)
public static PgPolygonSet convertToPolygonSet(PgTetraSet geom)
public static PgElementSet convertFacesToElementSet(PgTetraSet geom)
public static PdVector getVertex(PdVector vertex, PgTetraSet geom, PdBary bary)
vertex
- Output vector for the coordinates of the point. May be null.geom
- Given tetra set.bary
- Barycentric coordinates. Must be of dimension 4.public static PdVector makeFaceNormal(PgTetraSet geom, int tet, int locFaceInd)
geom
- Tetra set.tet
- Index of a tetrahedron.locFaceInd
- Local index of a face in tet."