Woolz Image Processing
Version 1.7.5
|
Files | |
file | WlzGeometryTrackUpAndDown_s.c |
Tracks contours forming surface patches. | |
file | WlzGeoModel.c |
Basic operators for manipulating Woolz geometric models. These can be either planar graphs or 3D surfaces, with the surfaces being either manifold or non-manifold. | |
file | WlzGeoModelCellGridWSp.c |
Functions to create and free geometric models cell grid work spaces. | |
file | WlzGeoModelCut.c |
Functions to cut geometric models (GM's). | |
file | WlzGeoModelFilters.c |
Filters for geometric models (GM's). | |
Data Structures | |
union | _WlzGMElemP |
A union of pointers to all the valid geometric model elements. Typedef: WlzGMElemP. More... | |
struct | _WlzGMCore |
The core geometric model element from which all geometric modeling elements inherit the type and index fields. Typedef: WlzGMCore. More... | |
struct | _WlzGMVertexG2I |
The position of a point in 2D integer space. Typedef: WlzGMVertexG2I. More... | |
struct | _WlzGMVertexG2D |
The position of a point in 2D double precision space. Typedef: WlzGMVertexG2D. More... | |
struct | _WlzGMVertexG2N |
The position of a point in 2D double precision space and the normal vector at that point. Note that the data structure is the same as WlzGMVertexG2D until the normal, this is important as it allows the type, index and position to be established without knowing whether the vertex geometry is WlzGMVertexG2D or WlzGMVertexG2N. Typedef: WlzGMVertexG2N. More... | |
struct | _WlzGMVertexG3I |
The position of a point in 3D integer space. Typedef: WlzGMVertexG3I. More... | |
struct | _WlzGMVertexG3D |
The position of a point in 3D double precision space. Typedef: WlzGMVertexG3D. More... | |
struct | _WlzGMVertexG3N |
The position of a point in 3D double precision space and the normal vector at that point. Note that the data structure is the same as WlzGMVertexG3D until the normal, this is important as it allows the type, index and position to be established without knowing whether the vertex geometry is WlzGMVertexG3D or WlzGMVertexG3N. Typedef: WlzGMVertexG3N. More... | |
union | _WlzGMVertexGU |
A union of pointers to the geometric properties of a point. Typedef: WlzGMVertexGU. More... | |
struct | _WlzGMVertexT |
The topological properties of a point in space. The ordering of the linked list of vertex topology elements formed by the 'next' and 'prev' pointers is not significant. Typedef: WlzGMVertexT. More... | |
struct | _WlzGMVertex |
A single point in space defined in terms of both it's geometry and it's topology. Typedef: WlzGMVertex. More... | |
struct | _WlzGMDiskT |
A topological disk around a vertex. In 2D or 3D manifold there is one disk per vertex. But in a 3D non-manifold shell many sheets (manifold surfaces components) may be connected at a single vertex, in which case there is one disk per sheet. The disk encodes the radial order of the vertex topology elements around the vertex. Typedef: WlzGMDiskT. More... | |
struct | _WlzGMEdgeT |
The topological properties of a directed edge. Typedef: WlzGMEdgeT. More... | |
struct | _WlzGMEdge |
A line or curve between a pair of vertices. Although this only has a topological component a geometric component would allow curves to be represented. Typedef: WlzGMEdge. More... | |
struct | _WlzGMLoopT |
A directed loop or the topological properties of a loop. Typedef: WlzGMLoopT. More... | |
struct | _WlzGMFace |
A circuit of edges. Typedef: WlzGMFace. More... | |
struct | _WlzGMShellG2I |
The geometric properties of a shell in 2D integer space. Typedef: WlzGMShellG2I. More... | |
struct | _WlzGMShellG2D |
The geometric properties of a shell in 2D double precision space. Typedef: WlzGMShellG2D. More... | |
struct | _WlzGMShellG3I |
The geometric properties of a shell in 3D integer space. Typedef: WlzGMShellG3I. More... | |
struct | _WlzGMShellG3D |
The geometric properties of a shell in 3D double precision. space. Typedef: WlzGMShellG3D. More... | |
union | _WlzGMShellGU |
A union of pointers to the geometric properties of a shell. Typedef: WlzGMShellGU. More... | |
struct | _WlzGMShell |
A shell which is a collection of connected geometric modeling elements. Typedef: WlzGMShell. More... | |
struct | _WlzGMResource |
A resource vector (extensible array) used for allocating geometric modeling elements. Typedef: WlzGMResource. More... | |
struct | _WlzGMModelR |
The resources used by a model. Typedef: WlzGMModelR. More... | |
struct | _WlzGMModel |
A geometric model which can represent both 2D graphs and 3D surfaces, with the surfaces being either manifold or non-manifold. The geometric model inherits it's core fields from the Woolz core domain. Typedef: WlzGMModel. More... | |
struct | _WlzGMCbEntry |
struct | _WlzGMResIdx |
A resource index look up table (WlzGMResIdxTb). The array of indicies is a look up table from the indicies of a GM to contigous indicies suitable for copying or outputing a resource vector without holes. Typedef: WlzGMResIdx. More... | |
struct | _WlzGMResIdxTb |
Resource look up tables for all geometric elements in a model. Typedef: WlzGMResIdxTb. More... | |
struct | _WlzGMGridWSpCell3D |
A single cell entry in an axis aligned grid for a 3D model. Typedef: WlzGMGridWSpCell3D. More... | |
struct | _WlzGMGridWSp3D |
An axis aligned grid of cuboid cells. This has an array (the grid) of linked lists of cells, with the entries in each list holding the faces of the 3D model which intersect the cuboid of the cell. Typedef: WlzGMGridWSp3D. More... | |
Macros | |
#define | WLZ_GM_TOLERANCE (1.0e-06) |
Tolerance for geometric queries in geometric models. More... | |
#define | WLZ_GM_TOLERANCE_SQ (WLZ_GM_TOLERANCE * WLZ_GM_TOLERANCE) |
Square of tolerance for geometric queries in geometric models. More... | |
Typedefs | |
typedef void(* | WlzGMCbFn) (WlzGMModel *, WlzGMElemP, WlzGMCbReason, void *) |
A pointer function to a function called when elements of a Woolz geometric model are either created or deleted. More... | |
Functions | |
WlzErrorNum | WlzGMModelAddResCb (WlzGMModel *model, WlzGMCbFn fn, void *data) |
Add a resource allocation callback to the models resources. More... | |
void | WlzGMModelRemResCb (WlzGMModel *model, WlzGMCbFn fn, void *data) |
Removes a resource allocation callback from the models resources. Both the callback function and callback data must have the same values as when the callback was added since they are used to find the corresponding callback entry. More... | |
WlzGMModel * | WlzGMModelNew (WlzGMModelType modType, int blkSz, int vHTSz, WlzErrorNum *dstErr) |
Creates an empty non-manifold geometry model. More... | |
WlzGMShell * | WlzGMModelNewS (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates an empty shell with a shell geometry element for the model. More... | |
WlzGMFace * | WlzGMModelNewF (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates an empty face. More... | |
WlzGMLoopT * | WlzGMModelNewLT (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates a loop topology element. More... | |
WlzGMEdge * | WlzGMModelNewE (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates a new edge. The edge geometry element only has it's index set to a meaningful value. More... | |
WlzGMEdgeT * | WlzGMModelNewET (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates a new edge topology element. More... | |
WlzGMVertex * | WlzGMModelNewV (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates a new vertex and a vertex geometry element. The vertex geometry element only has it's index set to a meaningful value. More... | |
WlzGMVertexT * | WlzGMModelNewVT (WlzGMModel *model, WlzErrorNum *dstErr) |
Creates a new vertex topology element. More... | |
WlzGMModel * | WlzGMModelNewFromS (WlzGMShell *gS, WlzErrorNum *dstErr) |
Creates a new model from the given shell. The new model contains a copy of the given shell. More... | |
WlzGMModel * | WlzGMModelCopy (WlzGMModel *gM, WlzErrorNum *dstErr) |
Copies the given model. Because all unused elements are squeezed out, the indicies of the elements may not be equal in the two models. More... | |
WlzErrorNum | WlzGMModelFree (WlzGMModel *model) |
Free's a geometric model and it's elements. More... | |
WlzErrorNum | WlzGMModelFreeS (WlzGMModel *model, WlzGMShell *shell) |
Marks a shell and it's geometry as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeF (WlzGMModel *model, WlzGMFace *face) |
Marks a face as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeLT (WlzGMModel *model, WlzGMLoopT *loopT) |
Marks a loop topology as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeDT (WlzGMModel *model, WlzGMDiskT *diskT) |
Marks an disk topology as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeE (WlzGMModel *model, WlzGMEdge *edge) |
Marks an edge as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeET (WlzGMModel *model, WlzGMEdgeT *edgeT) |
Marks an edge topology as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelFreeV (WlzGMModel *model, WlzGMVertex *vertex) |
Marks a vertex and it's geometry as invalid and suitable for reclaiming. Watch out that vertices remain in the hash table after being free'd. More... | |
WlzErrorNum | WlzGMModelFreeVT (WlzGMModel *model, WlzGMVertexT *vertexT) |
Marks a vertex topology as invalid and suitable for reclaiming. More... | |
WlzErrorNum | WlzGMModelDeleteS (WlzGMModel *model, WlzGMShell *dS) |
Deletes a shell by unlinking it and then freeing it and all it's children. More... | |
WlzErrorNum | WlzGMModelDeleteV (WlzGMModel *model, WlzGMVertex *dV) |
Deletes a vertex along with all the elements which depend on it. All elements which depend on the vertex are unlinked and then freed. If the vertex's parents were to depend only on the vertex then they would be free'd too as the Woolz geometric models can not hold an isolated vertex. The basic algorithm used is: Build a collection of edges which use the vertex and then delete all edges in the collection. If there are no edges (in the collection) then just unlink and free the vertex. The geometries of the existing and new shells will be valid on return. More... | |
int | WlzGMModelGetDimension (WlzGMModel *model, WlzErrorNum *dstErr) |
Gets the models dimension from the model's type. More... | |
WlzErrorNum | WlzGMModelTypeValid (WlzGMModelType type) |
Checks the model type is valid. More... | |
WlzGMResource * | WlzGMModelGetRes (WlzGMModel *model, WlzGMElemType elemType, WlzErrorNum *dstErr) |
Gets the resources for the given element type in the given model. More... | |
WlzGMElemType | WlzGMModelGetSGeomType (WlzGMModel *model) |
Gets the shell's geometry type from the model's type. More... | |
WlzGMElemType | WlzGMModelGetVGeomType (WlzGMModel *model) |
Gets the verticies geometry type from the model's type. More... | |
WlzErrorNum | WlzGMShellGetGBB3D (WlzGMShell *shell, WlzDBox3 *bBox) |
Gets a shell's geometry using the given destination pointer to a double precision bounding box. More... | |
WlzErrorNum | WlzGMShellGetGBBV3D (WlzGMShell *shell, double *vol) |
Gets the volume of the shell's geometry's bounding box. More... | |
WlzErrorNum | WlzGMShellGetGBB2D (WlzGMShell *shell, WlzDBox2 *bBox) |
Gets a shell's geometry using the given destination pointer to a double precision bounding box. More... | |
WlzErrorNum | WlzGMShellSetGBB3D (WlzGMShell *shell, WlzDBox3 bBox) |
Sets a shell's geometry using the given double precision bounding box. More... | |
WlzErrorNum | WlzGMShellSetGBB2D (WlzGMShell *shell, WlzDBox2 bBox) |
Sets a shell's geometry using the given double precision bounding box. More... | |
WlzErrorNum | WlzGMShellSetG3D (WlzGMShell *shell, int nPnt, WlzDVertex3 *pos) |
Sets a shell's geometry using the pair of double precision points. More... | |
WlzErrorNum | WlzGMShellSetG2D (WlzGMShell *shell, int nPnt, WlzDVertex2 *pos) |
Sets a shell's geometry using the pair of double precision points. More... | |
WlzErrorNum | WlzGMModelSetSG (WlzGMModel *model) |
Sets the geometry of each of the shells in the given model. More... | |
WlzErrorNum | WlzGMShellUpdateG3D (WlzGMShell *shell, WlzDVertex3 pos) |
Updates a shell's geometry using the given double precision position. More... | |
WlzErrorNum | WlzGMShellUpdateG2D (WlzGMShell *shell, WlzDVertex2 pos) |
Updates a shell's geometry using the new given double precision position. More... | |
WlzErrorNum | WlzGMShellUpdateGBB3D (WlzGMShell *shell, WlzDBox3 bBox) |
Updates a shell's geometry using the given double precision position bounding box. The updated geometry is the union of the existing geometry and the given bounding box. More... | |
WlzErrorNum | WlzGMShellUpdateGBB2D (WlzGMShell *shell, WlzDBox2 bBox) |
Updates a shell's geometry using the given double precision position bounding box. The updated geometry is the union of the existing geometry and the given bounding box. More... | |
WlzErrorNum | WlzGMShellDndateG2D (WlzGMShell *shell, WlzDVertex2 pos) |
Updates the shell's geometry for the removed vertex with the given position. More... | |
WlzErrorNum | WlzGMShellDndateG3D (WlzGMShell *shell, WlzDVertex3 pos) |
Updates the shell's geometry for the removed vertex with the given position. More... | |
WlzErrorNum | WlzGMShellComputeGBB (WlzGMShell *shell) |
Recomputes the shell's geometry by walking through it's children. More... | |
int | WlzGMShellGInBB3D (WlzGMShell *shell, WlzDVertex3 pos) |
Checks to see if the given double precision position is within the shell's bounding box. More... | |
int | WlzGMShellGInBB2D (WlzGMShell *shell, WlzDVertex2 pos) |
Checks to see if the given double precision position is within the shell's bounding box. More... | |
WlzErrorNum | WlzGMVertexSetG2D (WlzGMVertex *vertex, WlzDVertex2 pos) |
Sets a vertex geometry using the given double precision position. More... | |
WlzErrorNum | WlzGMVertexSetG2N (WlzGMVertex *vertex, WlzDVertex2 pos, WlzDVertex2 nrm) |
Sets a vertex geometry using the given double precision position and normal. More... | |
WlzErrorNum | WlzGMVertexSetG3D (WlzGMVertex *vertex, WlzDVertex3 pos) |
Sets a vertex geometry using the given double precision position. More... | |
WlzErrorNum | WlzGMVertexSetG3N (WlzGMVertex *vertex, WlzDVertex3 pos, WlzDVertex3 nrm) |
Sets a vertex geometry using the given double precision position and normal. More... | |
WlzErrorNum | WlzGMVertexGetG3D (WlzGMVertex *vertex, WlzDVertex3 *dstPos) |
Gets a veticies geometry into the given double precision position destination pointer. More... | |
WlzErrorNum | WlzGMVertexGetG3N (WlzGMVertex *vertex, WlzDVertex3 *dstPos, WlzDVertex3 *dstNrm) |
Gets a vertex geometry into the given double precision position and normaldestination pointers. If the model vertex geometry does not have normals then the normal will be {0,0,0}, the zero vector. More... | |
WlzErrorNum | WlzGMVertexGetG2D (WlzGMVertex *vertex, WlzDVertex2 *dstPos) |
Gets a veticies geometry into the given double precision position destination pointer. More... | |
WlzErrorNum | WlzGMVertexGetG2N (WlzGMVertex *vertex, WlzDVertex2 *dstPos, WlzDVertex2 *dstNrm) |
Gets a vertex geometry into the given double precision position and normal destination pointers. If the model vertex geometry does not have normals then the normal will be {0,0}, the zero vector. More... | |
WlzDVertex3 | WlzGMVertexCmp3D (WlzGMVertex *vertex, WlzDVertex3 pos) |
Compares the position of the given vertex with the given 3D double precision position. More... | |
WlzDVertex2 | WlzGMVertexCmp2D (WlzGMVertex *vertex, WlzDVertex2 pos) |
Compares the position of the given vertex with the given 2D double precision position. More... | |
int | WlzGMVertexCmpSign2D (WlzGMVertex *vertex, WlzDVertex2 pos) |
Compares the coordinates of the given vertex and 2D double precision position to find a signed value for sorting. More... | |
int | WlzGMVertexCmpSign3D (WlzGMVertex *vertex, WlzDVertex3 pos) |
Compares the coordinates of the given vertex and 3D double precision position to find a signed value for sorting. More... | |
double | WlzGMVertexDistSq3D (WlzGMVertex *vertex, WlzDVertex3 pos) |
Calculates the square of the Euclidean distance between the given vertex and the given 3D double precision position. More... | |
WlzDVertex3 | WlzGMVertexNormal3D (WlzGMModel *dummy, WlzGMVertex *gV, int *sVBufSz, WlzGMVertex ***sVBuf, WlzErrorNum *dstErr) |
Computes the value of the normal at the given vertex which lies within the given model. This function requires a buffer in which to store the vertices found on the loops surrounding the given vertex. For efficiency this can/should be reused between calls of this function. More... | |
double | WlzGMVertexDistSq2D (WlzGMVertex *vertex, WlzDVertex2 pos) |
Calculates the square of the Euclidean distance between the given vertex and the given 2D double precision position. More... | |
WlzErrorNum | WlzGMFaceGetG3D (WlzGMFace *face, WlzDVertex3 *dstPos0, WlzDVertex3 *dstPos1, WlzDVertex3 *dstPos2) |
Gets the geometry of a face. More... | |
WlzGMVertex * | WlzGMModelMatchVertexG3D (WlzGMModel *model, WlzDVertex3 gPos) |
Attempts to find a vertex which matches the given double precision 3D position. More... | |
WlzGMVertex * | WlzGMModelMatchVertexG2D (WlzGMModel *model, WlzDVertex2 gPos) |
Attempts to find a vertex which matches the given double precision 2D position. More... | |
double | WlzGMVertexShellDist (WlzGMVertex *v0, WlzGMVertex *v1, double maxDist, WlzErrorNum *dstErr) |
Computes the minimum distance between the two vertices where the path between them is constrained to the common shell, this will be negative if the two vertices are in different shells. More... | |
WlzErrorNum | WlzGMVerifyModel (WlzGMModel *model, WlzGMElemP *dstElmP) |
Verifies the given model. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging. More... | |
WlzErrorNum | WlzGMVerifyShell (WlzGMShell *shell, WlzGMElemP *dstElmP) |
Verifies the given shell. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging. More... | |
WlzErrorNum | WlzGMVerifyLoopT (WlzGMLoopT *loopT, WlzGMElemP *dstElmP) |
Verifies the given loop topology element. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging. More... | |
WlzGMEdge ** | WlzGMModelFindNMEdges (WlzGMModel *model, int *dstNMCnt, WlzErrorNum *dstErr) |
Finds a loop topology element in common for the two edge topology elements. More... | |
WlzGMLoopT * | WlzGMEdgeTCommonLoopT (WlzGMEdgeT *eT0, WlzGMEdgeT *eT1) |
Finds a loop topology element in common for the two edge topology elements. More... | |
WlzGMEdge * | WlzGMVertexCommonEdge (WlzGMVertex *eV0, WlzGMVertex *eV1) |
Finds the edge common to the two given verticies. More... | |
WlzGMShell * | WlzGMVertexCommonShell (WlzGMVertex *eV0, WlzGMVertex *eV1) |
Finds the shell common to the two given verticies. More... | |
WlzGMShell * | WlzGMVertexGetShell (WlzGMVertex *eV) |
Finds the parent shell of the given vertex. More... | |
WlzGMShell * | WlzGMEdgeGetShell (WlzGMEdge *eE) |
Finds the parent shell of the given edge. More... | |
WlzGMVertex * | WlzGMEdgeCommonVertex (WlzGMEdge *eE0, WlzGMEdge *eE1) |
Finds the common vertex of the two given edges. More... | |
WlzGMVertex * | WlzGMEdgeCommonVertexGetDiskTs (WlzGMEdge *eE0, WlzGMEdge *eE1, WlzGMDiskT **dstDT0, WlzGMDiskT **dstDT1) |
Finds the common vertex of the two given edges and sets the disk topology element destination pointers if there is a common vertex. NULL*. More... | |
WlzGMDiskT * | WlzGMEdgeCommonDiskT (WlzGMEdge *eE0, WlzGMEdge *eE1) |
Finds the common disk topology element of the two given edges. More... | |
void | WlzGMVertexTAppend (WlzGMVertexT *eVT, WlzGMVertexT *nVT) |
Append new vertex topology element onto a doubly linked list of vertex topology element's, knowing that neither is NULL. Vertex topology elements are maintained in an unordered doubly linked list. More... | |
void | WlzGMDiskTAppend (WlzGMDiskT *eDT, WlzGMDiskT *nDT) |
Append new edge topology onto a doubly linked list of disk topology element's, knowing that neither is NULL. Disk topology elements are maintained in an unordered doubly linked list. More... | |
void | WlzGMEdgeTAppend (WlzGMEdgeT *eET, WlzGMEdgeT *nET) |
Append new edge topology onto a doubly linked list of edge topology element's, knowing that neither is NULL. Edge topology elements are maintained in an ordered doubly linked list, CCW around the inside of loops and CW around the outside of 2D loops. More... | |
void | WlzGMEdgeTInsert (WlzGMEdgeT *eET, WlzGMEdgeT *nET) |
Insert new edge topology into a doubly linked list of edge topology element's, knowing that neither is NULL. Edge topology elements are maintained in an ordered doubly linked list, CCW around the inside of loops and CW around the outside of 2D loops. More... | |
void | WlzGMEdgeTInsertRadial (WlzGMEdgeT *nET) |
Inserts the given new edge topology element into a radially sorted cyclic list of edge topology element's. More... | |
void | WlzGMLoopTAppend (WlzGMLoopT *eLT, WlzGMLoopT *nLT) |
Append new loop topology onto a doubly linked list of loop topology element's, knowing that neither is NULL. Loop topology elements are maintained in an unordered doubly linked list. More... | |
void | WlzGMLoopTUnlink (WlzGMLoopT *dLT) |
Unlinks the given loop topology element from a doubly linked list of loop topology element's, knowing that it is not NULL. If this is the only loop topology element in parent the parent's list of loop topology elements is set to NULL. Other elements which point to this loop topology element are not modified. More... | |
void | WlzGMEdgeTUnlink (WlzGMEdgeT *dET) |
Unlinks the given edge topology element from it's loop topology element and it's opposite edge topology element. The opposite edge topology element MUST be unlinked before the model is valid again. More... | |
void | WlzGMVertexTUnlink (WlzGMVertexT *dVT) |
Unlinks the given vertex topology element from a doubly linked list of vertex topology element's, knowing that it is not NULL. Since the parent of a vertex topology element is always an edge topology element and an edge topology element only ever uses a single vertex topology element, set the parent's vertex topology element pointer to NULL. More... | |
void | WlzGMDiskTUnlink (WlzGMDiskT *dDT) |
Unlinks the given disk topology element from a doubly linked list of disk topology element's, knowing that it is not NULL. If this is the only disk topology element of the vertex the vertex's list of disk topology elements is set to NULL. Other elements which point to this disk topology element are not modified. More... | |
void | WlzGMDiskTJoin (WlzGMDiskT *gDT0, WlzGMDiskT *gDT1) |
Joins the given pair of disk topology elements on return the first of the diskTs has all the vertexTs of both and the second of the diskTs should be free'd without being unlinked. More... | |
void | WlzGMShellAppend (WlzGMShell *eS, WlzGMShell *nS) |
Append new shell onto a doubly linked list of shells, knowing that neither is NULL. A model's shells are maintained in an unordered doubly linked list. More... | |
void | WlzGMShellUnlink (WlzGMShell *dS) |
Unlinks the given shell from a doubly linked list of shells kept by the model, knowing that the given shell ptr is not NULL. More... | |
void | WlzGMShellJoinAndUnlink (WlzGMShell *eShell, WlzGMShell *dShell) |
Joins the shell to be unlinked onto the shell that's to be extended and then unlinks (but does not free) it. Both shells must be valid. More... | |
WlzGMResIdxTb * | WlzGMModelResIdx (WlzGMModel *model, unsigned int eMsk, WlzErrorNum *dstErr) |
Makes an index look up table data structure for the given model. More... | |
void | WlzGMModelResIdxFree (WlzGMResIdxTb *resIdxTb) |
Frees a GM index look up table data structure. More... | |
WlzErrorNum | WlzGMModelRehashVHT (WlzGMModel *model, int vHTSz) |
Rehash the vertex matching hash table. More... | |
WlzErrorNum | WlzGMModelConstructS (WlzGMModel *cM, WlzGMShell *gS) |
Constructs a copy of the given shell in the current model. The curent model must be of the same type as the parent of the given shell and all the usual construction restrictions apply, see WlzGMModelConstructSimplex2D(). More... | |
WlzErrorNum | WlzGMModelConstructSimplex2D (WlzGMModel *model, WlzDVertex2 *pos) |
Constructs a 2D simplex (edge) defined by two double precision end points. Either of the two points may already exist within the model and the simplex must not intersect any existing simplex in the model. See WlzGMShellMatchVtxG2D() for the meaning of the backwards, forwards and distance search parameters. More... | |
WlzErrorNum | WlzGMModelConstructSimplex2N (WlzGMModel *model, WlzDVertex2 *pos, WlzDVertex2 *nrm) |
Constructs a 2D simplex (edge) defined by two double precision end points with normal components. Either of the two points may already exist within the model and the simplex must not intersect any existing simplex in the model. See WlzGMShellMatchVtxG2D() for the meaning of the backwards, forwards and distance search parameters. More... | |
WlzErrorNum | WlzGMModelConstructSimplex3D (WlzGMModel *model, WlzDVertex3 *pos) |
Constructs a 3D simplex (triangle) defined by three double precision verticies, any of which may already exist within the model. If a new face is created then the child loopT of that face will have edgeT's that use the given vertices in their given order. More... | |
WlzErrorNum | WlzGMModelConstructSimplex3N (WlzGMModel *model, WlzDVertex3 *pos, WlzDVertex3 *nrm) |
Constructs a 3D simplex (triangle) defined by three double precision verticies with normals, any of which may already exist within the model. If a new face is created then the child loopT of that face will have edgeT's that use the given vertices in their given order. More... | |
void | WlzGMModelRemVertex (WlzGMModel *model, WlzGMVertex *dV) |
Removes a vertex from the models vertex hash table. The vertex's geometry must have been set. More... | |
void | WlzGMModelAddVertexToHT (WlzGMModel *model, WlzGMVertex *nV) |
Adds a new vertex into the models vertex hash table. The vertex's geometry must have been set. More... | |
int | WlzGMShellSimplexCnt (WlzGMShell *shell) |
Counts the number of simplicies in the given shell. For 2D models the simplicies are edges and for 3D models they are loops. More... | |
WlzGMGridWSp3D * | WlzGeoModelGridWSpNew3D (WlzGMModel *model, WlzGMElemType elemType, WlzErrorNum *dstErr) |
Makes a new cell grid for the given elelemnt type in the given 3D model. See WlzGeoModelGridWSpSet3D(). More... | |
WlzErrorNum | WlzGeoModelGridWSpSet3D (WlzGMGridWSp3D *grid, WlzGMModel *model, WlzGMElemType elemType) |
Populates a 3D geometric model grid workspace from the given 3D model. Currently this function has only been implimented for when geometric models elements are faces all other types will result in and unimplimented error code. More... | |
WlzErrorNum | WlzGeoModelGridFree3D (WlzGMGridWSp3D *grid) |
Frees the given geometric model cell grid. More... | |
WlzIBox3 | WlzGeoModelGridCellsInDBox (WlzGMGridWSp3D *grid, WlzDBox3 dBox) |
Computes the box of grid cells which encloses the given double box. More... | |
WlzGMModel * | WlzGMModelCut (WlzGMModel *given, WlzGMModel *knife, WlzErrorNum *dstErr) |
Creates a new geometric model from the given model such that no elements of the given model which intersect with elements in the knife model are included. While this code seems to work for simple models errors have been seen with complex models. The code for this function and those static functions that it calls should be considered "under construction". More... | |
WlzGMModel * | WlzGMModelCutDom (WlzGMModel *given, WlzObject *knife, WlzErrorNum *dstErr) |
Creates a new geometric model from the given model such that no elements of the given model which intersect with elements in the knife domain are included. More... | |
WlzErrorNum | WlzGMFilterRmSmShells (WlzGMModel *model, int minSpx) |
Removes small shells from the given geometric model. More... | |
WlzErrorNum | WlzGMFilterGeomLP (WlzGMModel *model, double kPB, double kSB, double dPB, double dSB, int maxItr, int nonMan) |
Performs a low pass filtering operation on the geometry of the model, given the band pass and band stop filter parameters. These parameters specify the transfer function of the low pass filter. More... | |
WlzErrorNum | WlzGMFilterGeomLPParam (double *dstLambda, double *dstMu, int *dstNItr, double kPB, double kSB, double dPB, double dSB) |
Computes the values of \(\lambda\) and \(\mu\) from the given low pass filter parameters \(k_{PB}\), \(k_{SB}\), \(\delta_{PB}\) and \(\delta_{SB}\). Valid filter parameters require: \(0 < k_{PB} < 1\), \(k_{PB} < k_{SB} < 2\), \(0 < \delta_{PB} < 1\) and \(0 < \delta_{SB} < 1\). If the parameters are outside of these ranges an error is returned, but these constrants are not sufficient for a good filter. Design tips are don't make the transition band too narrow (keep \(k_{PB}\) away from \(k_{SB}\)) and don't make \(\delta_{PB}\) or \(\delta_{SB}\) too small (try values of 0.1 for \(\delta_{PB}\) and \(\delta_{SB}\)). Good values for \(k_{PB}\) are probably in the range \([0.01-0.1]\). The values of \(\lambda\) and \(\mu\) in the transfer function of the filter \[ f(k) = ((1 - {\lambda}k)(1 - {\mu}k))^N \] are constrained by: \[ 0 < N \] \[ 0 < \lambda < -\mu < 1 \] \[ \lambda < \frac{1}{k_{SB}} \] \[ \frac{1}{\lambda} + \frac{1}{\mu} = k_{PB} \] \[ {\left(\frac{{(\lambda - \mu)}^2} {-4\lambda\mu}\right)}^N < 1 + \delta_{PB} \] \[ {\left(\frac{1 - \lambda k_{SB}} {1 - \mu k_{SB}}\right)}^N < \delta_{SB} \] Following Taubin's fairing paper an additional constraint is imposed \(f(1) = -f(2)\), which allows a simple algebraic solution for \(\lambda\), \(\mu\). The value of \(N\) is then computed by taking the maximum of \(N_{PB}\) and \(N_{SB}\). So the algorithm used to compute the values of \(\lambda\), \(\mu\) and \(N\) is: \[ \lambda = \frac{1}{3 k_{PB} - 5} (k_{PB} - \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \] \[ \mu = \frac{1}{3 k_{PB} - 5} (k_{PB} + \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \] \[ N_{PB} = \frac{\ln{(1 + \delta_{PB})}} {\ln{({(\lambda - \mu)}^2 (-4 \lambda \mu))}} \] \[ N_{SB} = \frac{\ln{(\delta_{SB})}} {\ln{((1 - \lambda k_{SB})(1 - \mu k_{SB}))}} \] \[ N = \max{(N_{PB}, N_{SB})} \] . More... | |
WlzErrorNum | WlzGMFilterGeomLPLM (WlzGMModel *model, double lambda, double mu, int nItr, int nonMan) |
Given values of \(\lambda\), \(\mu\) and the number of itterations \(N\), applies a low pass filter to the geometry of the given model. More... | |
int | WlzGMModelSpxStats (WlzGMModel *model, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev, WlzErrorNum *dstErr) |
Calculates statistics of the simplices in the given geometric model. This can be useful for checking the quality of a given model. More... | |
#define WLZ_GM_TOLERANCE (1.0e-06) |
Tolerance for geometric queries in geometric models.
Referenced by WlzGMModelAddVertexToHT(), WlzGMModelMatchVertexG2D(), WlzGMModelMatchVertexG3D(), WlzGMModelRemVertex(), WlzGMShellDndateG2D(), WlzGMShellDndateG3D(), WlzGMVertexCmpSign2D(), and WlzGMVertexCmpSign3D().
#define WLZ_GM_TOLERANCE_SQ (WLZ_GM_TOLERANCE * WLZ_GM_TOLERANCE) |
Square of tolerance for geometric queries in geometric models.
Referenced by WlzGMModelConstructSimplex2N(), and WlzGMModelConstructSimplex3N().
WlzGMCbFn |
A pointer function to a function called when elements of a Woolz geometric model are either created or deleted.
enum _WlzGMModelType |
enum _WlzGMElemType |
Types of geometric model elements. Typedef: WlzGMElemType.
enum _WlzGMElemTypeFlags |
Bit masks for the types of geometric model elements. Typedef: WlzGMElemTypeFlags.
enum _WlzGMCbReason |
The reason a callback function is called. Typedef: WlzGMCbReason.
Enumerator | |
---|---|
WLZ_GMCB_NEW |
New element has been created. |
WLZ_GMCB_FREE |
Existing element is about to be free'd. |
enum _WlzLBTNodeFlags |
The reason a callback function is called. Typedef: WlzGMCbReason.
Enumerator | |
---|---|
WLZ_LBT_NODE_FLAG_NONE | |
WLZ_LBT_NODE_FLAG_BOUNDARY |
Node is adjacent to the objects boundary. |
WlzErrorNum WlzGMModelAddResCb | ( | WlzGMModel * | model, |
WlzGMCbFn | fn, | ||
void * | data | ||
) |
Add a resource allocation callback to the models resources.
model | The model. |
fn | The callback function. |
data | The callback data to be passed on to the callback function. |
References AlcMalloc(), _WlzGMModelR::callbacks, _WlzGMCbEntry::data, _WlzGMCbEntry::fn, _WlzGMCbEntry::next, _WlzGMModel::res, WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzMatchICPCtr().
void WlzGMModelRemResCb | ( | WlzGMModel * | model, |
WlzGMCbFn | fn, | ||
void * | data | ||
) |
Removes a resource allocation callback from the models resources. Both the callback function and callback data must have the same values as when the callback was added since they are used to find the corresponding callback entry.
model | The model. |
fn | The callback function. |
data | The callback data. |
References AlcFree(), _WlzGMModelR::callbacks, _WlzGMElemP::core, _WlzGMCbEntry::data, _WlzGMCbEntry::fn, _WlzGMCbEntry::next, and _WlzGMModel::res.
Referenced by WlzMatchICPCtr().
WlzGMModel* WlzGMModelNew | ( | WlzGMModelType | modType, |
int | blkSz, | ||
int | vHTSz, | ||
WlzErrorNum * | dstErr | ||
) |
Creates an empty non-manifold geometry model.
modType | Type of model to create. |
blkSz | Resource block size, used for allocating storage for model elements. A default size is used if <= 0. |
vHTSz | Vertex matching hash table size, A default size is used if <= 0. |
dstErr | Destination error pointer, may be null. |
References AlcCalloc(), AlcVectorNew(), _WlzGMModelR::diskT, _WlzGMModelR::edge, _WlzGMModelR::edgeT, _WlzGMModelR::face, _WlzGMModelR::loopT, _WlzGMModel::res, _WlzGMModelR::shell, _WlzGMModelR::shellG, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMModelR::vertex, _WlzGMModelR::vertexG, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, _WlzGMModelR::vertexT, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, and WlzGMModelFree().
Referenced by WlzCMeshFlatten2D5(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzContourRBFBndObj3D(), WlzEffReadObjObj(), WlzEffReadObjPly2(), WlzEffReadObjSMesh(), WlzEffReadObjStl(), WlzEffWritePointsVtkFieldValues(), WlzGetSectionFromGMModel(), WlzGMModelCopy(), WlzGMModelCut(), WlzGMModelCutDom(), WlzGMModelNewFromS(), WlzObjToConvexPolygon(), and WlzReadObj().
WlzGMShell* WlzGMModelNewS | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates an empty shell with a shell geometry element for the model.
model | The geometric model. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMCore::idx, _WlzGMShell::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMModelR::shell, _WlzGMModelR::shellG, _WlzGMCore::type, _WlzGMShell::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, WLZ_GMELM_SHELL, WlzGMModelFreeS(), and WlzGMModelGetSGeomType().
Referenced by WlzGMModelConstructS(), and WlzGMModelDeleteV().
WlzGMFace* WlzGMModelNewF | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates an empty face.
model | Parent model. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMElemP::face, _WlzGMModelR::face, _WlzGMFace::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMFace::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, and WLZ_GMELM_FACE.
Referenced by WlzGMModelConstructS().
WlzGMLoopT* WlzGMModelNewLT | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates a loop topology element.
model | Parent model. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMElemP::diskT, _WlzGMModelR::diskT, _WlzGMDiskT::idx, _WlzGMLoopT::idx, _WlzGMElemP::loopT, _WlzGMModelR::loopT, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMDiskT::type, _WlzGMLoopT::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, WLZ_GMELM_DISK_T, WLZ_GMELM_LOOP_T, and WlzGMModelFreeDT().
Referenced by WlzGMModelConstructS(), and WlzGMModelDeleteV().
WlzGMEdge* WlzGMModelNewE | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates a new edge. The edge geometry element only has it's index set to a meaningful value.
model | Model with resources. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMElemP::edge, _WlzGMModelR::edge, _WlzGMEdge::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMEdge::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, and WLZ_GMELM_EDGE.
Referenced by WlzGMModelConstructS().
WlzGMEdgeT* WlzGMModelNewET | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates a new edge topology element.
model | Model with resources. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMElemP::edgeT, _WlzGMModelR::edgeT, _WlzGMEdgeT::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMEdgeT::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, and WLZ_GMELM_EDGE_T.
Referenced by WlzGMModelConstructS().
WlzGMVertex* WlzGMModelNewV | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates a new vertex and a vertex geometry element. The vertex geometry element only has it's index set to a meaningful value.
model | Model with resources. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::idx, _WlzGMVertex::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMCore::type, _WlzGMVertex::type, _WlzGMResource::vec, _WlzGMElemP::vertex, _WlzGMModelR::vertex, _WlzGMModelR::vertexG, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, WLZ_GMELM_VERTEX, WlzGMModelFreeV(), and WlzGMModelGetVGeomType().
Referenced by WlzGMModelConstructSimplex2N(), and WlzGMModelConstructSimplex3N().
WlzGMVertexT* WlzGMModelNewVT | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Creates a new vertex topology element.
model | Model with resources. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), _WlzGMVertexT::idx, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMVertexT::type, _WlzGMResource::vec, _WlzGMElemP::vertexT, _WlzGMModelR::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMCB_NEW, and WLZ_GMELM_VERTEX_T.
Referenced by WlzGMModelConstructS().
WlzGMModel* WlzGMModelNewFromS | ( | WlzGMShell * | gS, |
WlzErrorNum * | dstErr | ||
) |
Creates a new model from the given shell. The new model contains a copy of the given shell.
gS | Given shell. |
dstErr | Destination error pointer, may be null. |
References _WlzGMShell::parent, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzGMModelConstructS(), and WlzGMModelNew().
Referenced by WlzMatchICPWeightMatches().
WlzGMModel* WlzGMModelCopy | ( | WlzGMModel * | gM, |
WlzErrorNum * | dstErr | ||
) |
Copies the given model. Because all unused elements are squeezed out, the indicies of the elements may not be equal in the two models.
gM | Given model. |
dstErr | Destination error pointer, may be null. |
References AlcVectorExtendAndGet(), AlcVectorItemGet(), _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShell::child, _WlzGMModel::child, _WlzGMElemP::core, _WlzGMVertexGU::core, _WlzGMShellGU::core, _WlzGMElemP::diskT, _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMModelR::diskT, _WlzGMResIdxTb::diskT, _WlzGMElemP::edge, _WlzGMEdgeT::edge, _WlzGMModelR::edge, _WlzGMResIdxTb::edge, _WlzGMElemP::edgeT, _WlzGMEdge::edgeT, _WlzGMLoopT::edgeT, _WlzGMModelR::edgeT, _WlzGMResIdxTb::edgeT, _WlzGMElemP::face, _WlzGMLoopT::face, _WlzGMModelR::face, _WlzGMResIdxTb::face, _WlzGMVertex::geo, _WlzGMShell::geo, _WlzGMCore::idx, _WlzGMVertexT::idx, _WlzGMVertex::idx, _WlzGMDiskT::idx, _WlzGMEdgeT::idx, _WlzGMEdge::idx, _WlzGMLoopT::idx, _WlzGMFace::idx, _WlzGMShell::idx, _WlzGMResIdx::idxLut, _WlzGMElemP::loopT, _WlzGMFace::loopT, _WlzGMModelR::loopT, _WlzGMResIdxTb::loopT, _WlzGMVertexT::next, _WlzGMVertex::next, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMShell::next, _WlzGMVertexG2N::nrm, _WlzGMVertexG3N::nrm, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMEdgeT::opp, _WlzGMLoopT::opp, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMShell::parent, _WlzGMVertexT::prev, _WlzGMDiskT::prev, _WlzGMEdgeT::prev, _WlzGMLoopT::prev, _WlzGMShell::prev, _WlzGMEdgeT::rad, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMModelR::shell, _WlzGMResIdxTb::shell, _WlzGMModelR::shellG, _WlzGMResIdxTb::shellG, _WlzGMElemP::shellG2D, _WlzGMElemP::shellG2I, _WlzGMElemP::shellG3D, _WlzGMElemP::shellG3I, _WlzGMCore::type, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMElemP::vertex, _WlzGMDiskT::vertex, _WlzGMModelR::vertex, _WlzGMResIdxTb::vertex, _WlzGMModelR::vertexG, _WlzGMResIdxTb::vertexG, _WlzGMElemP::vertexG2D, _WlzGMElemP::vertexG2I, _WlzGMElemP::vertexG2N, _WlzGMElemP::vertexG3D, _WlzGMElemP::vertexG3I, _WlzGMElemP::vertexG3N, _WlzGMElemP::vertexT, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, _WlzGMModelR::vertexT, _WlzGMResIdxTb::vertexT, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_GMELM_VERTEX, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, WLZ_GMELMFLG_DISK_T, WLZ_GMELMFLG_EDGE, WLZ_GMELMFLG_EDGE_T, WLZ_GMELMFLG_FACE, WLZ_GMELMFLG_LOOP_T, WLZ_GMELMFLG_SHELL, WLZ_GMELMFLG_SHELL_G, WLZ_GMELMFLG_VERTEX, WLZ_GMELMFLG_VERTEX_G, WLZ_GMELMFLG_VERTEX_T, WlzGMModelFree(), WlzGMModelGetDimension(), WlzGMModelNew(), WlzGMModelRehashVHT(), WlzGMModelResIdx(), and WlzGMModelResIdxFree().
Referenced by WlzAffineTransformGMModel(), WlzBasisFnTransformGMModel(), WlzCMeshTransformManyObjAsIdx(), and WlzCopyDomain().
WlzErrorNum WlzGMModelFree | ( | WlzGMModel * | model | ) |
Free's a geometric model and it's elements.
model | The shell to free. |
References AlcFree(), AlcVectorFree(), _WlzGMModelR::diskT, _WlzGMModelR::edge, _WlzGMModelR::edgeT, _WlzGMModelR::face, _WlzGMModelR::loopT, _WlzGMModel::res, _WlzGMModelR::shell, _WlzGMModelR::shellG, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMModelR::vertex, _WlzGMModelR::vertexG, _WlzGMModel::vertexHT, _WlzGMModelR::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, and WlzGMModelTypeValid().
Referenced by WlzCMeshFlatten2D5(), WlzEffReadObjObj(), WlzEffReadObjPly2(), WlzEffReadObjSMesh(), WlzEffReadObjStl(), WlzEffWritePointsVtkFieldValues(), WlzFreeContour(), WlzGetMaskedSectionFromObject(), WlzGetSectionFromGMModel(), WlzGMModelCopy(), WlzGMModelCut(), WlzGMModelCutDom(), WlzGMModelNew(), and WlzObjToConvexPolygon().
WlzErrorNum WlzGMModelFreeS | ( | WlzGMModel * | model, |
WlzGMShell * | shell | ||
) |
Marks a shell and it's geometry as invalid and suitable for reclaiming.
model | Model with resources. |
shell | Shell to free. |
References _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMCore::idx, _WlzGMShell::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMModelR::shell, _WlzGMModelR::shellG, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelConstructS(), WlzGMModelDeleteS(), and WlzGMModelNewS().
WlzErrorNum WlzGMModelFreeF | ( | WlzGMModel * | model, |
WlzGMFace * | face | ||
) |
Marks a face as invalid and suitable for reclaiming.
model | Model with resources. |
face | Face to free. |
References _WlzGMElemP::face, _WlzGMModelR::face, _WlzGMFace::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelDeleteS().
WlzErrorNum WlzGMModelFreeLT | ( | WlzGMModel * | model, |
WlzGMLoopT * | loopT | ||
) |
Marks a loop topology as invalid and suitable for reclaiming.
model | Model with resources. |
loopT | LoopT to free. |
References _WlzGMLoopT::idx, _WlzGMElemP::loopT, _WlzGMModelR::loopT, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelConstructS(), WlzGMModelDeleteS(), and WlzGMModelDeleteV().
WlzErrorNum WlzGMModelFreeDT | ( | WlzGMModel * | model, |
WlzGMDiskT * | diskT | ||
) |
Marks an disk topology as invalid and suitable for reclaiming.
model | Model with resources. |
diskT | DiskT to free. |
References _WlzGMElemP::diskT, _WlzGMModelR::diskT, _WlzGMDiskT::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelConstructS(), WlzGMModelDeleteS(), WlzGMModelDeleteV(), and WlzGMModelNewLT().
WlzErrorNum WlzGMModelFreeE | ( | WlzGMModel * | model, |
WlzGMEdge * | edge | ||
) |
Marks an edge as invalid and suitable for reclaiming.
model | Model with resources. |
edge | Edge to free. |
References _WlzGMElemP::edge, _WlzGMModelR::edge, _WlzGMEdge::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelDeleteS(), and WlzGMModelDeleteV().
WlzErrorNum WlzGMModelFreeET | ( | WlzGMModel * | model, |
WlzGMEdgeT * | edgeT | ||
) |
Marks an edge topology as invalid and suitable for reclaiming.
model | Model with resources. |
edgeT | EdgeT to free. |
References _WlzGMElemP::edgeT, _WlzGMModelR::edgeT, _WlzGMEdgeT::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelDeleteS(), and WlzGMModelDeleteV().
WlzErrorNum WlzGMModelFreeV | ( | WlzGMModel * | model, |
WlzGMVertex * | vertex | ||
) |
Marks a vertex and it's geometry as invalid and suitable for reclaiming. Watch out that vertices remain in the hash table after being free'd.
model | Model with resources. |
vertex | Vertex to free. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::idx, _WlzGMVertex::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, _WlzGMElemP::vertex, _WlzGMModelR::vertex, _WlzGMModelR::vertexG, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelDeleteS(), WlzGMModelDeleteV(), and WlzGMModelNewV().
WlzErrorNum WlzGMModelFreeVT | ( | WlzGMModel * | model, |
WlzGMVertexT * | vertexT | ||
) |
Marks a vertex topology as invalid and suitable for reclaiming.
model | Model with resources. |
vertexT | VertexT to free. |
References _WlzGMVertexT::idx, _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, _WlzGMElemP::vertexT, _WlzGMModelR::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_GMCB_FREE, and WlzGMModelTypeValid().
Referenced by WlzGMModelDeleteS(), and WlzGMModelDeleteV().
WlzErrorNum WlzGMModelDeleteS | ( | WlzGMModel * | model, |
WlzGMShell * | dS | ||
) |
Deletes a shell by unlinking it and then freeing it and all it's children.
model | Model with resources. |
dS | Shell to delete. |
References _WlzGMShell::child, _WlzGMVertexT::diskT, _WlzGMEdgeT::edge, _WlzGMLoopT::edgeT, _WlzGMLoopT::face, _WlzGMLoopT::idx, _WlzGMShell::idx, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, WLZ_ERR_NONE, WlzGMModelFreeDT(), WlzGMModelFreeE(), WlzGMModelFreeET(), WlzGMModelFreeF(), WlzGMModelFreeLT(), WlzGMModelFreeS(), WlzGMModelFreeV(), WlzGMModelFreeVT(), and WlzGMShellUnlink().
Referenced by WlzGeometryTrackUpAndDown_s(), WlzGMFilterRmSmShells(), WlzGMModelDeleteV(), WlzMatchICPCtr(), and WlzMatchICPWeightMatches().
WlzErrorNum WlzGMModelDeleteV | ( | WlzGMModel * | model, |
WlzGMVertex * | dV | ||
) |
Deletes a vertex along with all the elements which depend on it. All elements which depend on the vertex are unlinked and then freed. If the vertex's parents were to depend only on the vertex then they would be free'd too as the Woolz geometric models can not hold an isolated vertex. The basic algorithm used is: Build a collection of edges which use the vertex and then delete all edges in the collection. If there are no edges (in the collection) then just unlink and free the vertex. The geometries of the existing and new shells will be valid on return.
model | Model with resources. |
dV | The vertex to delete. |
References AlcFree(), AlcRealloc(), _WlzGMShell::child, _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMEdgeT::edge, _WlzGMEdge::edgeT, _WlzGMLoopT::edgeT, _WlzGMVertex::idx, _WlzGMVertexT::next, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMShell::next, _WlzGMEdgeT::opp, _WlzGMLoopT::opp, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMShell::parent, _WlzGMEdgeT::prev, _WlzGMLoopT::prev, _WlzGMShell::prev, _WlzGMDiskT::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WlzGMLoopTUnlink(), WlzGMModelDeleteE(), WlzGMModelDeleteS(), WlzGMModelFreeDT(), WlzGMModelFreeE(), WlzGMModelFreeET(), WlzGMModelFreeLT(), WlzGMModelFreeV(), WlzGMModelFreeVT(), WlzGMModelNewLT(), WlzGMModelNewS(), WlzGMShellAppend(), WlzGMShellComputeGBB(), WlzGMShellDndateG2D(), WlzGMVertexGetG2D(), and WlzGMVertexTUnlink().
Referenced by nrerror(), WlzGeometryTrackUpAndDown_s(), and WlzMatchICPWeightMatches().
int WlzGMModelGetDimension | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Gets the models dimension from the model's type.
model | The model. |
dstErr | Destination error pointer, may be null. |
References _WlzGMModel::type, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, and WLZ_GMMOD_3N.
Referenced by WlzAffineTransformGMShell(), WlzGMFilterGeomLPLM(), WlzGMModelConstructS(), WlzGMModelCopy(), WlzGMModelCutDom(), WlzGMModelResIdx(), WlzGMShellSimplexCnt(), and WlzGMVertexShellDist().
WlzErrorNum WlzGMModelTypeValid | ( | WlzGMModelType | type | ) |
Checks the model type is valid.
type | Model type to check. |
References WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, and WLZ_GMMOD_3N.
Referenced by WlzGMModelFree(), WlzGMModelFreeDT(), WlzGMModelFreeE(), WlzGMModelFreeET(), WlzGMModelFreeF(), WlzGMModelFreeLT(), WlzGMModelFreeS(), WlzGMModelFreeV(), WlzGMModelFreeVT(), and WlzGMVerifyModel().
WlzGMResource* WlzGMModelGetRes | ( | WlzGMModel * | model, |
WlzGMElemType | elemType, | ||
WlzErrorNum * | dstErr | ||
) |
Gets the resources for the given element type in the given model.
model | Given model. |
elemType | Given element type. |
dstErr | Destination error pointer, may be NULL. |
References _WlzGMModelR::diskT, _WlzGMModelR::edge, _WlzGMModelR::edgeT, _WlzGMModelR::face, _WlzGMModelR::loopT, _WlzGMModel::res, _WlzGMModelR::shell, _WlzGMModelR::shellG, _WlzGMModelR::vertex, _WlzGMModelR::vertexG, _WlzGMModelR::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_PARAM_TYPE, WLZ_GMELM_DISK_T, WLZ_GMELM_EDGE, WLZ_GMELM_EDGE_T, WLZ_GMELM_FACE, WLZ_GMELM_LOOP_T, WLZ_GMELM_SHELL, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_GMELM_VERTEX, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, and WLZ_GMELM_VERTEX_T.
Referenced by WlzGeoModelGridWSpNew3D(), and WlzGeoModelGridWSpSet3D().
WlzGMElemType WlzGMModelGetSGeomType | ( | WlzGMModel * | model | ) |
Gets the shell's geometry type from the model's type.
model | The model. |
References _WlzGMModel::type, WLZ_GMELM_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, and WLZ_GMMOD_3N.
Referenced by WlzGMModelNewS().
WlzGMElemType WlzGMModelGetVGeomType | ( | WlzGMModel * | model | ) |
Gets the verticies geometry type from the model's type.
model | The model. |
References _WlzGMModel::type, WLZ_GMELM_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, and WLZ_GMMOD_3N.
Referenced by WlzGMModelNewV().
WlzErrorNum WlzGMShellGetGBB3D | ( | WlzGMShell * | shell, |
WlzDBox3 * | bBox | ||
) |
Gets a shell's geometry using the given destination pointer to a double precision bounding box.
shell | Given shell with geometry to be set. |
bBox | Given destination pointer to a double precision bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzBoundingBoxGModel3D(), WlzGetSectionFromGMModel(), and WlzGMShellGetGBBV3D().
WlzErrorNum WlzGMShellGetGBBV3D | ( | WlzGMShell * | shell, |
double * | vol | ||
) |
Gets the volume of the shell's geometry's bounding box.
shell | Given shell with geometry to be set. |
vol | Given destination pointer for the volume. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WlzGMShellGetGBB3D(), _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
Referenced by WlzGMModelConstructS().
WlzErrorNum WlzGMShellGetGBB2D | ( | WlzGMShell * | shell, |
WlzDBox2 * | bBox | ||
) |
Gets a shell's geometry using the given destination pointer to a double precision bounding box.
shell | Given shell with geometry to be set. |
bBox | Given destination pointer to a double precision bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, and _WlzDBox3::yMin.
Referenced by WlzBoundingBoxGModel2D().
WlzErrorNum WlzGMShellSetGBB3D | ( | WlzGMShell * | shell, |
WlzDBox3 | bBox | ||
) |
Sets a shell's geometry using the given double precision bounding box.
shell | Given shell with geometry to be set. |
bBox | Given double precision bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_NINT, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGMShellSetG3D().
WlzErrorNum WlzGMShellSetGBB2D | ( | WlzGMShell * | shell, |
WlzDBox2 | bBox | ||
) |
Sets a shell's geometry using the given double precision bounding box.
shell | Given shell with geometry to be set. |
bBox | Given double precision bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_NINT, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGMShellSetG2D().
WlzErrorNum WlzGMShellSetG3D | ( | WlzGMShell * | shell, |
int | nPnt, | ||
WlzDVertex3 * | pos | ||
) |
Sets a shell's geometry using the pair of double precision points.
shell | Given shell with geometry to be set. |
nPnt | Number of points. |
pos | Array of points. |
References _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_NONE, WlzGMShellSetGBB3D(), _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
Referenced by WlzGMModelConstructS().
WlzErrorNum WlzGMShellSetG2D | ( | WlzGMShell * | shell, |
int | nPnt, | ||
WlzDVertex2 * | pos | ||
) |
Sets a shell's geometry using the pair of double precision points.
shell | Given shell with geometry to be set. |
nPnt | Number of points. |
pos | Array of points. |
References _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_ERR_NONE, WlzGMShellSetGBB2D(), _WlzDBox2::xMax, _WlzDBox2::xMin, _WlzDBox2::yMax, and _WlzDBox2::yMin.
Referenced by WlzGMModelConstructS().
WlzErrorNum WlzGMModelSetSG | ( | WlzGMModel * | model | ) |
Sets the geometry of each of the shells in the given model.
model | Given geometric model. |
References AlcVectorItemGet(), _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShell::child, _WlzGMModel::child, _WlzVertexP::d2, _WlzBoxP::d2, _WlzVertexP::d3, _WlzBoxP::d3, _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMLoopT::edgeT, _WlzGMVertex::geo, _WlzGMShell::geo, _WlzVertexP::i2, _WlzBoxP::i2, _WlzVertexP::i3, _WlzBoxP::i3, _WlzGMShell::next, _WlzGMResource::numElm, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMModel::res, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMDiskT::vertex, _WlzGMModelR::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGMFilterGeomLPLM().
WlzErrorNum WlzGMShellUpdateG3D | ( | WlzGMShell * | shell, |
WlzDVertex3 | pos | ||
) |
Updates a shell's geometry using the given double precision position.
shell | Given shell with geometry to be set. |
pos | Given position. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGMModelConstructS().
WlzErrorNum WlzGMShellUpdateG2D | ( | WlzGMShell * | shell, |
WlzDVertex2 | pos | ||
) |
Updates a shell's geometry using the new given double precision position.
shell | Given shell with geometry to be set. |
pos | Given new position. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, and _WlzDBox3::yMin.
Referenced by WlzGMModelConstructS().
WlzErrorNum WlzGMShellUpdateGBB3D | ( | WlzGMShell * | shell, |
WlzDBox3 | bBox | ||
) |
Updates a shell's geometry using the given double precision position bounding box. The updated geometry is the union of the existing geometry and the given bounding box.
shell | Given shell with geometry to be set. |
bBox | Given bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_NINT, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
WlzErrorNum WlzGMShellUpdateGBB2D | ( | WlzGMShell * | shell, |
WlzDBox2 | bBox | ||
) |
Updates a shell's geometry using the given double precision position bounding box. The updated geometry is the union of the existing geometry and the given bounding box.
shell | Given shell with geometry to be set. |
bBox | Given bounding box. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WLZ_NINT, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, and _WlzDBox3::yMin.
WlzErrorNum WlzGMShellDndateG2D | ( | WlzGMShell * | shell, |
WlzDVertex2 | pos | ||
) |
Updates the shell's geometry for the removed vertex with the given position.
shell | Given shell with geometry. |
pos | The removed vertex position. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMCore::type, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GM_TOLERANCE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WlzGMShellComputeGBB(), _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox2::yMin, and _WlzDBox2::yMin.
Referenced by WlzGMModelDeleteV().
WlzErrorNum WlzGMShellDndateG3D | ( | WlzGMShell * | shell, |
WlzDVertex3 | pos | ||
) |
Updates the shell's geometry for the removed vertex with the given position.
shell | Given shell with geometry. |
pos | The removed vertex position. |
References _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GM_TOLERANCE, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, WlzGMShellComputeGBB(), _WlzDBox3::xMax, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
WlzErrorNum WlzGMShellComputeGBB | ( | WlzGMShell * | shell | ) |
Recomputes the shell's geometry by walking through it's children.
shell | Given shell with geometry to be set. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShell::child, _WlzGMShellGU::core, _WlzGMVertexT::diskT, _WlzGMLoopT::edgeT, _WlzGMVertex::geo, _WlzGMShell::geo, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzBasisFnTransformGMModel(), WlzGMModelDeleteV(), WlzGMShellDndateG2D(), and WlzGMShellDndateG3D().
int WlzGMShellGInBB3D | ( | WlzGMShell * | shell, |
WlzDVertex3 | pos | ||
) |
Checks to see if the given double precision position is within the shell's bounding box.
shell | Given shell with geometry to be set. |
pos | Given double precision position. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
int WlzGMShellGInBB2D | ( | WlzGMShell * | shell, |
WlzDVertex2 | pos | ||
) |
Checks to see if the given double precision position is within the shell's bounding box.
shell | Given shell with geometry to be set. |
pos | Given double precision position. |
References _WlzGMShellG2I::bBox, _WlzGMShellG2D::bBox, _WlzGMShellG3I::bBox, _WlzGMShellG3D::bBox, _WlzGMShellGU::core, _WlzGMShell::geo, _WlzGMShellGU::sg2D, _WlzGMShellGU::sg2I, _WlzGMShellGU::sg3D, _WlzGMShellGU::sg3I, _WlzGMCore::type, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_GMELM_SHELL_G2D, WLZ_GMELM_SHELL_G2I, WLZ_GMELM_SHELL_G3D, WLZ_GMELM_SHELL_G3I, _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzIBox3::yMin, and _WlzDBox3::yMin.
WlzErrorNum WlzGMVertexSetG2D | ( | WlzGMVertex * | vertex, |
WlzDVertex2 | pos | ||
) |
Sets a vertex geometry using the given double precision position.
vertex | Given vertex with geometry to be set. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, and WLZ_NINT.
Referenced by WlzGMModelConstructSimplex2N().
WlzErrorNum WlzGMVertexSetG2N | ( | WlzGMVertex * | vertex, |
WlzDVertex2 | pos, | ||
WlzDVertex2 | nrm | ||
) |
Sets a vertex geometry using the given double precision position and normal.
vertex | Given vertex with geometry to be set. |
pos | Given position. |
nrm | Given normal. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMVertexG2N::nrm, _WlzGMVertexG3N::nrm, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg2N, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzGMVertexGU::vg3N, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, and WLZ_NINT.
Referenced by WlzGMModelConstructSimplex2N().
WlzErrorNum WlzGMVertexSetG3D | ( | WlzGMVertex * | vertex, |
WlzDVertex3 | pos | ||
) |
Sets a vertex geometry using the given double precision position.
vertex | Given vertex with geometry to be set. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, and WLZ_NINT.
Referenced by WlzGMModelConstructSimplex3N().
WlzErrorNum WlzGMVertexSetG3N | ( | WlzGMVertex * | vertex, |
WlzDVertex3 | pos, | ||
WlzDVertex3 | nrm | ||
) |
Sets a vertex geometry using the given double precision position and normal.
vertex | Given vertex with geometry to be set. |
pos | Given position. |
nrm | Given normal. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMVertexG2N::nrm, _WlzGMVertexG3N::nrm, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg2N, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzGMVertexGU::vg3N, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, WLZ_GMELM_VERTEX_G3N, and WLZ_NINT.
Referenced by WlzGMModelConstructSimplex3N().
WlzErrorNum WlzGMVertexGetG3D | ( | WlzGMVertex * | vertex, |
WlzDVertex3 * | dstPos | ||
) |
Gets a veticies geometry into the given double precision position destination pointer.
vertex | Given vertex with geometry to be set. |
dstPos | Given position destination pointer, may NOT be NULL. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
Referenced by WlzCentreOfMassVtx3D(), WlzCMeshFromGM(), WlzEffWriteObjObj(), WlzEffWriteObjPly2(), WlzEffWriteObjSMesh(), WlzEffWriteObjVtk(), WlzGetSectionFromGMModel(), WlzGMEdgeTInsertRadial(), WlzGMFaceGetG3D(), WlzGMModelAddVertexToHT(), WlzGMModelConstructS(), WlzGMModelRemVertex(), WlzGMModelSpxStats(), WlzGMVertexCmpSign3D(), and WlzGMVertexNormal3D().
WlzErrorNum WlzGMVertexGetG3N | ( | WlzGMVertex * | vertex, |
WlzDVertex3 * | dstPos, | ||
WlzDVertex3 * | dstNrm | ||
) |
Gets a vertex geometry into the given double precision position and normaldestination pointers. If the model vertex geometry does not have normals then the normal will be {0,0,0}, the zero vector.
vertex | Given vertex with geometry to be set. |
dstPos | Given position destination pointer, may NOT be NULL. |
dstNrm | Given normal destination pointer, may NOT be NULL. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMVertexG2N::nrm, _WlzGMVertexG3N::nrm, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg2N, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzGMVertexGU::vg3N, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
Referenced by WlzEffWriteObjObj(), and WlzEffWriteObjVtk().
WlzErrorNum WlzGMVertexGetG2D | ( | WlzGMVertex * | vertex, |
WlzDVertex2 * | dstPos | ||
) |
Gets a veticies geometry into the given double precision position destination pointer.
vertex | Given vertex with geometry to be set. |
dstPos | Given position destination pointer, may NOT be NULL. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
Referenced by WlzGMModelAddVertexToHT(), WlzGMModelConstructS(), WlzGMModelDeleteV(), WlzGMModelSpxStats(), WlzGMVertexCmpSign2D(), WlzGMVertexShellDist(), and WlzMatchICPWeightMatches().
WlzErrorNum WlzGMVertexGetG2N | ( | WlzGMVertex * | vertex, |
WlzDVertex2 * | dstPos, | ||
WlzDVertex2 * | dstNrm | ||
) |
Gets a vertex geometry into the given double precision position and normal destination pointers. If the model vertex geometry does not have normals then the normal will be {0,0}, the zero vector.
vertex | Given vertex with geometry to be set. |
dstPos | Given position destination pointer, may NOT be NULL. |
dstNrm | Given normal destination pointer, may NOT be NULL. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMVertexG2N::nrm, _WlzGMVertexG3N::nrm, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg2N, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzGMVertexGU::vg3N, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
Referenced by WlzGMModelConstructS().
WlzDVertex3 WlzGMVertexCmp3D | ( | WlzGMVertex * | vertex, |
WlzDVertex3 | pos | ||
) |
Compares the position of the given vertex with the given 3D double precision position.
vertex | Given vertex. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
WlzDVertex2 WlzGMVertexCmp2D | ( | WlzGMVertex * | vertex, |
WlzDVertex2 | pos | ||
) |
Compares the position of the given vertex with the given 2D double precision position.
vertex | Given vertex. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
int WlzGMVertexCmpSign2D | ( | WlzGMVertex * | vertex, |
WlzDVertex2 | pos | ||
) |
Compares the coordinates of the given vertex and 2D double precision position to find a signed value for sorting.
vertex | Given vertex. |
pos | Given position. |
References WLZ_GM_TOLERANCE, WlzGeomCmpVtx2D(), and WlzGMVertexGetG2D().
Referenced by WlzGMModelMatchVertexG2D().
int WlzGMVertexCmpSign3D | ( | WlzGMVertex * | vertex, |
WlzDVertex3 | pos | ||
) |
Compares the coordinates of the given vertex and 3D double precision position to find a signed value for sorting.
vertex | Given vertex. |
pos | Given position. |
References WLZ_GM_TOLERANCE, WlzGeomCmpVtx3D(), and WlzGMVertexGetG3D().
Referenced by WlzGMModelAddVertexToHT(), WlzGMModelMatchVertexG3D(), and WlzGMModelRemVertex().
double WlzGMVertexDistSq3D | ( | WlzGMVertex * | vertex, |
WlzDVertex3 | pos | ||
) |
Calculates the square of the Euclidean distance between the given vertex and the given 3D double precision position.
vertex | Given vertex. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
WlzDVertex3 WlzGMVertexNormal3D | ( | WlzGMModel * | dummy, |
WlzGMVertex * | gV, | ||
int * | sVBufSz, | ||
WlzGMVertex *** | sVBuf, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the value of the normal at the given vertex which lies within the given model. This function requires a buffer in which to store the vertices found on the loops surrounding the given vertex. For efficiency this can/should be reused between calls of this function.
dummy | Dummy model, unused. |
gV | Given vertex in the model. |
sVBufSz | Ptr to the number WlzGMVertex's that can be held in *sVBuf. |
sVBuf | Ptr to an allocated buffer for vertices, may NOT be NULL although the buffer it points to may be. The buffer should be free'd using AlcFree when it is no longer needed. |
dstErr | Destination error pointer, may be null. |
References AlcRealloc(), _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMDiskT::next, _WlzGMEdgeT::opp, _WlzGMVertexT::parent, _WlzGMEdgeT::prev, _WlzGMEdgeT::rad, _WlzGMDiskT::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_VTX_3_ADD, WLZ_VTX_3_SCALE, WlzGeomTriangleNormal(), and WlzGMVertexGetG3D().
Referenced by WlzVertexHeapSortIdxFnD3().
double WlzGMVertexDistSq2D | ( | WlzGMVertex * | vertex, |
WlzDVertex2 | pos | ||
) |
Calculates the square of the Euclidean distance between the given vertex and the given 2D double precision position.
vertex | Given vertex. |
pos | Given position. |
References _WlzGMVertexGU::core, _WlzGMVertex::geo, _WlzGMCore::type, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, WLZ_GMELM_VERTEX_G2D, WLZ_GMELM_VERTEX_G2I, WLZ_GMELM_VERTEX_G2N, WLZ_GMELM_VERTEX_G3D, WLZ_GMELM_VERTEX_G3I, and WLZ_GMELM_VERTEX_G3N.
WlzErrorNum WlzGMFaceGetG3D | ( | WlzGMFace * | face, |
WlzDVertex3 * | dstPos0, | ||
WlzDVertex3 * | dstPos1, | ||
WlzDVertex3 * | dstPos2 | ||
) |
Gets the geometry of a face.
face | Given face. |
dstPos0 | Destination pointer for first vertex geometry, must not be NULL. |
dstPos1 | Destination pointer for second vertex geometry, must not be NULL. |
dstPos2 | Destination pointer for third vertex geometry, must not be NULL. |
References _WlzGMVertexT::diskT, _WlzGMLoopT::edgeT, _WlzGMFace::loopT, _WlzGMEdgeT::next, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WlzGMVertexGetG3D().
Referenced by WlzEffWriteObjStl(), WlzGeoModelGridWSpSet3D(), and WlzGMModelCutDom().
WlzGMVertex* WlzGMModelMatchVertexG3D | ( | WlzGMModel * | model, |
WlzDVertex3 | gPos | ||
) |
Attempts to find a vertex which matches the given double precision 3D position.
model | Model with resources. |
gPos | Position to match. |
References _WlzGMVertex::next, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, WLZ_GM_TOLERANCE, WlzGeomHashVtx3D(), and WlzGMVertexCmpSign3D().
Referenced by WlzGMModelConstructSimplex3N().
WlzGMVertex* WlzGMModelMatchVertexG2D | ( | WlzGMModel * | model, |
WlzDVertex2 | gPos | ||
) |
Attempts to find a vertex which matches the given double precision 2D position.
model | Model with resources. |
gPos | Position to match. |
References _WlzGMVertex::next, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, WLZ_GM_TOLERANCE, WlzGeomHashVtx2D(), and WlzGMVertexCmpSign2D().
Referenced by WlzGMModelAddVertexToHT(), and WlzMatchICPWeightMatches().
double WlzGMVertexShellDist | ( | WlzGMVertex * | v0, |
WlzGMVertex * | v1, | ||
double | maxDist, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the minimum distance between the two vertices where the path between them is constrained to the common shell, this will be negative if the two vertices are in different shells.
v0 | First vertex. |
v1 | Second vertex. |
maxDist | Maximum search distance. |
dstErr | Destination error pointer, may be null. |
References _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMVertexT::next, _WlzGMEdgeT::next, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMShell::parent, _WlzGMDiskT::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_UNIMPLEMENTED, WLZ_VTX_2_LENGTH, WLZ_VTX_2_SUB, WlzGMModelGetDimension(), WlzGMVertexCommonShell(), and WlzGMVertexGetG2D().
WlzErrorNum WlzGMVerifyModel | ( | WlzGMModel * | model, |
WlzGMElemP * | dstElmP | ||
) |
Verifies the given model. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging.
model | Given model. |
dstElmP | Destination pointer for an invalid element pointermay be NULL. |
References _WlzGMModel::child, _WlzGMElemP::core, _WlzGMShell::next, _WlzGMResource::numElm, _WlzGMShell::parent, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMModelR::shell, _WlzGMShell::type, _WlzGMModel::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GMELM_DATA, WLZ_ERR_GMELM_NULL, WLZ_ERR_GMELM_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL, WlzGMModelTypeValid(), and WlzGMVerifyShell().
Referenced by WlzGMModelDeleteE().
WlzErrorNum WlzGMVerifyShell | ( | WlzGMShell * | shell, |
WlzGMElemP * | dstElmP | ||
) |
Verifies the given shell. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging.
shell | Given shell. |
dstElmP | Destination pointer for an invalid element pointer, may be NULL. |
References _WlzGMShell::child, _WlzGMElemP::core, _WlzGMShell::idx, _WlzGMElemP::loopT, _WlzGMModelR::loopT, _WlzGMLoopT::next, _WlzGMShell::next, _WlzGMResource::numElm, _WlzGMLoopT::parent, _WlzGMShell::parent, _WlzGMShell::prev, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMShell::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GMELM_DATA, WLZ_ERR_GMELM_NULL, WLZ_ERR_GMELM_TYPE, WLZ_ERR_NONE, WLZ_GMELM_SHELL, and WlzGMVerifyLoopT().
Referenced by WlzGMVerifyModel().
WlzErrorNum WlzGMVerifyLoopT | ( | WlzGMLoopT * | loopT, |
WlzGMElemP * | dstElmP | ||
) |
Verifies the given loop topology element. If the invalid element destination pointer is given then it MAY be set to point to an invalid element of the model. This function was written as an aid to debugging.
loopT | Given loop topology element. |
dstElmP | Destination pointer for an invalid element pointer, may be NULL. |
References _WlzGMElemP::core, _WlzGMElemP::diskT, _WlzGMVertexT::diskT, _WlzGMEdgeT::edge, _WlzGMElemP::edgeT, _WlzGMLoopT::edgeT, _WlzGMModelR::edgeT, _WlzGMVertexT::idx, _WlzGMVertex::idx, _WlzGMDiskT::idx, _WlzGMEdgeT::idx, _WlzGMEdge::idx, _WlzGMLoopT::idx, _WlzGMElemP::loopT, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMResource::numElm, _WlzGMEdgeT::opp, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMShell::parent, _WlzGMDiskT::prev, _WlzGMEdgeT::prev, _WlzGMLoopT::prev, _WlzGMEdgeT::rad, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMVertexT::type, _WlzGMVertex::type, _WlzGMDiskT::type, _WlzGMEdgeT::type, _WlzGMEdge::type, _WlzGMLoopT::type, _WlzGMShell::type, _WlzGMDiskT::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GMELM_DATA, WLZ_ERR_GMELM_NULL, WLZ_ERR_GMELM_TYPE, WLZ_ERR_NONE, WLZ_GMELM_DISK_T, WLZ_GMELM_EDGE, WLZ_GMELM_EDGE_T, WLZ_GMELM_LOOP_T, WLZ_GMELM_SHELL, WLZ_GMELM_VERTEX, and WLZ_GMELM_VERTEX_T.
Referenced by WlzGMVerifyShell().
WlzGMEdge** WlzGMModelFindNMEdges | ( | WlzGMModel * | model, |
int * | dstNMCnt, | ||
WlzErrorNum * | dstErr | ||
) |
Finds a loop topology element in common for the two edge topology elements.
model | The given model. |
dstNMCnt | Destination pointer for number of non-manifold edges found. |
dstErr | Destination error pointer, may be null. |
References AlcMalloc(), AlcVectorExtendAndGet(), AlcVectorFree(), AlcVectorItemGet(), AlcVectorNew(), _WlzGMModelR::edge, _WlzGMEdge::edgeT, _WlzGMEdge::idx, _WlzGMEdgeT::rad, _WlzGMModel::res, _WlzGMModel::type, _WlzGMResource::vec, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, and WLZ_GMMOD_3N.
WlzGMLoopT* WlzGMEdgeTCommonLoopT | ( | WlzGMEdgeT * | eT0, |
WlzGMEdgeT * | eT1 | ||
) |
Finds a loop topology element in common for the two edge topology elements.
eT0 | First edge topology element. |
eT1 | Second edge topology element. |
References _WlzGMEdgeT::parent.
Referenced by WlzGMModelConstructSimplex2N().
WlzGMEdge* WlzGMVertexCommonEdge | ( | WlzGMVertex * | eV0, |
WlzGMVertex * | eV1 | ||
) |
Finds the edge common to the two given verticies.
eV0 | First vertex element. |
eV1 | Second vertex element. |
References _WlzGMVertex::diskT, _WlzGMEdgeT::edge, _WlzGMVertexT::next, _WlzGMDiskT::next, _WlzGMVertexT::parent, and _WlzGMDiskT::vertexT.
Referenced by WlzGMModelConstructSimplex3N().
WlzGMShell* WlzGMVertexCommonShell | ( | WlzGMVertex * | eV0, |
WlzGMVertex * | eV1 | ||
) |
Finds the shell common to the two given verticies.
eV0 | First vertex element. |
eV1 | Second vertex element. |
References WlzGMVertexGetShell().
Referenced by WlzGMModelConstructSimplex3N(), and WlzGMVertexShellDist().
WlzGMShell* WlzGMVertexGetShell | ( | WlzGMVertex * | eV | ) |
Finds the parent shell of the given vertex.
eV | Given vertex element. |
References _WlzGMVertex::diskT, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMVertex::type, _WlzGMDiskT::vertexT, and WLZ_GMELM_VERTEX.
Referenced by WlzGMModelConstructS(), WlzGMModelConstructSimplex3N(), and WlzGMVertexCommonShell().
WlzGMShell* WlzGMEdgeGetShell | ( | WlzGMEdge * | eE | ) |
Finds the parent shell of the given edge.
eE | Given edge element. |
References _WlzGMEdge::edgeT, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMEdge::type, and WLZ_GMELM_EDGE.
Referenced by WlzGMModelConstructS().
WlzGMVertex* WlzGMEdgeCommonVertex | ( | WlzGMEdge * | eE0, |
WlzGMEdge * | eE1 | ||
) |
Finds the common vertex of the two given edges.
eE0 | First edge element. |
eE1 | Second edge element. |
References _WlzGMVertexT::diskT, _WlzGMEdge::edgeT, _WlzGMEdgeT::opp, _WlzGMDiskT::vertex, and _WlzGMEdgeT::vertexT.
WlzGMVertex* WlzGMEdgeCommonVertexGetDiskTs | ( | WlzGMEdge * | eE0, |
WlzGMEdge * | eE1, | ||
WlzGMDiskT ** | dstDT0, | ||
WlzGMDiskT ** | dstDT1 | ||
) |
Finds the common vertex of the two given edges and sets the disk topology element destination pointers if there is a common vertex. NULL*.
eE0 | First edge element. |
eE1 | Second edge element. |
dstDT0 | First diskT destination pointer, must not be NULL. |
dstDT1 | Second diskT destination pointer, must not be NULL. |
References _WlzGMVertexT::diskT, _WlzGMEdge::edgeT, _WlzGMEdgeT::opp, _WlzGMDiskT::vertex, and _WlzGMEdgeT::vertexT.
Referenced by WlzGMModelConstructS().
WlzGMDiskT* WlzGMEdgeCommonDiskT | ( | WlzGMEdge * | eE0, |
WlzGMEdge * | eE1 | ||
) |
Finds the common disk topology element of the two given edges.
eE0 | First edge element. |
eE1 | Second edge element. |
References _WlzGMVertexT::diskT, _WlzGMEdge::edgeT, _WlzGMEdgeT::opp, and _WlzGMEdgeT::vertexT.
void WlzGMVertexTAppend | ( | WlzGMVertexT * | eVT, |
WlzGMVertexT * | nVT | ||
) |
Append new vertex topology element onto a doubly linked list of vertex topology element's, knowing that neither is NULL. Vertex topology elements are maintained in an unordered doubly linked list.
eVT | Existing vertexT in list of vertexT's. |
nVT | New vertex topology element to append to list after existing element. |
References _WlzGMVertexT::next, and _WlzGMVertexT::prev.
Referenced by WlzGMModelConstructS().
void WlzGMDiskTAppend | ( | WlzGMDiskT * | eDT, |
WlzGMDiskT * | nDT | ||
) |
Append new edge topology onto a doubly linked list of disk topology element's, knowing that neither is NULL. Disk topology elements are maintained in an unordered doubly linked list.
eDT | Existing disk topology element in list. |
nDT | New disk topology element to append to list after existing element. |
References _WlzGMDiskT::next, and _WlzGMDiskT::prev.
Referenced by WlzGMModelConstructS().
void WlzGMEdgeTAppend | ( | WlzGMEdgeT * | eET, |
WlzGMEdgeT * | nET | ||
) |
Append new edge topology onto a doubly linked list of edge topology element's, knowing that neither is NULL. Edge topology elements are maintained in an ordered doubly linked list, CCW around the inside of loops and CW around the outside of 2D loops.
eET | Existing edge topology element in list. |
nET | New edge topology element to append to list after existing element. |
References _WlzGMEdgeT::next, and _WlzGMEdgeT::prev.
void WlzGMEdgeTInsert | ( | WlzGMEdgeT * | eET, |
WlzGMEdgeT * | nET | ||
) |
Insert new edge topology into a doubly linked list of edge topology element's, knowing that neither is NULL. Edge topology elements are maintained in an ordered doubly linked list, CCW around the inside of loops and CW around the outside of 2D loops.
eET | Existing edge topology element in list. |
nET | New edge topology element to insert in list before existing element. |
References _WlzGMEdgeT::next, and _WlzGMEdgeT::prev.
void WlzGMEdgeTInsertRadial | ( | WlzGMEdgeT * | nET | ) |
Inserts the given new edge topology element into a radially sorted cyclic list of edge topology element's.
Inserts the given new edge topology element into a radially sorted cyclic list of edge topology element's. In 2D the radial edgeT is always the edgeT itself and this function should not be called. In 3D the radial edge is a similarly directed edge topology element to the given edge topology element who's off edge vertex is the next CCW off edge vertex when viewed along the edge.
* O <- * / \ * / \ Next radial edge * / | * / | * X----------O * Given edge into Off edge vertex * screen/page of new simplex *
Given a directed edge which forms part of a loop topology element in a new triangle simplex. Define points around the the simplex:
* O p1 * ^ |\ * | | \ * | | \ * | | \ * | | \ * nET | | O p2 * | | / * | | / * | | / * | | / * | |/ * O p0 *To find the next CCW simplex. Find the normal vector:
\[ n_0 = \frac{(p_0 - p_1)}{|p_0 - p_1|} \]
Find the normal vector perpendicular to the new (triangular) simplex:\[ n_1 = \frac{n_0(p_2 - p_0)}{|n_0(p_2 - p_0)}\]
Find the normalized vector perpendicular to \(n_0\) and \(n_1\):\[n_2 = n_0 n_1 \]
Because \(n_1\) and \(n_2\) are perpendicular axes in the plane perpendicular to \(p_1 - p_0\) we can compute the angle of any vector projected onto the plane as:\[ \theta = \tan^{-1}{\frac{v_i n_2}{v_i n_1}}, 0 \leq \theta \leq 2\pi \]
where\[v_i = p_{2i} - p_0\]
and \(p_{2i}\) are the \(p_2\) verticies on the candidate face. Use the projections to find the previous radial edge, then insert the edge in the cyclic radial list.nET | New edge topology element to insert in list. The new edge topology element MUST have all it's fields set EXCEPT for the radial edge link. |
References _WlzGMVertexT::diskT, _WlzGMEdgeT::edge, _WlzGMEdge::edgeT, _WlzGMEdgeT::next, _WlzGMEdgeT::opp, _WlzGMEdgeT::prev, _WlzGMEdgeT::rad, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_VTX_3_CROSS, WLZ_VTX_3_DOT, WLZ_VTX_3_LENGTH, WLZ_VTX_3_SCALE, WLZ_VTX_3_SUB, WlzGeomTriangleSnArea2(), and WlzGMVertexGetG3D().
Referenced by WlzGMModelConstructS().
void WlzGMLoopTAppend | ( | WlzGMLoopT * | eLT, |
WlzGMLoopT * | nLT | ||
) |
Append new loop topology onto a doubly linked list of loop topology element's, knowing that neither is NULL. Loop topology elements are maintained in an unordered doubly linked list.
eLT | Existing loop topology element in list. |
nLT | New loop topology element to append to list after existing element. |
References _WlzGMLoopT::next, and _WlzGMLoopT::prev.
Referenced by WlzGMEdgeCommonFace(), WlzGMModelConstructS(), and WlzGMModelConstructSimplex3N().
void WlzGMLoopTUnlink | ( | WlzGMLoopT * | dLT | ) |
Unlinks the given loop topology element from a doubly linked list of loop topology element's, knowing that it is not NULL. If this is the only loop topology element in parent the parent's list of loop topology elements is set to NULL. Other elements which point to this loop topology element are not modified.
dLT | Loop topology element to be unlinked. |
References _WlzGMShell::child, _WlzGMLoopT::next, _WlzGMLoopT::parent, and _WlzGMLoopT::prev.
Referenced by WlzGMEdgeCommonFace(), WlzGMModelConstructS(), WlzGMModelConstructSimplex3N(), and WlzGMModelDeleteV().
void WlzGMEdgeTUnlink | ( | WlzGMEdgeT * | dET | ) |
Unlinks the given edge topology element from it's loop topology element and it's opposite edge topology element. The opposite edge topology element MUST be unlinked before the model is valid again.
dET | Edge topology element to be unlinked. |
References _WlzGMLoopT::edgeT, _WlzGMEdgeT::idx, _WlzGMEdgeT::next, _WlzGMEdgeT::opp, _WlzGMEdgeT::parent, and _WlzGMEdgeT::prev.
void WlzGMVertexTUnlink | ( | WlzGMVertexT * | dVT | ) |
Unlinks the given vertex topology element from a doubly linked list of vertex topology element's, knowing that it is not NULL. Since the parent of a vertex topology element is always an edge topology element and an edge topology element only ever uses a single vertex topology element, set the parent's vertex topology element pointer to NULL.
dVT | Vertex topology element to be unlinked. |
References _WlzGMVertexT::diskT, _WlzGMVertexT::next, _WlzGMVertexT::parent, _WlzGMVertexT::prev, _WlzGMDiskT::vertexT, and _WlzGMEdgeT::vertexT.
Referenced by WlzGMModelDeleteV().
void WlzGMDiskTUnlink | ( | WlzGMDiskT * | dDT | ) |
Unlinks the given disk topology element from a doubly linked list of disk topology element's, knowing that it is not NULL. If this is the only disk topology element of the vertex the vertex's list of disk topology elements is set to NULL. Other elements which point to this disk topology element are not modified.
dDT | Disk topology element to be unlinked. |
References _WlzGMVertex::diskT, _WlzGMDiskT::next, _WlzGMDiskT::prev, and _WlzGMDiskT::vertex.
Referenced by WlzGMDiskTJoin().
void WlzGMDiskTJoin | ( | WlzGMDiskT * | gDT0, |
WlzGMDiskT * | gDT1 | ||
) |
Joins the given pair of disk topology elements on return the first of the diskTs has all the vertexTs of both and the second of the diskTs should be free'd without being unlinked.
gDT0 | First disk topology element. |
gDT1 | Second disk topology element which should be free'd on return. |
References _WlzGMVertexT::diskT, _WlzGMVertexT::next, _WlzGMVertexT::prev, _WlzGMDiskT::vertexT, and WlzGMDiskTUnlink().
Referenced by WlzGMModelConstructS().
void WlzGMShellAppend | ( | WlzGMShell * | eS, |
WlzGMShell * | nS | ||
) |
Append new shell onto a doubly linked list of shells, knowing that neither is NULL. A model's shells are maintained in an unordered doubly linked list.
eS | Existing shell in list of shells. |
nS | New shell to append to list after existing shell. |
References _WlzGMShell::next, and _WlzGMShell::prev.
Referenced by WlzGMModelConstructS(), and WlzGMModelDeleteV().
void WlzGMShellUnlink | ( | WlzGMShell * | dS | ) |
Unlinks the given shell from a doubly linked list of shells kept by the model, knowing that the given shell ptr is not NULL.
dS | Shell to be unlinked. |
References _WlzGMModel::child, _WlzGMShell::next, _WlzGMShell::parent, and _WlzGMShell::prev.
Referenced by WlzGMModelConstructS(), WlzGMModelDeleteS(), and WlzGMShellJoinAndUnlink().
void WlzGMShellJoinAndUnlink | ( | WlzGMShell * | eShell, |
WlzGMShell * | dShell | ||
) |
Joins the shell to be unlinked onto the shell that's to be extended and then unlinks (but does not free) it. Both shells must be valid.
eShell | Shell to be extended. |
dShell | Shell to be joined and then unlinked. |
References WlzGMShellUnlink().
Referenced by WlzGMModelConstructS().
WlzGMResIdxTb* WlzGMModelResIdx | ( | WlzGMModel * | model, |
unsigned int | eMsk, | ||
WlzErrorNum * | dstErr | ||
) |
Makes an index look up table data structure for the given model.
model | The model with the vertex resources. |
eMsk | Element mask with bits set for elemet resources to index. |
dstErr | Destination error pointer, may be null. |
References AlcCalloc(), AlcVectorItemGet(), _WlzGMElemP::diskT, _WlzGMModelR::diskT, _WlzGMResIdxTb::diskT, _WlzGMElemP::edge, _WlzGMModelR::edge, _WlzGMResIdxTb::edge, _WlzGMElemP::edgeT, _WlzGMModelR::edgeT, _WlzGMResIdxTb::edgeT, _WlzGMElemP::face, _WlzGMModelR::face, _WlzGMResIdxTb::face, _WlzGMVertexG2I::idx, _WlzGMVertexG2D::idx, _WlzGMVertexG2N::idx, _WlzGMVertexG3I::idx, _WlzGMVertexG3D::idx, _WlzGMVertexG3N::idx, _WlzGMVertexT::idx, _WlzGMVertex::idx, _WlzGMDiskT::idx, _WlzGMEdgeT::idx, _WlzGMEdge::idx, _WlzGMLoopT::idx, _WlzGMFace::idx, _WlzGMShellG2I::idx, _WlzGMShellG2D::idx, _WlzGMShellG3I::idx, _WlzGMShellG3D::idx, _WlzGMShell::idx, _WlzGMResIdx::idxCnt, _WlzGMResIdx::idxLut, _WlzGMElemP::loopT, _WlzGMModelR::loopT, _WlzGMResIdxTb::loopT, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMElemP::shell, _WlzGMModelR::shell, _WlzGMResIdxTb::shell, _WlzGMModelR::shellG, _WlzGMResIdxTb::shellG, _WlzGMElemP::shellG2D, _WlzGMElemP::shellG2I, _WlzGMElemP::shellG3D, _WlzGMElemP::shellG3I, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMElemP::vertex, _WlzGMModelR::vertex, _WlzGMResIdxTb::vertex, _WlzGMModelR::vertexG, _WlzGMResIdxTb::vertexG, _WlzGMElemP::vertexG2D, _WlzGMElemP::vertexG2I, _WlzGMElemP::vertexG2N, _WlzGMElemP::vertexG3D, _WlzGMElemP::vertexG3I, _WlzGMElemP::vertexG3N, _WlzGMElemP::vertexT, _WlzGMModelR::vertexT, _WlzGMResIdxTb::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GMELMFLG_DISK_T, WLZ_GMELMFLG_EDGE, WLZ_GMELMFLG_EDGE_T, WLZ_GMELMFLG_FACE, WLZ_GMELMFLG_LOOP_T, WLZ_GMELMFLG_SHELL, WLZ_GMELMFLG_SHELL_G, WLZ_GMELMFLG_VERTEX, WLZ_GMELMFLG_VERTEX_G, WLZ_GMELMFLG_VERTEX_T, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzGMModelGetDimension(), and WlzGMModelResIdxFree().
Referenced by WlzCMeshFromGM(), WlzEffWriteObjObj(), WlzEffWriteObjPly2(), WlzEffWriteObjSMesh(), WlzEffWriteObjVtk(), WlzGMModelCopy(), and WlzWriteObj().
void WlzGMModelResIdxFree | ( | WlzGMResIdxTb * | resIdxTb | ) |
Frees a GM index look up table data structure.
resIdxTb | Given index lut data structure. |
References AlcFree(), _WlzGMResIdxTb::diskT, _WlzGMResIdxTb::edge, _WlzGMResIdxTb::edgeT, _WlzGMResIdxTb::face, _WlzGMResIdx::idxLut, _WlzGMResIdxTb::loopT, _WlzGMResIdxTb::shell, _WlzGMResIdxTb::shellG, _WlzGMResIdxTb::vertex, _WlzGMResIdxTb::vertexG, and _WlzGMResIdxTb::vertexT.
Referenced by WlzEffWriteObjObj(), WlzEffWriteObjPly2(), WlzEffWriteObjSMesh(), WlzEffWriteObjStl(), WlzEffWriteObjVtk(), WlzGMModelCopy(), WlzGMModelResIdx(), and WlzWriteObj().
WlzErrorNum WlzGMModelRehashVHT | ( | WlzGMModel * | model, |
int | vHTSz | ||
) |
Rehash the vertex matching hash table.
model | The model. |
vHTSz | New vertex matching hash table size, no change if <= 0. |
References AlcCalloc(), AlcFree(), AlcVectorItemGet(), _WlzGMVertex::idx, _WlzGMVertex::next, _WlzGMResource::numIdx, _WlzGMModel::res, _WlzGMResource::vec, _WlzGMModelR::vertex, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, and WlzGMModelAddVertexToHT().
Referenced by WlzAffineTransformGMModel(), WlzBasisFnTransformGMModel(), WlzCMeshFlatten2D5(), WlzCMeshTransformManyObjAsIdx(), WlzEffWritePointsVtkFieldValues(), WlzGMFilterGeomLPLM(), WlzGMModelCopy(), and WlzShiftValues().
WlzErrorNum WlzGMModelConstructS | ( | WlzGMModel * | cM, |
WlzGMShell * | gS | ||
) |
Constructs a copy of the given shell in the current model. The curent model must be of the same type as the parent of the given shell and all the usual construction restrictions apply, see WlzGMModelConstructSimplex2D().
cM | Current model. |
gS | Given shell. |
References _WlzGMShell::child, _WlzGMModel::child, _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMEdgeT::edge, _WlzGMEdge::edgeT, _WlzGMLoopT::edgeT, _WlzGMLoopT::face, _WlzGMFace::loopT, _WlzGMVertexT::next, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMShell::next, _WlzGMEdgeT::opp, _WlzGMLoopT::opp, _WlzGMVertexT::parent, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMShell::parent, _WlzGMVertexT::prev, _WlzGMDiskT::prev, _WlzGMEdgeT::prev, _WlzGMLoopT::prev, _WlzGMShell::prev, _WlzGMEdgeT::rad, _WlzGMModel::type, _WlzGMDiskT::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_UNIMPLEMENTED, WLZ_GMMOD_2N, WlzGMDiskTAppend(), WlzGMDiskTJoin(), WlzGMEdgeCommonFace(), WlzGMEdgeCommonVertexGetDiskTs(), WlzGMEdgeGetShell(), WlzGMEdgeTInsertRadial(), WlzGMLoopTAppend(), WlzGMLoopTUnlink(), WlzGMModelAddVertexToHT(), WlzGMModelConstructSimplex2D(), WlzGMModelConstructSimplex2N(), WlzGMModelFreeDT(), WlzGMModelFreeLT(), WlzGMModelFreeS(), WlzGMModelGetDimension(), WlzGMModelNewE(), WlzGMModelNewET(), WlzGMModelNewF(), WlzGMModelNewLT(), WlzGMModelNewS(), WlzGMModelNewVT(), WlzGMShellAppend(), WlzGMShellGetGBBV3D(), WlzGMShellJoinAndUnlink(), WlzGMShellSetG2D(), WlzGMShellSetG3D(), WlzGMShellUnlink(), WlzGMShellUpdateG2D(), WlzGMShellUpdateG3D(), WlzGMVertexGetG2D(), WlzGMVertexGetG2N(), WlzGMVertexGetG3D(), WlzGMVertexGetShell(), and WlzGMVertexTAppend().
Referenced by WlzGMModelNewFromS().
WlzErrorNum WlzGMModelConstructSimplex2D | ( | WlzGMModel * | model, |
WlzDVertex2 * | pos | ||
) |
Constructs a 2D simplex (edge) defined by two double precision end points. Either of the two points may already exist within the model and the simplex must not intersect any existing simplex in the model. See WlzGMShellMatchVtxG2D() for the meaning of the backwards, forwards and distance search parameters.
model | The model to add the segment to. |
pos | Pointer to first then second positions. |
References WLZ_ERR_NONE, and WlzGMModelConstructSimplex2N().
Referenced by WlzCMeshFlatten2D5(), WlzContourGrdObj2D(), WlzContourRBFBndObj3D(), WlzEffWritePointsVtkFieldValues(), WlzGetSectionFromGMModel(), WlzGMModelConstructS(), WlzObjToConvexPolygon(), and WlzReadObj().
WlzErrorNum WlzGMModelConstructSimplex2N | ( | WlzGMModel * | model, |
WlzDVertex2 * | pos, | ||
WlzDVertex2 * | nrm | ||
) |
Constructs a 2D simplex (edge) defined by two double precision end points with normal components. Either of the two points may already exist within the model and the simplex must not intersect any existing simplex in the model. See WlzGMShellMatchVtxG2D() for the meaning of the backwards, forwards and distance search parameters.
model | The model to add the segment to. |
pos | Pointer to first then second positions. |
nrm | Pointer to the normal values in the same order as the positions, may be NULL. |
References _WlzGMEdgeT::edge, _WlzGeomPolyListItem2D::prev, _WlzGMEdgeT::prev, WLZ_ERR_NONE, WLZ_GM_TOLERANCE_SQ, WlzGeomVtxEqual2D(), WlzGMEdgeTCommonLoopT(), WlzGMModelNewV(), WlzGMVertexSetG2D(), and WlzGMVertexSetG2N().
Referenced by WlzContourRBFBndObj3D(), WlzGMModelConstructS(), WlzGMModelConstructSimplex2D(), and WlzReadObj().
WlzErrorNum WlzGMModelConstructSimplex3D | ( | WlzGMModel * | model, |
WlzDVertex3 * | pos | ||
) |
Constructs a 3D simplex (triangle) defined by three double precision verticies, any of which may already exist within the model. If a new face is created then the child loopT of that face will have edgeT's that use the given vertices in their given order.
model | The model to add the segment to. |
pos | Pointer to triangle verticies. |
References WLZ_ERR_NONE, and WlzGMModelConstructSimplex3N().
Referenced by WlzCMeshFlatten2D5(), WlzContourGrdObj2D(), WlzContourRBFBndObj3D(), WlzEffReadObjObj(), WlzEffReadObjPly2(), WlzEffReadObjSMesh(), WlzEffReadObjStl(), WlzEffWritePointsVtkFieldValues(), WlzGMModelCutDom(), WlzObjToConvexPolygon(), and WlzReadObj().
WlzErrorNum WlzGMModelConstructSimplex3N | ( | WlzGMModel * | model, |
WlzDVertex3 * | pos, | ||
WlzDVertex3 * | nrm | ||
) |
Constructs a 3D simplex (triangle) defined by three double precision verticies with normals, any of which may already exist within the model. If a new face is created then the child loopT of that face will have edgeT's that use the given vertices in their given order.
model | The model to add the segment to. |
pos | Pointer to triangle verticies. |
nrm | Pointer to the normal values in the same order as the positions, may be NULL. |
References _WlzGMShell::child, _WlzGMVertexT::diskT, _WlzGMLoopT::edgeT, _WlzGMFace::loopT, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMEdgeT::opp, _WlzGMLoopT::opp, _WlzGMEdgeT::parent, _WlzGMLoopT::parent, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, WLZ_ERR_NONE, WLZ_GM_TOLERANCE_SQ, WlzGeomTriangleArea2Sq3(), WlzGMLoopTAppend(), WlzGMLoopTUnlink(), WlzGMModelMatchVertexG3D(), WlzGMModelNewV(), WlzGMVertexCommonEdge(), WlzGMVertexCommonShell(), WlzGMVertexGetShell(), WlzGMVertexSetG3D(), and WlzGMVertexSetG3N().
Referenced by WlzEffReadObjObj(), WlzGMModelConstructSimplex3D(), and WlzReadObj().
void WlzGMModelRemVertex | ( | WlzGMModel * | model, |
WlzGMVertex * | dV | ||
) |
Removes a vertex from the models vertex hash table. The vertex's geometry must have been set.
model | The model. |
dV | The vertex to remove from the models hash table. |
References _WlzGMVertex::next, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, WLZ_GM_TOLERANCE, WlzGeomHashVtx3D(), WlzGMVertexCmpSign3D(), and WlzGMVertexGetG3D().
Referenced by WlzAffineTransformGMShell().
void WlzGMModelAddVertexToHT | ( | WlzGMModel * | model, |
WlzGMVertex * | nV | ||
) |
Adds a new vertex into the models vertex hash table. The vertex's geometry must have been set.
model | The model. |
nV | New vertex to insert into the models hash table. |
References _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMVertexT::next, _WlzGMVertex::next, _WlzGMEdgeT::next, _WlzGMEdgeT::opp, _WlzGMVertexT::parent, _WlzGMDiskT::vertex, _WlzGMModel::vertexHT, _WlzGMModel::vertexHTSz, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_GM_TOLERANCE, WlzGeomCmpAngle(), WlzGeomHashVtx3D(), WlzGMModelMatchVertexG2D(), WlzGMVertexCmpSign3D(), WlzGMVertexGetG2D(), and WlzGMVertexGetG3D().
Referenced by WlzAffineTransformGMShell(), WlzGMModelConstructS(), and WlzGMModelRehashVHT().
int WlzGMShellSimplexCnt | ( | WlzGMShell * | shell | ) |
Counts the number of simplicies in the given shell. For 2D models the simplicies are edges and for 3D models they are loops.
shell | The given shell. |
References _WlzGMShell::child, _WlzGMEdgeT::edge, _WlzGMEdge::edgeT, _WlzGMLoopT::edgeT, _WlzGMLoopT::face, _WlzGMShell::idx, _WlzGMFace::loopT, _WlzGMEdgeT::next, _WlzGMLoopT::next, _WlzGMShell::parent, and WlzGMModelGetDimension().
Referenced by WlzGMFilterRmSmShells(), WlzMatchICPCtr(), and WlzMatchICPWeightMatches().
WlzGMGridWSp3D* WlzGeoModelGridWSpNew3D | ( | WlzGMModel * | model, |
WlzGMElemType | elemType, | ||
WlzErrorNum * | dstErr | ||
) |
Makes a new cell grid for the given elelemnt type in the given 3D model. See WlzGeoModelGridWSpSet3D().
model | Given model. |
elemType | Geometric model element type for the grid of cells. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), _WlzGMGridWSp3D::elemType, _WlzGMResource::numElm, _WlzGMModel::type, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzGeoModelGridFree3D(), WlzGeoModelGridWSpSet3D(), and WlzGMModelGetRes().
Referenced by WlzGMModelCutDom().
WlzErrorNum WlzGeoModelGridWSpSet3D | ( | WlzGMGridWSp3D * | grid, |
WlzGMModel * | model, | ||
WlzGMElemType | elemType | ||
) |
Populates a 3D geometric model grid workspace from the given 3D model. Currently this function has only been implimented for when geometric models elements are faces all other types will result in and unimplimented error code.
grid | Given grid to populate using model. |
model | Given model. |
elemType | Geometric model element type for the grid of cells. |
References Alc3Free(), ALC_ER_NONE, AlcPtr3Malloc(), AlcVectorExtendAndGet(), AlcVectorItemGet(), AlcVectorNew(), ALG_MAX3, cbrt(), _WlzGMGridWSp3D::cells, _WlzGMGridWSp3D::cellSz, _WlzGMGridWSp3D::cellVec, _WlzGMGridWSp3D::cellVecMax, _WlzGMElemP::core, _WlzGMGridWSpCell3D::elem, _WlzGMElemP::face, _WlzGMCore::idx, _WlzGMGridWSp3D::nCells, _WlzGMGridWSpCell3D::next, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzGMGridWSp3D::org, _WlzGMModel::type, _WlzGMResource::vec, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_UNIMPLEMENTED, WLZ_GMELM_FACE, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzBoundingBoxGModel3D(), WlzBoundingBoxVtx3D(), WlzGeoModelGridCellsInDBox(), WlzGeomTriangleAABBIntersect3D(), WlzGMFaceGetG3D(), WlzGMModelGetRes(), _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGeoModelGridWSpNew3D().
WlzErrorNum WlzGeoModelGridFree3D | ( | WlzGMGridWSp3D * | grid | ) |
Frees the given geometric model cell grid.
grid | Given grid to free. |
References Alc3Free(), AlcFree(), AlcVectorFree(), _WlzGMGridWSp3D::cells, _WlzGMGridWSp3D::cellVec, and WLZ_ERR_NONE.
Referenced by WlzGeoModelGridWSpNew3D(), and WlzGMModelCutDom().
WlzIBox3 WlzGeoModelGridCellsInDBox | ( | WlzGMGridWSp3D * | grid, |
WlzDBox3 | dBox | ||
) |
Computes the box of grid cells which encloses the given double box.
grid | Given grid of cells. |
dBox | Given double box. |
References ALG_DBL_TOLLERANCE, _WlzGMGridWSp3D::cellSz, _WlzGMGridWSp3D::nCells, _WlzGMGridWSp3D::org, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Referenced by WlzGeoModelGridWSpSet3D(), and WlzGMModelCutDom().
WlzGMModel* WlzGMModelCut | ( | WlzGMModel * | given, |
WlzGMModel * | knife, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new geometric model from the given model such that no elements of the given model which intersect with elements in the knife model are included. While this code seems to work for simple models errors have been seen with complex models. The code for this function and those static functions that it calls should be considered "under construction".
given | Given model. |
knife | Knife model. |
dstErr | Destination error pointer, may be NULL. |
References _WlzGMResource::numElm, _WlzGMModel::res, _WlzGMModel::type, _WlzGMModelR::vertex, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzGMModelFree(), and WlzGMModelNew().
WlzGMModel* WlzGMModelCutDom | ( | WlzGMModel * | given, |
WlzObject * | knife, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new geometric model from the given model such that no elements of the given model which intersect with elements in the knife domain are included.
given | Given model. |
knife | Knife domain object. |
dstErr | Destination error pointer, may be NULL. |
References AlcVectorItemGet(), _WlzGMGridWSp3D::cells, _WlzDomain::core, _WlzObject::domain, _WlzGMGridWSpCell3D::elem, _WlzGMElemP::face, _WlzGMModelR::face, _WlzGMFace::idx, _WlzGMGridWSpCell3D::next, _WlzGMResource::numElm, _WlzGMResource::numIdx, _WlzDomain::p, _WlzGMModel::res, _WlzGMModel::type, _WlzObject::type, _WlzGeomPolyListItem2D::v, _WlzGMResource::vec, _WlzGMModelR::vertex, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_UNIMPLEMENTED, WLZ_GMELM_FACE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzBoundingBoxVtx3D(), WlzGeoModelGridCellsInDBox(), WlzGeoModelGridFree3D(), WlzGeoModelGridWSpNew3D(), WlzGeomTriangleTriangleIntersect3D(), WlzGMFaceGetG3D(), WlzGMModelConstructSimplex3D(), WlzGMModelFree(), WlzGMModelGetDimension(), WlzGMModelNew(), WlzInsideDomain3D(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
WlzErrorNum WlzGMFilterRmSmShells | ( | WlzGMModel * | model, |
int | minSpx | ||
) |
Removes small shells from the given geometric model.
model | Given model. |
minSpx | Minimum number of simplicies (edges in a 2D model or faces in a 3D model) in a shell for it to stay in the model. |
References _WlzGMModel::child, _WlzGMShell::next, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzGMModelDeleteS(), and WlzGMShellSimplexCnt().
Referenced by WlzMatchICPCtr().
WlzErrorNum WlzGMFilterGeomLP | ( | WlzGMModel * | model, |
double | kPB, | ||
double | kSB, | ||
double | dPB, | ||
double | dSB, | ||
int | maxItr, | ||
int | nonMan | ||
) |
Performs a low pass filtering operation on the geometry of the model, given the band pass and band stop filter parameters. These parameters specify the transfer function of the low pass filter.
\li \form#397 The band pass frequency parameter which is the interface between the pass and transition bands of the filter. \li \form#398 The stop band frequency parameter which is the interface between the transition and stop bands of the filter. \li \form#399 The band pass delta parameter which is the maximum deviation from a flat response in the band pass region. \li \form#400 The stop band delta parameter which is the maximum deviation from a flat response in the stop band region.
model | Given model. |
kPB | The band pass frequency parameter. |
kSB | The band stop frequency parameter. |
dPB | The pass band maximum deviation. |
dSB | The stop band maximum deviation. |
maxItr | Minimum number of itterations. |
nonMan | If non-zero allows non manifold vertices to be filtered. |
References WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzGMFilterGeomLPLM(), and WlzGMFilterGeomLPParam().
WlzErrorNum WlzGMFilterGeomLPParam | ( | double * | dstLambda, |
double * | dstMu, | ||
int * | dstNItr, | ||
double | kPB, | ||
double | kSB, | ||
double | dPB, | ||
double | dSB | ||
) |
Computes the values of \(\lambda\) and \(\mu\) from the given low pass filter parameters \(k_{PB}\), \(k_{SB}\), \(\delta_{PB}\) and \(\delta_{SB}\). Valid filter parameters require: \(0 < k_{PB} < 1\), \(k_{PB} < k_{SB} < 2\), \(0 < \delta_{PB} < 1\) and \(0 < \delta_{SB} < 1\). If the parameters are outside of these ranges an error is returned, but these constrants are not sufficient for a good filter. Design tips are don't make the transition band too narrow (keep \(k_{PB}\) away from \(k_{SB}\)) and don't make \(\delta_{PB}\) or \(\delta_{SB}\) too small (try values of 0.1 for \(\delta_{PB}\) and \(\delta_{SB}\)). Good values for \(k_{PB}\) are probably in the range \([0.01-0.1]\). The values of \(\lambda\) and \(\mu\) in the transfer function of the filter
\[ f(k) = ((1 - {\lambda}k)(1 - {\mu}k))^N \]
are constrained by:
\[ 0 < N \]
\[ 0 < \lambda < -\mu < 1 \]
\[ \lambda < \frac{1}{k_{SB}} \]
\[ \frac{1}{\lambda} + \frac{1}{\mu} = k_{PB} \]
\[ {\left(\frac{{(\lambda - \mu)}^2} {-4\lambda\mu}\right)}^N < 1 + \delta_{PB} \]
\[ {\left(\frac{1 - \lambda k_{SB}} {1 - \mu k_{SB}}\right)}^N < \delta_{SB} \]
Following Taubin's fairing paper an additional constraint is imposed \(f(1) = -f(2)\), which allows a simple algebraic solution for \(\lambda\), \(\mu\). The value of \(N\) is then computed by taking the maximum of \(N_{PB}\) and \(N_{SB}\). So the algorithm used to compute the values of \(\lambda\), \(\mu\) and \(N\) is:
\[ \lambda = \frac{1}{3 k_{PB} - 5} (k_{PB} - \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \]
\[ \mu = \frac{1}{3 k_{PB} - 5} (k_{PB} + \sqrt{k_{PB}^2 - 6 k_{PB} + 10}) \]
\[ N_{PB} = \frac{\ln{(1 + \delta_{PB})}} {\ln{({(\lambda - \mu)}^2 (-4 \lambda \mu))}} \]
\[ N_{SB} = \frac{\ln{(\delta_{SB})}} {\ln{((1 - \lambda k_{SB})(1 - \mu k_{SB}))}} \]
\[ N = \max{(N_{PB}, N_{SB})} \]
.
dstLambda | Destination pointer for the positive scale factor, must NOT be NULL. |
dstMu | Destination pointer for the negative scale factor, must NOT be NULL. |
dstNItr | Destination pointer for the number of itterations, may be NULL. |
kPB | The band pass frequency parameter. |
kSB | The band stop frequency parameter. |
dPB | The pass band maximum deviation. |
dSB | The stop band maximum deviation. |
References WLZ_ERR_NONE, and WLZ_ERR_PARAM_DATA.
Referenced by WlzCMeshLPFilter(), and WlzGMFilterGeomLP().
WlzErrorNum WlzGMFilterGeomLPLM | ( | WlzGMModel * | model, |
double | lambda, | ||
double | mu, | ||
int | nItr, | ||
int | nonMan | ||
) |
Given values of \(\lambda\), \(\mu\) and the number of itterations \(N\), applies a low pass filter to the geometry of the given model.
This filter is based on two papers by Taubin: \li Gabriel Taubin. Curve and Surface Smoothing without Shrinkage. International Conference on Computer Vision (ICCV'95) Conference Procedings, 827-857, 1995. \li Gabriel Taubin. A Signal Processing Approach to Fair Surface Design. Computer Graphics, 29, 351-358, 1995. The filter repeatedly applies a pair of filters to the geometry of the model vertices, of the form:
\[ {v_i}' = v_i + \lambda \Delta v_i \]
and\[ {v_i}'' = {v_i}' + \mu \Delta {v_i}' \]
Where \(v_i\) is the geometry of the i'th vertex and \(Delta v_i\) is given by\[ \Delta v_i = \sum_{j \in i^*}{w_{ij}(v_j - v_i)} \]
this is just the weighted sum of weighted differences between the vertex and it's first order neighbourhood, with \(i^*\) being the number of neighbours. The weights \(w_{ij}\) are computed using\[ w_{ij} = \frac{1}{i^*} \]
If the topology of a vertex is manifold, then Taubin's filter is applied as set out in the two papers. But if the topology is non-manifold different stratagies are applied to prevent the shrinkage (in non-manifold regions) which Taubin's filter would cause.model | The geometric model. |
lambda | Positive filter parameter. |
mu | Negative filter parameter. |
nItr | Number of itterations. |
nonMan | If non-zero allows non manifold vertices to be filtered. |
References AlcMalloc(), AlcVectorItemGet(), _WlzVertexP::d2, _WlzVertexP::d3, _WlzGMVertexT::diskT, _WlzGMVertex::diskT, _WlzGMVertex::geo, _WlzVertexP::i2, _WlzVertexP::i3, _WlzGMVertex::idx, _WlzGMDiskT::next, _WlzGMEdgeT::next, _WlzGMResource::numIdx, _WlzGMEdgeT::opp, _WlzGMVertexT::parent, _WlzGMEdgeT::prev, _WlzGMEdgeT::rad, _WlzGMModel::res, _WlzGMModel::type, _WlzVertexP::v, _WlzGMResource::vec, _WlzGMDiskT::vertex, _WlzGMModelR::vertex, _WlzGMDiskT::vertexT, _WlzGMEdgeT::vertexT, _WlzGMVertexGU::vg2D, _WlzGMVertexGU::vg2I, _WlzGMVertexGU::vg2N, _WlzGMVertexGU::vg3D, _WlzGMVertexGU::vg3I, _WlzGMVertexGU::vg3N, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzGMVertexG2I::vtx, _WlzGMVertexG2D::vtx, _WlzGMVertexG2N::vtx, _WlzGMVertexG3I::vtx, _WlzGMVertexG3D::vtx, _WlzGMVertexG3N::vtx, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GMELM_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WLZ_NINT, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VTX_3_ADD, WlzDVerticesFromGM(), WlzGMModelGetDimension(), WlzGMModelRehashVHT(), and WlzGMModelSetSG().
Referenced by WlzGMFilterGeomLP().
int WlzGMModelSpxStats | ( | WlzGMModel * | model, |
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates statistics of the simplices in the given geometric model. This can be useful for checking the quality of a given model.
model | Given model. |
dstMin | Destination pointer for minimum simplex length or area, may be NULL. |
dstMax | Destination pointer for maximum simplex length or area, may be NULL. |
dstSum | Destination pointer for sum of simplex length or area, may be NULL. |
dstSumSq | Destination pointer for sum of squares of simplex length or area, may be NULL. |
dstMean | Destination pointer for mean simplex length or area, may be NULL. |
dstStdDev | Standard deviation of simplex length or area, may be NULL. |
dstErr | Destination pointer for error number, may be NULL if not required. |
References AlcVectorItemGet(), _WlzVertex::d2, _WlzVertex::d3, _WlzGMVertexT::diskT, _WlzGMModelR::edge, _WlzGMEdge::edgeT, _WlzGMLoopT::edgeT, _WlzGMModelR::face, _WlzGMEdge::idx, _WlzGMFace::idx, _WlzGMFace::loopT, _WlzGMEdgeT::next, _WlzGMEdgeT::opp, _WlzGMEdgeT::prev, _WlzGMModel::res, _WlzGMModel::type, _WlzGMResource::vec, _WlzGMDiskT::vertex, _WlzGMEdgeT::vertexT, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WLZ_VTX_2_SQRLEN, WLZ_VTX_2_SUB, WlzGeomTriangleArea2Sq3(), WlzGMVertexGetG2D(), and WlzGMVertexGetG3D().