KiCad PCB EDA Suite
FACET Class Reference

#include <wrlfacet.h>

Public Member Functions

 FACET ()
 
void Init ()
 
bool HasMinPoints ()
 
bool HasColors ()
 
void AddVertex (WRLVEC3F &aVertex, int aIndex)
 Function AddVertex adds the vertex and its associated index to the internal list of polygon vertices. More...
 
void AddColor (const SGCOLOR &aColor)
 Function AddColor adds the given RGB color to the internal list. More...
 
float CalcFaceNormal ()
 Function CalcFaceNormal calculates the normal to the facet assuming a CCW orientation and performs the calculation of the angle weighted vertex normals. More...
 
void Renormalize (float aMaxValue)
 
void CalcVertexNormal (int aIndex, std::list< FACET * > &aFacetList, float aCreaseAngle)
 Function CalcVertexNormal calculates the weighted normal for the given vertex. More...
 
bool GetWeightedNormal (int aIndex, WRLVEC3F &aNorm)
 Function GetWeightedNormal retrieves the angle weighted normal for the given vertex index. More...
 
bool GetFaceNormal (WRLVEC3F &aNorm)
 Function GetFaceNormal retrieves the normal for this facet. More...
 
bool GetData (std::vector< WRLVEC3F > &aVertexList, std::vector< WRLVEC3F > &aNormalsList, std::vector< SGCOLOR > &aColorsList, WRL1_ORDER aVertexOrder)
 Function GetData packages the internal data as triangles with corresponding per-vertex normals. More...
 
int GetMaxIndex ()
 
void CollectVertices (std::vector< std::list< FACET * > > &aFacetList)
 Function CollectVertices adds a pointer to this object at each position within aFacetList referenced by the internal vertex indices. More...
 

Private Attributes

std::vector< WRLVEC3Fvertices
 
std::vector< SGCOLORcolors
 
std::vector< int > indices
 
WRLVEC3F face_normal
 
std::vector< WRLVEC3Fnorms
 
std::vector< WRLVEC3Fvnweight
 
int maxIdx
 

Detailed Description

Definition at line 41 of file wrlfacet.h.

Constructor & Destructor Documentation

◆ FACET()

FACET::FACET ( )

Definition at line 149 of file wrlfacet.cpp.

150 {
151  face_normal.x = 0.0;
152  face_normal.y = 0.0;
153  face_normal.z = 0.0;
154  maxIdx = 0;
155 }
WRLVEC3F face_normal
Definition: wrlfacet.h:48
int maxIdx
Definition: wrlfacet.h:52

References face_normal, and maxIdx.

Member Function Documentation

◆ AddColor()

void FACET::AddColor ( const SGCOLOR aColor)

Function AddColor adds the given RGB color to the internal list.

For per-face coloring only a single color needs to be specified; for a per-vertex coloring the color must be specified for each vertex

Definition at line 208 of file wrlfacet.cpp.

209 {
210  colors.push_back( aColor );
211 
212  return;
213 }
std::vector< SGCOLOR > colors
Definition: wrlfacet.h:45

References colors.

Referenced by WRL1FACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().

◆ AddVertex()

void FACET::AddVertex ( WRLVEC3F aVertex,
int  aIndex 
)

Function AddVertex adds the vertex and its associated index to the internal list of polygon vertices.

Definition at line 193 of file wrlfacet.cpp.

194 {
195  if( aIndex < 0 )
196  return;
197 
198  vertices.push_back( aVertex );
199  indices.push_back( aIndex );
200 
201  if( aIndex > maxIdx )
202  maxIdx = aIndex;
203 
204  return;
205 }
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< int > indices
Definition: wrlfacet.h:46
int maxIdx
Definition: wrlfacet.h:52

References indices, maxIdx, and vertices.

Referenced by WRL1FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().

◆ CalcFaceNormal()

float FACET::CalcFaceNormal ( )

Function CalcFaceNormal calculates the normal to the facet assuming a CCW orientation and performs the calculation of the angle weighted vertex normals.

Returns
is the max. magnitude of any component of the normal or zero if there is a fault or the normal has already been calculated.

Definition at line 216 of file wrlfacet.cpp.

