TIN Toolkit

:Associate with "TIN Toolkit" More...

Functions

int MftAddLine (TEHANDLE th, DPOINT3D *Line, INT32 Num)
int MftAddLineExt (TEHANDLE th, DPOINT3D *Line, INT32 Num, int HasElevation)
int MftAddNode (TEHANDLE th, DPOINT3D *P)
int MftAddNodeExt (TEHANDLE th, DPOINT3D *P, int TryOutside)
int MftAddSegment (TEHANDLE th, DPOINT3D *start, DPOINT3D *end, UINT8 type, int HasElevation)
int MftAddVectorBreaklines (TEHANDLE th, const UNICODE *filename, INT32 inode, INT32 gvectinode)
int MftApplyExclude (TEHANDLE th, DPOLYGON *Exclude, INT32 NumExclude)
int MftBuildNodeToEdgeLinks (TEHANDLE th)
int MftClipByVector (TEHANDLE th, const UNICODE *filename, INT32 inode, INT32 gvectinode, int ClipMode)
int MftClose (TEHANDLE th, UINT32 flags)
int MftComputeElevation (TEHANDLE thandle, DPOINT3D *P)
int MftComputeExtents (TEHANDLE th)
int MftComputeStatistics (TEHANDLE th)
int MftCreateTIN (TEHANDLE th, DPOINT3D *Nodes, INT32 NumNodes, DOUBLE zscale, DOUBLE zoffset, DOUBLE xytolerance)
int MftCreateTINBatch (TEHANDLE th, DPOINT3D **Data, INT32 NumNodes, DOUBLE zscale, DOUBLE zoffset, DOUBLE xytolerance)
int MftDeleteEdgeHole (TEHANDLE th, INT32 Num)
int MftDeleteEdges (TEHANDLE th, INT32 *List, INT32 Nums)
int MftDeleteNode (TEHANDLE th, INT32 Num)
int MftDeleteNodeHole (TEHANDLE th, INT32 NodeNum)
int MftDeleteNodes (TEHANDLE th, INT32 *NodeList, INT32 Nums)
int MftDeleteNodesHole (TEHANDLE th, INT32 *NodeList, INT32 Nums)
int MftDeleteTriangleHole (TEHANDLE th, INT32 Num)
int MftDeleteTriangles (TEHANDLE th, INT32 *List, INT32 Nums)
int MftEnableCallbacks (TEHANDLE vh, bool Flag)
int MftGenerateTIN (TEHANDLE th, DPOINT3D *Pool, INT32 NumPoints, DPOLYGON *Clip, DPOLYGON *Exclude, INT32 NumExclude, INT32 Flag)
int MftGetConnectedNodeList (TEHANDLE th, INT32 Num, INT32 **list)
int MftGetDBHandle (TEHANDLE th, int ElemType)
int MftGetEdgeAzimuth (TEHANDLE th, INT32 NodeNum, RVCTINEDGE *Edge, DOUBLE *Angle)
int MftGetElemRect (TEHANDLE vh, int ElemType, INT32 ElemNum, DRECT2D *rect)
int MftGetHandle (TEHANDLE th)
INT32 MftGetNodeEdges (TEHANDLE vh, INT32 Num, INT32 **edgelist)
int MftGetNodes (TEHANDLE th, INT32 NodeNum, INT32 *NumNodes, void **Array, INT32 **List, INT32 flag)
INT32 MftGetNumElements (TEHANDLE th, int ElemType)
int MftGetPlaneEquation (TEHANDLE thandle, INT32 TriNum, DOUBLE *a, DOUBLE *b, DOUBLE *c, DOUBLE *d)
void * MftGetQTree (TEHANDLE th, int ElemType)
int MftGetStyleHandle (TEHANDLE th)
int MftGetSurroundTriangles (TEHANDLE th, INT32 NodeNum, INT32 **TriList, INT32 **EdgeList, INT32 **NodeList, INT32 *trinum, INT32 *edgenum, INT32 *nodenum)
int MftGetTrianglesPoly (TEHANDLE th, DPOLYGON *poly, INT32 **TList, INT32 *num)
double MftGetZValue (TEHANDLE th, int ElemType, INT32 ElemNum)
TEHANDLE MftInit (void)
int MfTINMerge (int idA, INT32 ginodeA, int idB, INT32 ginodeB, RVC::OBJITEM &ObjItem)
int MftMedianFiltering (TEHANDLE thandle)
int MftNew (TEHANDLE vh, const UNICODE *filename, RVCTININFO *Info, UINT32 flags)
int MftOpen (TEHANDLE vh, const UNICODE *filename, INT32 inode, RVCTININFO *vinfo, UINT32 flags)
int MftRebuildHulls (TEHANDLE th)
int MftRebuildTIN (TEHANDLE th)
ERRVALUE MftRecoverFromUndo (TEHANDLE th)
int MftRemoveFlatNodes (TEHANDLE thandle, DOUBLE dz, DOUBLE minedge)
int MftRemoveLongEdges (TEHANDLE th, DOUBLE distance)
void MftRemoveNotifyCallback (TEHANDLE th, void(*NotifyCB)(MftAnyCallbackStruct *, void *))
int MftSave (TEHANDLE th, int dfindex, RVCGENINFO *geninfo, UINT32 flags)
void MftSetDatabaseMode (TEHANDLE th, int ElemType, UINT32 dbtype)
UINT32 MftSetFlags (TEHANDLE vh, UINT32 flags)
void MftSetNotifyCallback (TEHANDLE th, void(*NotifyCB)(MftAnyCallbackStruct *, void *), void *udata)
void MftSetQTree (TEHANDLE vh, int ElemType, QTREEHANDLE qtree)
int MftSetup (TEHANDLE vh, int id, RVCTININFO *tinfo, UINT32 flags)
int MftSetZValue (TEHANDLE vh, int ElemType, INT32 ElemNum, double zvalue)
void MftStop (TEHANDLE th)
int MftValidateTINTopology (TEHANDLE th, INT32 flag)

