Definition at line 92 of file tessellate.
◆ _vec3f
typedef float tools::sg::tessellate::_vec3f[3] |
|
protected |
◆ Func
◆ prims_t
◆ tessellate() [1/2]
tools::sg::tessellate::tessellate |
( |
std::ostream & |
a_out | ) |
|
|
inline |
Definition at line 97 of file tessellate.
99 mem::increment(s_class().c_str());
◆ ~tessellate()
virtual tools::sg::tessellate::~tessellate |
( |
| ) |
|
|
inlinevirtual |
Definition at line 115 of file tessellate.
119 mem::decrement(s_class().c_str());
◆ tessellate() [2/2]
tools::sg::tessellate::tessellate |
( |
const tessellate & |
a_from | ) |
|
|
inline |
Definition at line 123 of file tessellate.
125 mem::increment(s_class().c_str());
◆ _clear()
void tools::sg::tessellate::_clear |
( |
| ) |
|
|
inlineprotected |
◆ add_combine_vec3d()
double* tools::sg::tessellate::add_combine_vec3d |
( |
double |
a_x, |
|
|
double |
a_y, |
|
|
double |
a_z |
|
) |
| |
|
inlineprotected |
◆ begin_cbk()
static void GLUAPIENTRY tools::sg::tessellate::begin_cbk |
( |
GLUenum |
a_which, |
|
|
void * |
a_this |
|
) |
| |
|
inlinestaticprotected |
Definition at line 162 of file tessellate.
165 self.m_prims->push_back(
new tess_prim());
166 tess_prim& prim = *(
self.m_prims->back());
167 prim.m_mode = a_which;
168 prim.m_coords.reserve(12);
169 prim.m_norms.reserve(12);
171 self.m_coords = &prim.m_coords;
◆ clear()
void tools::sg::tessellate::clear |
( |
| ) |
|
|
inline |
◆ combine_cbk()
static void GLUAPIENTRY tools::sg::tessellate::combine_cbk |
( |
double |
a_coords[3], |
|
|
void * |
[4], |
|
|
float |
[4], |
|
|
void ** |
a_data_out, |
|
|
void * |
a_this |
|
) |
| |
|
inlinestaticprotected |
Definition at line 250 of file tessellate.
256 double* v =
self.add_combine_vec3d(a_coords[0],a_coords[1],a_coords[2]);
◆ do_it()
void tools::sg::tessellate::do_it |
( |
size_t |
a_npt, |
|
|
const double * |
a_contour, |
|
|
prims_t & |
a_prims |
|
) |
| |
|
inline |
Definition at line 143 of file tessellate.
146 double* pos = (
double*)a_contour;
147 for(
size_t i=0;i<a_npt;i++,pos+=3) {
◆ end_cbk()
static void GLUAPIENTRY tools::sg::tessellate::end_cbk |
( |
void * |
a_this | ) |
|
|
inlinestaticprotected |
Definition at line 187 of file tessellate.
190 tess_prim& prim = *(
self.m_prims->back());
195 add_prm aprm(
self.
m_out,prim.m_norms);
197 float* data = vec_data<float>(prim.m_coords);
201 if(!aprm.add_triangles(prim.m_coords.size(),data,
false)) {
202 self.m_out <<
"tools::sg::tessellate::end_cbk : "
203 <<
" add_triangles failed."
208 if(!aprm.add_triangle_strip(prim.m_coords.size(),data,
false)){
209 self.m_out <<
"tools::sg::tessellate::end_cbk : "
210 <<
" add_triangle_strip failed."
216 if(!aprm.add_triangle_fan(prim.m_coords.size(),data,
false)) {
217 self.m_out <<
"tools::sg::tessellate::end_cbk : "
218 <<
" add_triangle_fan failed."
223 self.m_out <<
"tools::sg::tessellate::end_cbk : "
224 <<
" mode " << prim.m_mode <<
" not yet treated."
229 size_t num = prim.m_coords.size();
230 self.m_out <<
"tools::sg::tessellate::end_cbk :"
231 <<
" primitive anomaly."
232 <<
" num points " << num
233 <<
" mode " << prim.m_mode
234 <<
" (TRIANGLES=4, STRIP=5, FAN=6)."
236 float* pos = vec_data<float>(prim.m_coords);
237 for(
size_t ipt=0;ipt<num;ipt++) {
238 self.m_out <<
" " << ipt <<
" :"
245 prim.m_coords.clear();
246 prim.m_norms.clear();
◆ error_cbk()
◆ operator=()
Definition at line 136 of file tessellate.
137 if(&a_from==
this)
return *
this;
◆ vertex_cbk()
static void GLUAPIENTRY tools::sg::tessellate::vertex_cbk |
( |
void * |
a_vertex, |
|
|
void * |
a_this |
|
) |
| |
|
inlinestaticprotected |
Definition at line 177 of file tessellate.
179 double* vertex = (
double*)a_vertex;
180 self.m_coords->push_back(
float(vertex[0]));
181 self.m_coords->push_back(
float(vertex[1]));
182 self.m_coords->push_back(
float(vertex[2]));
◆ m_combine_trids
std::vector<double*> tools::sg::tessellate::m_combine_trids |
|
protected |
◆ m_combine_trids_num
size_t tools::sg::tessellate::m_combine_trids_num |
|
protected |
◆ m_coords
std::vector<float>* tools::sg::tessellate::m_coords |
|
protected |
◆ m_out
std::ostream& tools::sg::tessellate::m_out |
|
protected |
◆ m_prims
prims_t* tools::sg::tessellate::m_prims |
|
protected |
◆ m_tobj
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/sg/tessellate
#define GLU_TESS_WINDING_POSITIVE
GLUAPI void GLUAPIENTRY gluTessCallback(GLUtesselator *tess, GLUenum which, _GLUfuncptr CallBackFunc)
#define GLU_TESS_COMBINE_DATA
GLUAPI void GLUAPIENTRY gluTessBeginPolygon(GLUtesselator *tess, GLUvoid *data)
GLUAPI void GLUAPIENTRY gluTessBeginContour(GLUtesselator *tess)
#define GLU_TESS_ERROR_DATA
#define tools_vforit(a__T, a__v, a__it)
#define GLU_TESS_END_DATA
GLUAPI void GLUAPIENTRY gluTessEndContour(GLUtesselator *tess)
#define GLU_TESS_BEGIN_DATA
GLUAPI void GLUAPIENTRY gluDeleteTess(GLUtesselator *tess)
GLUAPI void GLUAPIENTRY gluTessEndPolygon(GLUtesselator *tess)
GLUAPI GLUtesselator *GLUAPIENTRY gluNewTess(void)
GLUAPI void GLUAPIENTRY gluTessProperty(GLUtesselator *tess, GLUenum which, GLUdouble data)
#define GLU_TESS_VERTEX_DATA
#define GLU_TESS_WINDING_RULE