217 {
218  // note: this calculation assumes that the face is a convex polygon;
219  // concave polygons may be supported in the future via functions which
220  // split the polygon into triangles
221 
222  if( vertices.size() < 3 )
223  return 0.0;
224 
225  // check if the values were already calculated
226  if( vertices.size() == vnweight.size() )
227  return 0.0;
228 
229  WRLVEC3F lCPts[3];
230 
231  std::vector< WRLVEC3F >::iterator sV = vertices.begin();
232  std::vector< WRLVEC3F >::iterator eV = vertices.end();
233 
234  lCPts[0] = vertices.back();
235  lCPts[1] = *sV;
236  ++sV;
237  lCPts[2] = *sV;
238  ++sV;
239 
240  face_normal = VCalcTriNorm( lCPts[1], lCPts[0], lCPts[2] );
241 
242  vnweight.clear();
243  WRLVEC3F wnorm = face_normal;
244 
245  // calculate area:
246  size_t nv = vertices.size();
247  float a1 = 0.0;
248  glm::vec3 sum( 0.0, 0.0, 0.0 );
249  size_t j = 0;
250 
251  for( size_t i = 1; i < nv; ++i, ++j )
252  sum += glm::cross( vertices[j], vertices[i] );
253 
254  a1 = fabs( glm::dot( face_normal, sum ) );
255  float a2 = acosf( VCalcCosAngle( lCPts[1], lCPts[0], lCPts[2] ) );
256 
257  wnorm.x *= a1 * a2;
258  wnorm.y *= a1 * a2;
259  wnorm.z *= a1 * a2;
260  vnweight.push_back( wnorm );
261 
262  float maxV = fabs( wnorm.x );
263  float tV = fabs( wnorm.y );
264 
265  if( tV > maxV )
266  maxV = tV;
267 
268  tV = fabs( wnorm.z );
269 
270  if( tV > maxV )
271  maxV = tV;
272 
273  while( sV != eV )
274  {
275  lCPts[0] = lCPts[1];
276  lCPts[1] = lCPts[2];
277  lCPts[2] = *sV;
278  ++sV;
279 
280  wnorm = face_normal;
281  a2 = acosf( VCalcCosAngle( lCPts[1], lCPts[0], lCPts[2] ) );
282  wnorm.x *= a1 * a2;
283  wnorm.y *= a1 * a2;
284  wnorm.z *= a1 * a2;
285  vnweight.push_back( wnorm );
286 
287  tV = fabs( wnorm.x );
288 
289  if( tV > maxV )
290  maxV = tV;
291 
292  tV = fabs( wnorm.y );
293 
294  if( tV > maxV )
295  maxV = tV;
296 
297  tV = fabs( wnorm.z );
298 
299  if( tV > maxV )
300  maxV = tV;
301  }
302 
303  lCPts[0] = lCPts[1];
304  lCPts[1] = lCPts[2];
305  lCPts[2] = vertices.front();
306 
307  wnorm = face_normal;
308  a2 = acosf( VCalcCosAngle( lCPts[1], lCPts[0], lCPts[2] ) );
309  wnorm.x *= a1 * a2;
310  wnorm.y *= a1 * a2;
311  wnorm.z *= a1 * a2;
312  vnweight.push_back( wnorm );
313 
314  tV = fabs( wnorm.x );
315 
316  if( tV > maxV )
317  maxV = tV;
318 
319  tV = fabs( wnorm.y );
320 
321  if( tV > maxV )
322  maxV = tV;
323 
324  tV = fabs( wnorm.z );
325 
326  if( tV > maxV )
327  maxV = tV;
328 
329  return maxV;
330 }
static WRLVEC3F VCalcTriNorm(const WRLVEC3F &p1, const WRLVEC3F &p2, const WRLVEC3F &p3)
Definition: wrlfacet.cpp:68
glm::vec3 WRLVEC3F
Definition: wrltypes.h:185
static float VCalcCosAngle(const WRLVEC3F &p1, const WRLVEC3F &p2, const WRLVEC3F &p3)
Definition: wrlfacet.cpp:98
WRLVEC3F face_normal
Definition: wrlfacet.h:48
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50

References face_normal, VCalcCosAngle(), VCalcTriNorm(), vertices, and vnweight.

◆ CalcVertexNormal()