Detailed Description

:Associate with "TIN Toolkit"


Function Documentation

int MftAddLine TEHANDLE  th,
DPOINT3D Line,
INT32  Num
 

Add a "hard edge" breakline to the TIN structure.

Parameters:
th  TIN toolkit handle
Line  Line to add
Num  Number of points in line

int MftAddLineExt TEHANDLE  th,
DPOINT3D Line,
INT32  Num,
int  HasElevation
 

Add a "hard edge" breakline to the TIN structure, with elevation control.

Parameters:
th  TIN toolkit handle
Line  Line to add
Num  Number of points in line
HasElevation  Set to TRUE if this is a "real" 3D line, otherwise set to FALSE

int MftAddNode TEHANDLE  th,
DPOINT3D P
 

Add new node to the TIN structure.

Parameters:
th  TIN toolkit handle
P  New node location

int MftAddNodeExt TEHANDLE  th,
DPOINT3D P,
int  TryOutside
 

Add new node to TIN.

Parameters:
th  TIN toolkit handle
P  New node location

int MftAddSegment TEHANDLE  th,
DPOINT3D start,
DPOINT3D end,
UINT8  type,
int  HasElevation
 

Add a breakline to the TIN structure as a 2 point segment.

Parameters:
th  TIN toolkit handle
start  Start point
end  End point
type  0 for "soft" edge, TINEDGE_Hard for "hard" edge
HasElevation  Number of points in line - not set when breakline doesn't have an elevation

int MftAddVectorBreaklines TEHANDLE  th,
const UNICODE filename,
INT32  inode,
INT32  gvectinode
 

Add breaklines to the TIN structure from the vector object.

Parameters:
th  TIN toolkit handle
filename  Vector filename
inode  Vector object inode
gvectinode  Inode of the georeference subobject to use

int MftApplyExclude TEHANDLE  th,
DPOLYGON Exclude,
INT32  NumExclude
 

Remove all triangles that fall within given list of exclude areas (polygons).

