DATAKIT API  V2025.1
Dtk_mesh_curve Class Reference

This is a high level curve class. More...

Public Member Functions

void add_indice (int inIndice)
 Add an indexed vertex to the curve (indice to an external vertices array, like the one inside Dtk_mesh) More...
 
void add_vertex (Dtk_pnt inVertex)
 Add a vertex to the vertices array. More...
 
 Dtk_mesh_curve ()
 Default constructor. More...
 
Dtk_RGB get_color ()
 Return the curve color. More...
 
DTK_MESH_CRV_TYPE get_crv_type ()
 Return the curve nature. More...
 
unsigned long get_id ()
 Return the ID of the curve. More...
 
int get_indice (Dtk_Size_t inNum)
 Get an indice from the indices array. Indices array size must be greater than inNum. More...
 
int get_linetype ()
 Get line type of Dtk_mesh_curve. More...
 
Dtk_mesh_circle_dataget_mesh_circle_data ()
 
Dtk_Size_t get_nb_indices ()
 Return the indices array size. More...
 
Dtk_Size_t get_nb_vertices ()
 Return the vertices array size. More...
 
float get_thickness ()
 Get thickness of Dtk_mesh_curve. More...
 
int get_type ()
 Return the curve type. More...
 
int get_vertex (Dtk_Size_t inIndice, Dtk_pnt *outVertex)
 Get a vertex from the verxtex array. More...
 
int pop_indice ()
 Pop the last indice from the indices array. More...
 
int pop_vertex (Dtk_pnt *)
 Pop the last vertex from the vertices array. More...
 
void set_color (int R, int G, int B)
 Set a RGB color to the curve. More...
 
void set_crv_type (DTK_MESH_CRV_TYPE type)
 Set the curve nature. More...
 
void set_id (unsigned long inID)
 Set an ID to the curve. More...
 
void set_linetype (int inLineType)
 Set line type in Dtk_mesh_curve. More...
 
void set_mesh_circle_data (Dtk_mesh_circle_data *inCircle)
 Set a mesh_circle_data object to the face, in order to add circular datas (for circles) More...
 
void set_thickness (float inThickness)
 Set thickness in Dtk_mesh_curve. More...
 
void set_type (int inType)
 Set the curve type. More...
 
Dtk_mesh_curvetransform2Cpy (Dtk_transfo *inMatrix)
 
 ~Dtk_mesh_curve ()
 Default destructor. More...
 

Detailed Description

This is a high level curve class.

This class gathers all the datas related to a curve. In this class, vertices are indexed or not.

Constructor & Destructor Documentation

◆ Dtk_mesh_curve()

Dtk_mesh_curve::Dtk_mesh_curve ( )

Default constructor.

◆ ~Dtk_mesh_curve()

Dtk_mesh_curve::~Dtk_mesh_curve ( )

Default destructor.

Member Function Documentation

◆ add_indice()

void Dtk_mesh_curve::add_indice ( int  inIndice)

Add an indexed vertex to the curve (indice to an external vertices array, like the one inside Dtk_mesh)

Parameters
inIndice: indice

◆ add_vertex()

void Dtk_mesh_curve::add_vertex ( Dtk_pnt  inVertex)

Add a vertex to the vertices array.

Parameters
inVertex: vertex to add

◆ get_color()

Dtk_RGB Dtk_mesh_curve::get_color ( )

Return the curve color.

Returns
A Dtk_RGB object is returned

◆ get_crv_type()

DTK_MESH_CRV_TYPE Dtk_mesh_curve::get_crv_type ( )

Return the curve nature.

Returns
DTK_MESH_CRV_TYPE value

◆ get_id()

unsigned long Dtk_mesh_curve::get_id ( )

Return the ID of the curve.

◆ get_indice()

int Dtk_mesh_curve::get_indice ( Dtk_Size_t  inNum)

Get an indice from the indices array. Indices array size must be greater than inNum.

Parameters
inNum: indice to return

◆ get_linetype()

int Dtk_mesh_curve::get_linetype ( )

Get line type of Dtk_mesh_curve.

◆ get_mesh_circle_data()

Dtk_mesh_circle_data* Dtk_mesh_curve::get_mesh_circle_data ( )

◆ get_nb_indices()

Dtk_Size_t Dtk_mesh_curve::get_nb_indices ( )

Return the indices array size.

◆ get_nb_vertices()

Dtk_Size_t Dtk_mesh_curve::get_nb_vertices ( )

Return the vertices array size.

◆ get_thickness()

float Dtk_mesh_curve::get_thickness ( )

Get thickness of Dtk_mesh_curve.

◆ get_type()

int Dtk_mesh_curve::get_type ( )

Return the curve type.

◆ get_vertex()

int Dtk_mesh_curve::get_vertex ( Dtk_Size_t  inIndice,
Dtk_pnt outVertex 
)

Get a vertex from the verxtex array.

Parameters
inIndice: number of the vertex to get
[out]outVertex: vertex returned
Returns
return 0 if ok

◆ pop_indice()

int Dtk_mesh_curve::pop_indice ( )

Pop the last indice from the indices array.

◆ pop_vertex()

int Dtk_mesh_curve::pop_vertex ( Dtk_pnt )

Pop the last vertex from the vertices array.

◆ set_color()

void Dtk_mesh_curve::set_color ( int  R,
int  G,
int  B 
)

Set a RGB color to the curve.

Parameters
R,G,B: RGB values

◆ set_crv_type()

void Dtk_mesh_curve::set_crv_type ( DTK_MESH_CRV_TYPE  type)

Set the curve nature.

Parameters
type: can be DTK_MESH_CIRCLE, DTK_MESH_LINE or DTK_MESH_OTHERCRV if DTK_MESH_CIRCLE, the Dtk_mesh_curve object must have a mesh_circle_data object set (see set_mesh_circle_data(..) help)

◆ set_id()

void Dtk_mesh_curve::set_id ( unsigned long  inID)

Set an ID to the curve.

Parameters
inID: ID

◆ set_linetype()

void Dtk_mesh_curve::set_linetype ( int  inLineType)

Set line type in Dtk_mesh_curve.

◆ set_mesh_circle_data()

void Dtk_mesh_curve::set_mesh_circle_data ( Dtk_mesh_circle_data inCircle)

Set a mesh_circle_data object to the face, in order to add circular datas (for circles)

Parameters
inCircleA Dtk_mesh_circle_data object, filled.

◆ set_thickness()

void Dtk_mesh_curve::set_thickness ( float  inThickness)

Set thickness in Dtk_mesh_curve.

◆ set_type()

void Dtk_mesh_curve::set_type ( int  inType)

Set the curve type.

Parameters
inType: type of the curve, can be :
-    \b DTK_CGR_CRV_WIREFRAME_INDICE        : wireframe curve with indexed vertices\n
-    \b DTK_CGR_CRV_WIREFRAME_PNTS        : wireframe curve non indexed\n
-    \b DTK_CGR_CRV_BOUNDARY_INDICE        : boundary curve with indexed vertices\n
-    \b DTK_CGR_CRV_BOUNDARY_PNTS        : boundary curve non indexed\n
-    \b DTK_CGR_CRV_NO_BOUNDARY_INDICE    : internal\n
-    \b DTK_CGR_CRV_NO_BOUNDARY_PNTS        : internal\n


◆ transform2Cpy()

Dtk_mesh_curve* Dtk_mesh_curve::transform2Cpy ( Dtk_transfo inMatrix)