void FACET::CalcVertexNormal ( int  aIndex,
std::list< FACET * > &  aFacetList,
float  aCreaseAngle 
)

Function CalcVertexNormal calculates the weighted normal for the given vertex.

Parameters
aIndexis the VRML file's Vertex Index for the vertex to be processed
aFacetListis the list of all faces which share this vertex

Definition at line 333 of file wrlfacet.cpp.

334 {
335  if( vertices.size() < 3 )
336  return;
337 
338  if( vnweight.size() != vertices.size() )
339  return;
340 
341  if( norms.size() != vertices.size() )
342  norms.resize( vertices.size() );
343 
344  std::vector< int >::iterator sI = indices.begin();
345  std::vector< int >::iterator eI = indices.end();
346  int idx = 0;
347 
348  WRLVEC3F fp[2]; // vectors to calculate facet angle
349  fp[0].x = 0.0;
350  fp[0].y = 0.0;
351  fp[0].z = 0.0;
352 
353  while( sI != eI )
354  {
355  if( *sI == aIndex )
356  {
357  // first set the default (weighted) normal value
358  norms[idx] = vnweight[idx];
359 
360  // iterate over adjacent facets
361  std::list< FACET* >::iterator sF = aFacetList.begin();
362  std::list< FACET* >::iterator eF = aFacetList.end();
363 
364  while( sF != eF )
365  {
366  if( this == *sF )
367  {
368  ++sF;
369  continue;
370  }
371 
372  // check the crease angle limit
373  (*sF)->GetFaceNormal( fp[1] );
374 
375  float thrs = VCalcCosAngle( fp[0], face_normal, fp[1] );
376 
377  if( aCreaseLimit <= thrs && (*sF)->GetWeightedNormal( aIndex, fp[1] ) )
378  {
379  norms[idx].x += fp[1].x;
380  norms[idx].y += fp[1].y;
381  norms[idx].z += fp[1].z;
382  }
383 
384  ++sF;
385  }
386 
387  // normalize the vector
388  float dn = sqrtf( norms[idx].x * norms[idx].x
389  + norms[idx].y * norms[idx].y
390  + norms[idx].z * norms[idx].z );
391 
392  if( dn > LOWER_LIMIT )
393  {
394  norms[idx].x /= dn;
395  norms[idx].y /= dn;
396  norms[idx].z /= dn;
397  }
398 
399  // if the normals is an invalid normal this test will pass
400  if( fabs( norms[idx].x ) < 0.5
401  && fabs( norms[idx].y ) < 0.5
402  && fabs( norms[idx].z ) < 0.5 )
403  {
404  norms[idx] = face_normal;
405  }
406 
407  return;
408  }
409 
410  ++idx;
411  ++sI;
412  }
413 
414  return;
415 }
glm::vec3 WRLVEC3F
Definition: wrltypes.h:185
static float VCalcCosAngle(const WRLVEC3F &p1, const WRLVEC3F &p2, const WRLVEC3F &p3)
Definition: wrlfacet.cpp:98
std::vector< WRLVEC3F > norms
Definition: wrlfacet.h:49
WRLVEC3F face_normal
Definition: wrlfacet.h:48
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50
std::vector< int > indices
Definition: wrlfacet.h:46
#define LOWER_LIMIT
Definition: wrlfacet.cpp:33

References face_normal, indices, LOWER_LIMIT, norms, VCalcCosAngle(), vertices, and vnweight.

◆ CollectVertices()

void FACET::CollectVertices ( std::vector< std::list< FACET * > > &  aFacetList)

Function CollectVertices adds a pointer to this object at each position within aFacetList referenced by the internal vertex indices.

Definition at line 648 of file wrlfacet.cpp.

649 {
650  // check if this facet may contribute anything at all
651  if( vertices.size() < 3 )
652  return;
653 
654  // note: in principle this should never be invoked
655  if( (maxIdx + 1) >= (int)aFacetList.size() )
656  aFacetList.resize( maxIdx + 1 );
657 
658  std::vector< int >::iterator sI = indices.begin();
659  std::vector< int >::iterator eI = indices.end();
660 
661  while( sI != eI )
662  {
663  aFacetList[*sI].push_back( this );
664  ++sI;
665  }
666 
667  return;
668 }
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< int > indices
Definition: wrlfacet.h:46
int maxIdx
Definition: wrlfacet.h:52