Parameters:
th  TIN toolkit handle
Exclude  List of polygons
NumExclude  Number of exclude polygons

int MftBuildNodeToEdgeLinks TEHANDLE  th  ) 
 

Create list of connected edges for each node (Node-to-Edge link table).

Parameters:
th  TIN toolkit handle

int MftClipByVector TEHANDLE  th,
const UNICODE filename,
INT32  inode,
INT32  gvectinode,
int  ClipMode
 

Clip TIN structure using vector object.

Parameters:
th  TIN toolkit handle
filename  Vector filename
inode  Vector object inode
gvectinode  Inode of the georeference subobject to use
ClipMode  Flag: TINCLIPMODE_Include or TINCLIPMODE_Exclude

int MftClose TEHANDLE  th,
UINT32  flags
 

Close current TIN object.

Parameters:
th  TIN toolkit handle
flags  Flags

int MftComputeElevation TEHANDLE  thandle,
DPOINT3D P
 

Compute z-value for a given x,y location.

Parameters:
thandle  TIN toolkit handle
P  Point to calculate z-value from

int MftComputeExtents TEHANDLE  th  ) 
 

Recompute extents for whole TIN object.

Parameters:
th  TIN toolkit handle

int MftComputeStatistics TEHANDLE  th  ) 
 

Compute standart statistics for TIN triangles.

Parameters:
th  TIN toolkit handle

int MftCreateTIN TEHANDLE  th,
DPOINT3D Nodes,
INT32  NumNodes,
DOUBLE  zscale,
DOUBLE  zoffset,
DOUBLE  xytolerance
 

Create TIN from scratch or replace existing TIN.

Parameters:
th  TIN toolkit handle
Nodes  List of input points
NumNodes  Number of input points
zscale  Scale coeff
zoffset  Offset coeff
xytolerance  Tolerance, minim. allowed distance between points

int MftCreateTINBatch TEHANDLE  th,
DPOINT3D **  Data,
INT32  NumNodes,
DOUBLE  zscale,
DOUBLE  zoffset,
DOUBLE  xytolerance
 

Create TIN from scratch with minimized memory usage.

NO QTREE WILL BE MAINTAINED !!! THIS FUNCTIONS IS NOT FOR USAGE WITHIN TNTedit!

Parameters:
th  TIN toolkit handle
NumNodes  Number of nodes
zscale  Z scale
zoffset  Z offset
xytolerance  XY tolerance

int MftDeleteEdgeHole TEHANDLE  th,
INT32  Num
 

Delete edge (and 2 adj.

triangles) and make a hole in the TIN.

IMPORTANT: Do not use this function to delete more than one edge, UNLESS you have sorted Nums in descending order. Edge numbers might changed after each call.

Parameters:
th  TIN toolkit handle
Num  Edge Number

int MftDeleteEdges TEHANDLE  th,
INT32 List,
INT32  Nums
 

Delete set of edges.

Parameters:
th  TIN toolkit handle
List  Edges to delete
Nums  Number of edges

int MftDeleteNode TEHANDLE  th,
INT32  Num
 

Delete given node and recompute triangulation in affected area.

Parameters:
th  TIN toolkit handle
Num  Node number to delete

int MftDeleteNodeHole TEHANDLE  th,
INT32  NodeNum
 

Delete node from tin object and make a hole there.

IMPORTANT: Do not use this function to delete more than one node, UNLESS you have sorted NodeNum in descending order. Node numbers might changed after each call.

Parameters:
th  TIN toolkit handle
NodeNum  Number of node

int MftDeleteNodes TEHANDLE  th,
INT32 NodeList,
INT32  Nums
 

Delete set of nodes.

Parameters:
th  TIN toolkit handle
NodeList  Nodes to delete
Nums  Number of nodes

int MftDeleteNodesHole TEHANDLE  th,
INT32 NodeList,
INT32  Nums
 

Delete set of nodes.

Parameters:
th  TIN toolkit handle
NodeList  Nodes to delete
Nums  Number of nodes

