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_data * | get_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_curve * | transform2Cpy (Dtk_transfo *inMatrix) |
~Dtk_mesh_curve () | |
Default destructor. More... | |
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.
Dtk_mesh_curve::Dtk_mesh_curve | ( | ) |
Default constructor.
Dtk_mesh_curve::~Dtk_mesh_curve | ( | ) |
Default destructor.
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)
inIndice | : indice |
void Dtk_mesh_curve::add_vertex | ( | Dtk_pnt | inVertex | ) |
Add a vertex to the vertices array.
inVertex | : vertex to add |
DTK_MESH_CRV_TYPE Dtk_mesh_curve::get_crv_type | ( | ) |
Return the curve nature.
unsigned long Dtk_mesh_curve::get_id | ( | ) |
Return the ID of the curve.
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.
inNum | : indice to return |
int Dtk_mesh_curve::get_linetype | ( | ) |
Get line type of Dtk_mesh_curve.
Dtk_mesh_circle_data* Dtk_mesh_curve::get_mesh_circle_data | ( | ) |
Dtk_Size_t Dtk_mesh_curve::get_nb_indices | ( | ) |
Return the indices array size.
Dtk_Size_t Dtk_mesh_curve::get_nb_vertices | ( | ) |
Return the vertices array size.
float Dtk_mesh_curve::get_thickness | ( | ) |
Get thickness of Dtk_mesh_curve.
int Dtk_mesh_curve::get_type | ( | ) |
Return the curve type.
int Dtk_mesh_curve::get_vertex | ( | Dtk_Size_t | inIndice, |
Dtk_pnt * | outVertex | ||
) |
Get a vertex from the verxtex array.
inIndice | : number of the vertex to get | |
[out] | outVertex | : vertex returned |
int Dtk_mesh_curve::pop_indice | ( | ) |
Pop the last indice from the indices array.
int Dtk_mesh_curve::pop_vertex | ( | Dtk_pnt * | ) |
Pop the last vertex from the vertices array.
void Dtk_mesh_curve::set_color | ( | int | R, |
int | G, | ||
int | B | ||
) |
Set a RGB color to the curve.
R,G,B | : RGB values |
void Dtk_mesh_curve::set_crv_type | ( | DTK_MESH_CRV_TYPE | type | ) |
Set the curve nature.
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) |
void Dtk_mesh_curve::set_id | ( | unsigned long | inID | ) |
Set an ID to the curve.
inID | : ID |
void Dtk_mesh_curve::set_linetype | ( | int | inLineType | ) |
Set line type in Dtk_mesh_curve.
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)
inCircle | A Dtk_mesh_circle_data object, filled. |
void Dtk_mesh_curve::set_thickness | ( | float | inThickness | ) |
Set thickness in Dtk_mesh_curve.
void Dtk_mesh_curve::set_type | ( | int | inType | ) |
Set the curve type.
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
Dtk_mesh_curve* Dtk_mesh_curve::transform2Cpy | ( | Dtk_transfo * | inMatrix | ) |