References indices, maxIdx, and vertices.

◆ GetData()

bool FACET::GetData ( std::vector< WRLVEC3F > &  aVertexList,
std::vector< WRLVEC3F > &  aNormalsList,
std::vector< SGCOLOR > &  aColorsList,
WRL1_ORDER  aVertexOrder 
)

Function GetData packages the internal data as triangles with corresponding per-vertex normals.

Parameters
aVertexListis the list of vertices to add to
aNormalsListis the list of per-vertex normals to add to
aColorsListis the list of per-vertex colors (if any) to add to
aVertexOrderinforms the function of the vertex winding order

Definition at line 468 of file wrlfacet.cpp.

470 {
471  // if no normals are calculated we simply return
472  if( norms.empty() )
473  return false;
474 
475  // the output must always be triangle sets in order to conform to the
476  // requirements of the SG* classes
477  int idx[3];
478 
479  idx[0] = 0;
480  idx[1] = 1;
481  idx[2] = 2;
482  WRLVEC3F tnorm;
483 
484  if( aVertexOrder != ORD_CLOCKWISE )
485  {
486  aVertexList.push_back( vertices[idx[0]] );
487  aVertexList.push_back( vertices[idx[1]] );
488  aVertexList.push_back( vertices[idx[2]] );
489 
490  aNormalsList.push_back( norms[idx[0]] );
491  aNormalsList.push_back( norms[idx[1]] );
492  aNormalsList.push_back( norms[idx[2]] );
493  }
494 
495  if( aVertexOrder != ORD_CCW )
496  {
497  aVertexList.push_back( vertices[idx[0]] );
498  aVertexList.push_back( vertices[idx[2]] );
499  aVertexList.push_back( vertices[idx[1]] );
500 
501  tnorm = norms[idx[0]];
502  tnorm.x = -tnorm.x;
503  tnorm.y = -tnorm.y;
504  tnorm.z = -tnorm.z;
505  aNormalsList.push_back( tnorm );
506 
507  tnorm = norms[idx[2]];
508  tnorm.x = -tnorm.x;
509  tnorm.y = -tnorm.y;
510  tnorm.z = -tnorm.z;
511  aNormalsList.push_back( tnorm );
512 
513  tnorm = norms[idx[1]];
514  tnorm.x = -tnorm.x;
515  tnorm.y = -tnorm.y;
516  tnorm.z = -tnorm.z;
517  aNormalsList.push_back( tnorm );
518  }
519 
520  bool hasColor = false;
521  bool perVC = false; // per-vertex colors?
522 
523  if( !colors.empty() )
524  {
525  hasColor = true;
526 
527  if( colors.size() >= vertices.size() )
528  perVC = true;
529 
530  if( perVC )
531  {
532  if( aVertexOrder != ORD_CLOCKWISE )
533  {
534  aColorsList.push_back( colors[idx[0]] );
535  aColorsList.push_back( colors[idx[1]] );
536  aColorsList.push_back( colors[idx[2]] );
537  }
538 
539  if( aVertexOrder != ORD_CCW )
540  {
541  aColorsList.push_back( colors[idx[0]] );
542  aColorsList.push_back( colors[idx[2]] );
543  aColorsList.push_back( colors[idx[1]] );
544  }
545  }
546  else
547  {
548  if( aVertexOrder != ORD_CLOCKWISE )
549  {
550  aColorsList.push_back( colors[0] );
551  aColorsList.push_back( colors[0] );
552  aColorsList.push_back( colors[0] );
553  }
554 
555  if( aVertexOrder != ORD_CCW )
556  {
557  aColorsList.push_back( colors[0] );
558  aColorsList.push_back( colors[0] );
559  aColorsList.push_back( colors[0] );
560  }
561  }
562  }
563 
564  int lim = (int) vertices.size() - 1;
565 
566  while( idx[2] < lim )
567  {
568  idx[1] = idx[2];
569  ++idx[2];
570 
571  if( aVertexOrder != ORD_CLOCKWISE )
572  {
573  aVertexList.push_back( vertices[idx[0]] );
574  aVertexList.push_back( vertices[idx[1]] );
575  aVertexList.push_back( vertices[idx[2]] );
576 
577  aNormalsList.push_back( norms[idx[0]] );
578  aNormalsList.push_back( norms[idx[1]] );
579  aNormalsList.push_back( norms[idx[2]] );
580  }
581 
582  if( aVertexOrder != ORD_CCW )
583  {
584  aVertexList.push_back( vertices[idx[0]] );
585  aVertexList.push_back( vertices[idx[2]] );
586  aVertexList.push_back( vertices[idx[1]] );
587 
588  tnorm = norms[idx[0]];
589  tnorm.x = -tnorm.x;
590  tnorm.y = -tnorm.y;
591  tnorm.z = -tnorm.z;
592  aNormalsList.push_back( tnorm );
593 
594  tnorm = norms[idx[2]];
595  tnorm.x = -tnorm.x;
596  tnorm.y = -tnorm.y;
597  tnorm.z = -tnorm.z;
598  aNormalsList.push_back( tnorm );
599 
600  tnorm = norms[idx[1]];
601  tnorm.x = -tnorm.x;
602  tnorm.y = -tnorm.y;
603  tnorm.z = -tnorm.z;
604  aNormalsList.push_back( tnorm );
605  }
606 
607  if( hasColor )
608  {
609  if( perVC )
610  {
611  if( aVertexOrder != ORD_CLOCKWISE )
612  {
613  aColorsList.push_back( colors[idx[0]] );
614  aColorsList.push_back( colors[idx[1]] );
615  aColorsList.push_back( colors[idx[2]] );
616  }
617 
618  if( aVertexOrder != ORD_CCW )
619  {
620  aColorsList.push_back( colors[idx[0]] );
621  aColorsList.push_back( colors[idx[2]] );
622  aColorsList.push_back( colors[idx[1]] );
623  }
624  }
625  else
626  {
627  if( aVertexOrder != ORD_CLOCKWISE )
628  {
629  aColorsList.push_back( colors[0] );
630  aColorsList.push_back( colors[0] );
631  aColorsList.push_back( colors[0] );
632  }
633 
634  if( aVertexOrder != ORD_CCW )
635  {
636  aColorsList.push_back( colors[0] );
637  aColorsList.push_back( colors[0] );
638  aColorsList.push_back( colors[0] );
639  }
640  }
641  }
642  }
643 
644  return true;
645 }
glm::vec3 WRLVEC3F
Definition: wrltypes.h:185
std::vector< SGCOLOR > colors
Definition: wrlfacet.h:45
std::vector< WRLVEC3F > norms
Definition: wrlfacet.h:49
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44