int MftDeleteTriangleHole TEHANDLE  th,
INT32  Num
 

Make a "hole" from triangle.

IMPORTANT: Do not use this function to delete more than one triangle, UNLESS you have sorted Nums in descending order. Triangle numbers might changed after each call.

Parameters:
th  TIN toolkit handle
Num  Triangle number

int MftDeleteTriangles TEHANDLE  th,
INT32 List,
INT32  Nums
 

Delete set of triangles.

Parameters:
th  TIN toolkit handle
List  Triangles to delete
Nums  Number of triangles

int MftEnableCallbacks TEHANDLE  vh,
bool  Flag
 

Enable/disable callback calls.

Parameters:
vh  TIN toolkit handle
Flag  Enable / disable callback flag

int MftGenerateTIN TEHANDLE  th,
DPOINT3D Pool,
INT32  NumPoints,
DPOLYGON Clip,
DPOLYGON Exclude,
INT32  NumExclude,
INT32  Flag
 

General function for building TINs.

AVOID USING THIS FUNCTION UNLESS YOUR COMPLETELY UNDERSTAND THE FOLLOWING INFORMATION. USE SPECIALIZED FUNCTIONS INSTEAD.

WARNING: This function intended to rebuild topology for entire TIN or add one hull (!). If programmer wants to rebuild entire TIN and not to use any cliping areas or exclude areas - set all NumNodes, NumEdges and NumTriangles to zero. Otherwise, this function will add new elements to the end of each table. If programmer wants to build complex TIN object with multiple hulls - call this function for each separate hull. Programmers needs in this case description of "CLIP" polygon and list of exclude areas. Clip polygon can be only one per hull. WARNING: if you want to rebuild entire tin object do not forget to set minval and maxval before calling this function to DBL_MAX & DBL_MIN.

Note : This function will NOT UPDATE hull structure unless flag is set. ATTENTION: This function will update QTrees. ATTENTION: New nodes should be not in Qtree structure before calling this function - in this case there will be a redundancy.

Parameters:
th  TIN toolkit handle
Pool  Input points, not necessary all points should belong to this hull
NumPoints  Number of input points
Clip  Clip polygon
Exclude  List of exclude areas
NumExclude  Number of exclude areas in the previous list
Flag  Flag: 1 - update all hull strcutures, 0 - skip

int MftGetConnectedNodeList TEHANDLE  th,
INT32  Num,
INT32 **  list
 

Get list of all nodes connected to given node.

Returns:
number of nodes - on success, < 0 on error. NOTE: this function assumes that TIN object has node-to-edge links, if not call MftBuildNodeToEdgeLinks(..) function.
Parameters:
th  TIN toolkit handle
Num  Node number
list  List of node numbers returned

int MftGetDBHandle TEHANDLE  th,
int  ElemType
 

Does nothing now.

Parameters:
th  TIN toolkit handle
ElemType  Element type

int MftGetEdgeAzimuth TEHANDLE  th,
INT32  NodeNum,
RVCTINEDGE Edge,
DOUBLE Angle
 

Get orienation for the given edge.

NOTE: angle measured in radians

Parameters:
th  TIN toolkit handle
NodeNum  Node number that will be a start point
Edge  Edge description (passed)
Angle  Orientation angle (returned)

int MftGetElemRect TEHANDLE  vh,
int  ElemType,
INT32  ElemNum,
DRECT2D rect
 

Get extents for specified element.

Parameters:
vh  TIN toolkit handle
ElemType  Element type
ElemNum  Element number
rect  Extents rectangle returned

int MftGetHandle TEHANDLE  th  ) 
 

Get TIN handle.

Returns:
TIN id
Parameters:
th  TIN toolkit handle

INT32 MftGetNodeEdges TEHANDLE  vh,
INT32  Num,
INT32 **  edgelist
 

Get sorted list of edges that connected to this node.

Returns:
number of edges or error if < 0 IMPORTANT: This function assumes that there is no Node-to-Edge link table in TIN object. This function used to build such list.
Parameters:
vh  TIN toolkit handle
Num  Node number
edgelist  List of edge numbers returned

int MftGetNodes TEHANDLE  th,
INT32  NodeNum,
INT32 NumNodes,
void **  Array,
INT32 **  List,
INT32  flag
 

Get a list of tin nodes as DPOINT3D/DPOINT2D/RVCTINNODE array.

Parameters:
th  TIN toolkit handle
NodeNum  Node number
NumNodes  Number of connected nodes returned
Array  Nodes data returned
List  List of connected node numbers
flag  if flag = 0, output is RVCTINNODE, 1 - DPOINT3D, 2 - DPOINT2D

INT32 MftGetNumElements TEHANDLE  th,
int  ElemType
 

Get number of element of specified type.

Parameters:
th  TIN toolkit handle
ElemType  Element type

int MftGetPlaneEquation TEHANDLE  thandle,
INT32  TriNum,
DOUBLE a,
DOUBLE b,
DOUBLE c,
DOUBLE d
 

Compute plane equation coefficients for given triangle.

NOTE: a * x + b * y + c * z + d = 0

Parameters:
thandle  TIN toolkit handle
TriNum  Triangle number
a  X coefficient returned
b  Y coefficient returned
c  Z coefficient returned
d  offset returned

void* MftGetQTree TEHANDLE  th,
int  ElemType
 

Get qtree handle for specified element.

Parameters:
th  TIN toolkit handle
ElemType  Element type

int MftGetStyleHandle TEHANDLE  th  ) 
 

Does nothing now.

Parameters:
th  TIN toolkit handle

int MftGetSurroundTriangles TEHANDLE  th,
INT32  NodeNum,
INT32 **  TriList,
INT32 **  EdgeList,
INT32 **  NodeList,
INT32 trinum,
INT32 edgenum,
INT32 nodenum
 

Get list of triangles which have given node as vertex.

Parameters:
th  TIN toolkit handle
NodeNum  Node number
TriList  List of triangles returned
EdgeList  List of surround edges returned
NodeList  List of surround nodes returned
trinum  Number of triangles
edgenum  Number of edges
nodenum  Number of nodes

int MftGetTrianglesPoly TEHANDLE  th,
DPOLYGON poly,
INT32 **  TList,
INT32 num
 

Get list of triangles that are within (even partially) given polygon.

Parameters:
th  TIN toolkit handle
poly  Polygon description
TList  List of triangles returned
num  Number of triangles returned

double MftGetZValue TEHANDLE  th,
int  ElemType,
INT32  ElemNum
 

Get internal z-value of TIN node.

Returns:
z-value
Parameters:
th  TIN toolkit handle
ElemType  Element type
ElemNum  Element number

TEHANDLE MftInit void   ) 
 

Initialize TIN toolkit handle.

Returns:
TIN Handle

int MfTINMerge int  idA,
INT32  ginodeA,
int  idB,
INT32  ginodeB,
RVC::OBJITEM ObjItem
 

This function blindly combines 2 TINs (using georeference) into one, and recomputes topology.

This function is not a member of TIN toolkit, but it uses it internally. Georeference handling: The output TIN object will have a georeference based on first (A) TIN object.

Parameters:
idA  Input TIN object 1
ginodeA  Georeference inode for TIN object 1
idB  Input TIN object 2
ginodeB  Georeference inode for TIN object 2
ObjItem  output object

int MftMedianFiltering TEHANDLE  thandle  ) 
 

Filter TIN structure.

Parameters:
thandle  TIN toolkit handle

int MftNew TEHANDLE  vh,
const UNICODE filename,
RVCTININFO Info,
UINT32  flags
 

Create new TIN object and initialize toolkit.

Parameters:
vh  TIN toolkit handle
filename  Filename to open
Info  TIN info
flags  Flags

int MftOpen TEHANDLE  vh,
const UNICODE filename,
INT32  inode,
RVCTININFO vinfo,
UINT32  flags
 

Open TIN object and setup.

