DATAKIT API  V2025.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TesselationEngine.hpp File Reference

Go to the source code of this file.

Functions

void EndTesselation ()
 
DtkErrorStatus InitTesselation ()
 

Function Documentation

◆ EndTesselation()

void EndTesselation ( )
41 {
43 }

◆ InitTesselation()

DtkErrorStatus InitTesselation ( )
14 {
15  DtkErrorStatus TesselationStatus = dtkErrorAllocation;
16 
17  //Initialization of tessellation library (used for PDF)
18  TesselationStatus = (DtkErrorStatus)tess_InitTesselation("tess_tmp", 0.05);
19 
20  //Deactivating linear and angular tolerance => Angular tolerance of 10 degrees will be used
23 
24  //You can also use your own tessellation parameters :
25  /*
26  double LinearTol = 0.1;
27  tess_set_linear(LinearTol);
28  double AngularTol = 0.175; // angle in radian
29  tess_set_angular(AngularTol); */
30 
31  if (TesselationStatus != dtkNoError)
32  {
33  cout << "Warning : Tesselation failed to start : " << dtkTypeError(TesselationStatus).c_str() << endl;
34  }
35 
36  TessStatus = TesselationStatus;
37  return TesselationStatus;
38 }
DTK_TRUE
#define DTK_TRUE
Definition: define.h:727
tess_InitTesselation
int tess_InitTesselation(Dtk_string inWorkingDirectory, double inTolerance)
Init the tesselation library.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
dtkTypeError
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
dtkErrorAllocation
@ dtkErrorAllocation
Definition: error_dtk.hpp:137
Dtk_string::c_str
const char * c_str() const
Retrieve the ASCII conversion string.
tess_disableTolAngular
Dtk_bool tess_disableTolAngular()
: return state of Angular tolerance method
tess_EndTesselation
void tess_EndTesselation()
Free the data used by tesselation library.
DtkErrorStatus
Dtk_ErrorStatus DtkErrorStatus
Definition: error_dtk.hpp:429
TessStatus
int TessStatus
Definition: TesselationEngine.cpp:6
tess_disableTolLinear
Dtk_bool tess_disableTolLinear()
: return state of linear tolerance method
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:140