References colors, norms, ORD_CCW, ORD_CLOCKWISE, and vertices.

◆ GetFaceNormal()

bool FACET::GetFaceNormal ( WRLVEC3F aNorm)

Function GetFaceNormal retrieves the normal for this facet.

Parameters
aNormwill hold the result

Definition at line 451 of file wrlfacet.cpp.

452 {
453  aNorm.x = 0.0;
454  aNorm.y = 0.0;
455  aNorm.z = 0.0;
456 
457  if( vertices.size() < 3 )
458  return false;
459 
460  if( vnweight.size() != vertices.size() )
461  return false;
462 
463  aNorm = face_normal;
464  return true;
465 }
WRLVEC3F face_normal
Definition: wrlfacet.h:48
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50

References face_normal, vertices, and vnweight.

◆ GetMaxIndex()

int FACET::GetMaxIndex ( )
inline

Definition at line 127 of file wrlfacet.h.

128  {
129  return maxIdx;
130  }
int maxIdx
Definition: wrlfacet.h:52

References maxIdx.

◆ GetWeightedNormal()

bool FACET::GetWeightedNormal ( int  aIndex,
WRLVEC3F aNorm 
)

Function GetWeightedNormal retrieves the angle weighted normal for the given vertex index.

Parameters
aIndexis the VRML file's Vertex Index for the vertex to be processed
aNormwill hold the result

Definition at line 418 of file wrlfacet.cpp.