Parameters:
vh  TIN toolkit handle
filename  Filename to open
inode  Inode of TIN object
vinfo  TIN info
flags  Flags

int MftRebuildHulls TEHANDLE  th  ) 
 

Recreate hull structures.

1. Read edges and find any that has "universe" triangle as neighbor. 2. Start tracing hull from this point until "chain" will be closed 3. Determine is it "universe" or "exclude" hull 4. Save information about this hull and start again until any unprocessed edge exists. All processed edges are marked in the binary array.

Parameters:
th  TIN toolkit handle

int MftRebuildTIN TEHANDLE  th  ) 
 

Rebuild entire TIN as one hull without any respect to exclude areas.

Parameters:
th  TIN toolkit handle

ERRVALUE MftRecoverFromUndo TEHANDLE  th  ) 
 

Recover from the undo operation.

Parameters:
th  TIN toolkit handle

int MftRemoveFlatNodes TEHANDLE  thandle,
DOUBLE  dz,
DOUBLE  minedge
 

Removes nodes that connected to nodes with z-value equal to its own.

This function removes FLAT TRIANGLES using tolerance.

Parameters:
thandle  TIN toolkit handle
dz  Tolerance: max. allowed difference in z-values
minedge  Minimum edge length between 2 nodes that are within dz-tolerance

int MftRemoveLongEdges TEHANDLE  th,
DOUBLE  distance
 

This function will delete edges that are longer than specified length and create empty holes in those areas.

Parameters:
th  TIN toolkit handle
distance  Maximum possible distance

void MftRemoveNotifyCallback TEHANDLE  th,
void(*  NotifyCB)(MftAnyCallbackStruct *, void *)
 

Remove previously assigned notify callback.

Parameters:
th  TIN toolkit handle
NotifyCB  Callback function

int MftSave TEHANDLE  th,
int  dfindex,
RVCGENINFO geninfo,
UINT32  flags
 

Save TIN object in the suppled object.

Parameters:
th  TIN toolkit handle
flags  Flags

void MftSetDatabaseMode TEHANDLE  th,
int  ElemType,
UINT32  dbtype
 

Does nothing now.

Parameters:
th  TIN toolkit handle
ElemType  Element type
dbtype  Database type

UINT32 MftSetFlags TEHANDLE  vh,
UINT32  flags
 

Set flags.

Parameters:
vh  TIN toolkit handle
flags  Flags

void MftSetNotifyCallback TEHANDLE  th,
void(*  NotifyCB)(MftAnyCallbackStruct *, void *),
void *  udata
 

Assign notify callback.

Parameters:
th  TIN toolkit handle
udata  Callback function Callback data

void MftSetQTree TEHANDLE  vh,
int  ElemType,
QTREEHANDLE  qtree
 

Set qtree handle for specified ELEMENTTYPE.

Parameters:
vh  TIN toolkit handle
ElemType  Element type
qtree  Qtree handle

int MftSetup TEHANDLE  vh,
int  id,
RVCTININFO tinfo,
UINT32  flags
 

Setup TIN toolkit for specified TIN object.

Parameters:
vh  TIN toolkit handle
id  Id of TIN object
tinfo  TIN info
flags  Flags

int MftSetZValue TEHANDLE  vh,
int  ElemType,
INT32  ElemNum,
double  zvalue
 

Set internal z-value (for TIN node).

Parameters:
vh  TIN toolkit handle
ElemType  Element type
ElemNum  Element number
zvalue  Z-value

void MftStop TEHANDLE  th  ) 
 

Close & free TIN toolkit.

Parameters:
th  TIN toolkit handle

int MftValidateTINTopology TEHANDLE  th,
INT32  flag
 

Validate TIN topology for entire object.

THIS FUNCTION CAN'T FIX TOPOLOGY!

Parameters:
th  TIN toolkit handle
flag  If flag equals to 0 process will not check node-edge connectivity


Generated on Tue Dec 14 13:20:28 2004 for TNTsdk by  doxygen 1.3.8-20040913