419 {
420  // the default weighted normal shall have no effect even if accidentally included
421  aNorm.x = 0.0;
422  aNorm.y = 0.0;
423  aNorm.z = 0.0;
424 
425  if( vertices.size() < 3 )
426  return false;
427 
428  if( vnweight.size() != vertices.size() )
429  return false;
430 
431  std::vector< int >::iterator sI = indices.begin();
432  std::vector< int >::iterator eI = indices.end();
433  int idx = 0;
434 
435  while( sI != eI )
436  {
437  if( *sI == aIndex )
438  {
439  aNorm = vnweight[idx];
440  return true;
441  }
442 
443  ++idx;
444  ++sI;
445  }
446 
447  return false;
448 }
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50
std::vector< int > indices
Definition: wrlfacet.h:46

References indices, vertices, and vnweight.

◆ HasColors()

bool FACET::HasColors ( void  )

Definition at line 184 of file wrlfacet.cpp.

185 {
186  if( colors.empty() )
187  return false;
188 
189  return true;
190 }
std::vector< SGCOLOR > colors
Definition: wrlfacet.h:45

References colors.

Referenced by WRL1FACESET::TranslateToSG().

◆ HasMinPoints()

bool FACET::HasMinPoints ( )

Definition at line 175 of file wrlfacet.cpp.

176 {
177  if( vertices.size() < 3 )
178  return false;
179 
180  return true;
181 }
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44

References vertices.

Referenced by WRL1FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().

◆ Init()

void FACET::Init ( )

Definition at line 158 of file wrlfacet.cpp.

159 {
160  vertices.clear();
161  colors.clear();
162  indices.clear();
163  norms.clear();
164  vnweight.clear();
165 
166  face_normal.x = 0.0;
167  face_normal.y = 0.0;
168  face_normal.z = 0.0;
169  maxIdx = 0;
170 
171  return;
172 }
std::vector< SGCOLOR > colors
Definition: wrlfacet.h:45
std::vector< WRLVEC3F > norms
Definition: wrlfacet.h:49
WRLVEC3F face_normal
Definition: wrlfacet.h:48
std::vector< WRLVEC3F > vertices
Definition: wrlfacet.h:44
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50
std::vector< int > indices
Definition: wrlfacet.h:46
int maxIdx
Definition: wrlfacet.h:52

References colors, face_normal, indices, maxIdx, norms, vertices, and vnweight.

Referenced by WRL1FACESET::TranslateToSG(), X3DIFACESET::TranslateToSG(), and WRL2FACESET::TranslateToSG().

◆ Renormalize()

void FACET::Renormalize ( float  aMaxValue)

Definition at line 671 of file wrlfacet.cpp.

672 {
673  if( vnweight.empty() || aMaxValue < LOWER_LIMIT )
674  return;
675 
676  size_t vs = vnweight.size();
677 
678  for( size_t i = 0; i < vs; ++i )
679  {
680  vnweight[i].x /= aMaxValue;
681  vnweight[i].y /= aMaxValue;
682  vnweight[i].z /= aMaxValue;
683  }
684 
685  return;
686 }
std::vector< WRLVEC3F > vnweight
Definition: wrlfacet.h:50
#define LOWER_LIMIT
Definition: wrlfacet.cpp:33

References LOWER_LIMIT, and vnweight.

Member Data Documentation

◆ colors

std::vector< SGCOLOR > FACET::colors
private

Definition at line 45 of file wrlfacet.h.

Referenced by AddColor(), GetData(), HasColors(), and Init().

◆ face_normal

WRLVEC3F FACET::face_normal
private

Definition at line 48 of file wrlfacet.h.

Referenced by CalcFaceNormal(), CalcVertexNormal(), FACET(), GetFaceNormal(), and Init().

◆ indices

std::vector< int > FACET::indices
private

Definition at line 46 of file wrlfacet.h.

Referenced by AddVertex(), CalcVertexNormal(), CollectVertices(), GetWeightedNormal(), and Init().

◆ maxIdx

int FACET::maxIdx
private

Definition at line 52 of file wrlfacet.h.

Referenced by AddVertex(), CollectVertices(), FACET(), GetMaxIndex(), and Init().

◆ norms

std::vector< WRLVEC3F > FACET::norms
private

Definition at line 49 of file wrlfacet.h.

Referenced by CalcVertexNormal(), GetData(), and Init().

◆ vertices

std::vector< WRLVEC3F > FACET::vertices
private

◆ vnweight

std::vector< WRLVEC3F > FACET::vnweight
private

The documentation for this class was generated from the following files: