Blender  V3.3
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Freestyle::IndexedFaceSet Class Reference

#include <IndexedFaceSet.h>

Inheritance diagram for Freestyle::IndexedFaceSet:
Freestyle::Rep Freestyle::BaseObject

Public Types

enum  TRIANGLES_STYLE { TRIANGLE_STRIP , TRIANGLE_FAN , TRIANGLES }
 
typedef unsigned char FaceEdgeMark
 

Public Member Functions

 IndexedFaceSet ()
 
 IndexedFaceSet (float *iVertices, unsigned iVSize, float *iNormals, unsigned iNSize, FrsMaterial **iMaterials, unsigned iMSize, float *iTexCoords, unsigned iTSize, unsigned iNumFaces, unsigned *iNumVertexPerFace, TRIANGLES_STYLE *iFaceStyle, FaceEdgeMark *iFaceEdgeMarks, unsigned *iVIndices, unsigned iVISize, unsigned *iNIndices, unsigned iNISize, unsigned *iMIndices, unsigned iMISize, unsigned *iTIndices, unsigned iTISize, unsigned iCopy=1)
 
 IndexedFaceSet (const IndexedFaceSet &iBrother)
 
void swap (IndexedFaceSet &ioOther)
 
IndexedFaceSetoperator= (const IndexedFaceSet &iBrother)
 
virtual ~IndexedFaceSet ()
 
virtual void accept (SceneVisitor &v)
 
virtual void ComputeBBox ()
 
virtual const floatvertices () const
 
virtual const floatnormals () const
 
virtual const FrsMaterial *const * frs_materials () const
 
virtual const floattexCoords () const
 
virtual const unsigned vsize () const
 
virtual const unsigned nsize () const
 
virtual const unsigned msize () const
 
virtual const unsigned tsize () const
 
virtual const unsigned numFaces () const
 
virtual const unsigned * numVertexPerFaces () const
 
virtual const TRIANGLES_STYLEtrianglesStyle () const
 
virtual const unsigned char * faceEdgeMarks () const
 
virtual const unsigned * vindices () const
 
virtual const unsigned * nindices () const
 
virtual const unsigned * mindices () const
 
virtual const unsigned * tindices () const
 
virtual const unsigned visize () const
 
virtual const unsigned nisize () const
 
virtual const unsigned misize () const
 
virtual const unsigned tisize () const
 
- Public Member Functions inherited from Freestyle::Rep
 Rep ()
 
 Rep (const Rep &iBrother)
 
void swap (Rep &ioOther)
 
Repoperator= (const Rep &iBrother)
 
virtual ~Rep ()
 
virtual const BBox< Vec3f > & bbox () const
 
Id getId () const
 
const string & getName () const
 
const string & getLibraryPath () const
 
const FrsMaterialfrs_material () const
 
virtual void setBBox (const BBox< Vec3f > &iBox)
 
void setId (const Id &id)
 
void setName (const string &name)
 
void setLibraryPath (const string &path)
 
void setFrsMaterial (const FrsMaterial &iMaterial)
 
- Public Member Functions inherited from Freestyle::BaseObject
 BaseObject ()
 
virtual ~BaseObject ()
 
virtual int destroy ()
 
int addRef ()
 
int release ()
 

Static Public Attributes

static const FaceEdgeMark FACE_MARK = 1 << 0
 
static const FaceEdgeMark EDGE_MARK_V1V2 = 1 << 1
 
static const FaceEdgeMark EDGE_MARK_V2V3 = 1 << 2
 
static const FaceEdgeMark EDGE_MARK_V3V1 = 1 << 3
 

Protected Attributes

float_Vertices
 
float_Normals
 
FrsMaterial ** _FrsMaterials
 
float_TexCoords
 
unsigned _VSize
 
unsigned _NSize
 
unsigned _MSize
 
unsigned _TSize
 
unsigned _NumFaces
 
unsigned * _NumVertexPerFace
 
TRIANGLES_STYLE_FaceStyle
 
FaceEdgeMark_FaceEdgeMarks
 
unsigned * _VIndices
 
unsigned * _NIndices
 
unsigned * _MIndices
 
unsigned * _TIndices
 
unsigned _VISize
 
unsigned _NISize
 
unsigned _MISize
 
unsigned _TISize
 

Detailed Description

Definition at line 20 of file IndexedFaceSet.h.

Member Typedef Documentation

◆ FaceEdgeMark

User-specified face and edge marks for feature edge detection

Definition at line 31 of file IndexedFaceSet.h.

Member Enumeration Documentation

◆ TRIANGLES_STYLE

Triangles description style:

Enumerator
TRIANGLE_STRIP 
TRIANGLE_FAN 
TRIANGLES 

Definition at line 23 of file IndexedFaceSet.h.

Constructor & Destructor Documentation

◆ IndexedFaceSet() [1/3]

Freestyle::IndexedFaceSet::IndexedFaceSet ( )

◆ IndexedFaceSet() [2/3]

Freestyle::IndexedFaceSet::IndexedFaceSet ( float iVertices,
unsigned  iVSize,
float iNormals,
unsigned  iNSize,
FrsMaterial **  iMaterials,
unsigned  iMSize,
float iTexCoords,
unsigned  iTSize,
unsigned  iNumFaces,
unsigned *  iNumVertexPerFace,
TRIANGLES_STYLE iFaceStyle,
FaceEdgeMark iFaceEdgeMarks,
unsigned *  iVIndices,
unsigned  iVISize,
unsigned *  iNIndices,
unsigned  iNISize,
unsigned *  iMIndices,
unsigned  iMISize,
unsigned *  iTIndices,
unsigned  iTISize,
unsigned  iCopy = 1 
)

Builds an indexed face set iVertices The array of object vertices 3D coordinates (for all faces). If iCopy != 0, the array is copied; you must deallocate iVertices. Else you must not. iVSize The size of iVertices (must be a multiple of 3) iNormals The array of object normals 3D coordinates. If iCopy != 0, the array is copied; you must deallocate iNormals. Else you must not. iNSize The size of iNormals iMaterials The array of materials iMSize The size of iMaterials iTexCoords The array of texture coordinates. iTSize The size of iTexCoords (must be multiple of 2) iNumFaces The number of faces iNumVertexPerFace Array containing the number of vertices per face. iFaceStyle Array containing the description style of each faces. The style belongs to:

  • TRIANGLE_STRIP: the face indices describe a triangle strip
  • TRIANGLE_FAN : the face indices describe a triangle fan
  • TRIANGLES : the face indices describe single triangles If iCopy != 0, the array is copied; you must deallocate iFaceStyle. Else you must not. iVIndices, Array of vertices indices. The integers contained in this array must be multiple of 3. If iCopy != 0, the array is copied; you must deallocate iVIndices. Else you must not. iVISize The size of iVIndices. iNIndices Array of normals indices. The integers contained in this array must be multiple of 3. If iCopy != 0, the array is copied; you must deallocate iNIndices. Else you must not. iNISize The size of iNIndices iMIndices The Material indices (per vertex) iMISize The size of iMIndices iTIndices The Texture coordinates indices (per vertex). The integers contained in this array must be multiple of 2. iTISize The size of iMIndices iCopy 0 : the arrays are not copied. The pointers passed as arguments are used. IndexedFaceSet takes these arrays desallocation in charge. 1 : the arrays are copied. The caller is in charge of the arrays, passed as arguments desallocation.

Definition at line 36 of file IndexedFaceSet.cpp.

References _FaceEdgeMarks, _FaceStyle, _FrsMaterials, _MIndices, _MISize, _MSize, _NIndices, _NISize, _Normals, _NSize, _NumFaces, _NumVertexPerFace, _TexCoords, _TIndices, _TISize, _TSize, _Vertices, _VIndices, _VISize, and _VSize.

◆ IndexedFaceSet() [3/3]

Freestyle::IndexedFaceSet::IndexedFaceSet ( const IndexedFaceSet iBrother)

◆ ~IndexedFaceSet()

Freestyle::IndexedFaceSet::~IndexedFaceSet ( )
virtual

Destructor deallocates all the resources

Definition at line 214 of file IndexedFaceSet.cpp.

References _FaceEdgeMarks, _FaceStyle, _FrsMaterials, _MIndices, _MSize, _NIndices, _Normals, _NumVertexPerFace, _TexCoords, _TIndices, _Vertices, and _VIndices.

Member Function Documentation

◆ accept()

void Freestyle::IndexedFaceSet::accept ( SceneVisitor v)
virtual

Accept the corresponding visitor

Reimplemented from Freestyle::Rep.

Definition at line 274 of file IndexedFaceSet.cpp.

References Freestyle::Rep::accept(), and v.

◆ ComputeBBox()

void Freestyle::IndexedFaceSet::ComputeBBox ( )
virtual

Compute the Bounding Box

Implements Freestyle::Rep.

Definition at line 280 of file IndexedFaceSet.cpp.

References _Vertices, _VSize, Freestyle::Rep::setBBox(), and v.

◆ faceEdgeMarks()

virtual const unsigned char* Freestyle::IndexedFaceSet::faceEdgeMarks ( ) const
inlinevirtual

Definition at line 222 of file IndexedFaceSet.h.

References _FaceEdgeMarks.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ frs_materials()

virtual const FrsMaterial* const* Freestyle::IndexedFaceSet::frs_materials ( ) const
inlinevirtual

Definition at line 177 of file IndexedFaceSet.h.

References _FrsMaterials.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape().

◆ mindices()

virtual const unsigned* Freestyle::IndexedFaceSet::mindices ( ) const
inlinevirtual

Definition at line 237 of file IndexedFaceSet.h.

References _MIndices.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ misize()

virtual const unsigned Freestyle::IndexedFaceSet::misize ( ) const
inlinevirtual

Definition at line 257 of file IndexedFaceSet.h.

References _MISize.

Referenced by IndexedFaceSet().

◆ msize()

virtual const unsigned Freestyle::IndexedFaceSet::msize ( ) const
inlinevirtual

Definition at line 197 of file IndexedFaceSet.h.

References _MSize.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ nindices()

virtual const unsigned* Freestyle::IndexedFaceSet::nindices ( ) const
inlinevirtual

Definition at line 232 of file IndexedFaceSet.h.

References _NIndices.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ nisize()

virtual const unsigned Freestyle::IndexedFaceSet::nisize ( ) const
inlinevirtual

Definition at line 252 of file IndexedFaceSet.h.

References _NISize.

Referenced by IndexedFaceSet().

◆ normals()

virtual const float* Freestyle::IndexedFaceSet::normals ( ) const
inlinevirtual

Definition at line 172 of file IndexedFaceSet.h.

References _Normals.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ nsize()

virtual const unsigned Freestyle::IndexedFaceSet::nsize ( ) const
inlinevirtual

Definition at line 192 of file IndexedFaceSet.h.

References _NSize.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ numFaces()

virtual const unsigned Freestyle::IndexedFaceSet::numFaces ( ) const
inlinevirtual

Definition at line 207 of file IndexedFaceSet.h.

References _NumFaces.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ numVertexPerFaces()

virtual const unsigned* Freestyle::IndexedFaceSet::numVertexPerFaces ( ) const
inlinevirtual

Definition at line 212 of file IndexedFaceSet.h.

References _NumVertexPerFace.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ operator=()

IndexedFaceSet& Freestyle::IndexedFaceSet::operator= ( const IndexedFaceSet iBrother)
inline

Definition at line 148 of file IndexedFaceSet.h.

References swap().

◆ swap()

void Freestyle::IndexedFaceSet::swap ( IndexedFaceSet ioOther)
inline

◆ texCoords()

virtual const float* Freestyle::IndexedFaceSet::texCoords ( ) const
inlinevirtual

Definition at line 182 of file IndexedFaceSet.h.

References _TexCoords.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ tindices()

virtual const unsigned* Freestyle::IndexedFaceSet::tindices ( ) const
inlinevirtual

Definition at line 242 of file IndexedFaceSet.h.

References _TIndices.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ tisize()

virtual const unsigned Freestyle::IndexedFaceSet::tisize ( ) const
inlinevirtual

Definition at line 262 of file IndexedFaceSet.h.

References _TISize.

Referenced by IndexedFaceSet().

◆ trianglesStyle()

virtual const TRIANGLES_STYLE* Freestyle::IndexedFaceSet::trianglesStyle ( ) const
inlinevirtual

Definition at line 217 of file IndexedFaceSet.h.

References _FaceStyle.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ tsize()

virtual const unsigned Freestyle::IndexedFaceSet::tsize ( ) const
inlinevirtual

Definition at line 202 of file IndexedFaceSet.h.

References _TSize.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ vertices()

virtual const float* Freestyle::IndexedFaceSet::vertices ( ) const
inlinevirtual

Accessors

Definition at line 167 of file IndexedFaceSet.h.

References _Vertices.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ vindices()

virtual const unsigned* Freestyle::IndexedFaceSet::vindices ( ) const
inlinevirtual

Definition at line 227 of file IndexedFaceSet.h.

References _VIndices.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

◆ visize()

virtual const unsigned Freestyle::IndexedFaceSet::visize ( ) const
inlinevirtual

Definition at line 247 of file IndexedFaceSet.h.

References _VISize.

Referenced by IndexedFaceSet().

◆ vsize()

virtual const unsigned Freestyle::IndexedFaceSet::vsize ( ) const
inlinevirtual

Definition at line 187 of file IndexedFaceSet.h.

References _VSize.

Referenced by Freestyle::WingedEdgeBuilder::buildWShape(), and IndexedFaceSet().

Member Data Documentation

◆ _FaceEdgeMarks

FaceEdgeMark* Freestyle::IndexedFaceSet::_FaceEdgeMarks
protected

Definition at line 281 of file IndexedFaceSet.h.

Referenced by faceEdgeMarks(), IndexedFaceSet(), swap(), and ~IndexedFaceSet().

◆ _FaceStyle

TRIANGLES_STYLE* Freestyle::IndexedFaceSet::_FaceStyle
protected

Definition at line 280 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), trianglesStyle(), and ~IndexedFaceSet().

◆ _FrsMaterials

FrsMaterial** Freestyle::IndexedFaceSet::_FrsMaterials
protected

Definition at line 270 of file IndexedFaceSet.h.

Referenced by frs_materials(), IndexedFaceSet(), swap(), and ~IndexedFaceSet().

◆ _MIndices

unsigned* Freestyle::IndexedFaceSet::_MIndices
protected

Definition at line 285 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), mindices(), swap(), and ~IndexedFaceSet().

◆ _MISize

unsigned Freestyle::IndexedFaceSet::_MISize
protected

Definition at line 290 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), misize(), and swap().

◆ _MSize

unsigned Freestyle::IndexedFaceSet::_MSize
protected

Definition at line 275 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), msize(), swap(), and ~IndexedFaceSet().

◆ _NIndices

unsigned* Freestyle::IndexedFaceSet::_NIndices
protected

Definition at line 284 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), nindices(), swap(), and ~IndexedFaceSet().

◆ _NISize

unsigned Freestyle::IndexedFaceSet::_NISize
protected

Definition at line 289 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), nisize(), and swap().

◆ _Normals

float* Freestyle::IndexedFaceSet::_Normals
protected

Definition at line 269 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), normals(), swap(), and ~IndexedFaceSet().

◆ _NSize

unsigned Freestyle::IndexedFaceSet::_NSize
protected

Definition at line 274 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), nsize(), and swap().

◆ _NumFaces

unsigned Freestyle::IndexedFaceSet::_NumFaces
protected

Definition at line 278 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), numFaces(), and swap().

◆ _NumVertexPerFace

unsigned* Freestyle::IndexedFaceSet::_NumVertexPerFace
protected

Definition at line 279 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), numVertexPerFaces(), swap(), and ~IndexedFaceSet().

◆ _TexCoords

float* Freestyle::IndexedFaceSet::_TexCoords
protected

Definition at line 271 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), texCoords(), and ~IndexedFaceSet().

◆ _TIndices

unsigned* Freestyle::IndexedFaceSet::_TIndices
protected

Definition at line 286 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), tindices(), and ~IndexedFaceSet().

◆ _TISize

unsigned Freestyle::IndexedFaceSet::_TISize
protected

Definition at line 291 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), and tisize().

◆ _TSize

unsigned Freestyle::IndexedFaceSet::_TSize
protected

Definition at line 276 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), and tsize().

◆ _Vertices

float* Freestyle::IndexedFaceSet::_Vertices
protected

Definition at line 268 of file IndexedFaceSet.h.

Referenced by ComputeBBox(), IndexedFaceSet(), swap(), vertices(), and ~IndexedFaceSet().

◆ _VIndices

unsigned* Freestyle::IndexedFaceSet::_VIndices
protected

Definition at line 283 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), vindices(), and ~IndexedFaceSet().

◆ _VISize

unsigned Freestyle::IndexedFaceSet::_VISize
protected

Definition at line 288 of file IndexedFaceSet.h.

Referenced by IndexedFaceSet(), swap(), and visize().

◆ _VSize

unsigned Freestyle::IndexedFaceSet::_VSize
protected

Definition at line 273 of file IndexedFaceSet.h.

Referenced by ComputeBBox(), IndexedFaceSet(), swap(), and vsize().

◆ EDGE_MARK_V1V2

const FaceEdgeMark Freestyle::IndexedFaceSet::EDGE_MARK_V1V2 = 1 << 1
static

Definition at line 33 of file IndexedFaceSet.h.

Referenced by Freestyle::BlenderFileLoader::addTriangle().

◆ EDGE_MARK_V2V3

const FaceEdgeMark Freestyle::IndexedFaceSet::EDGE_MARK_V2V3 = 1 << 2
static

Definition at line 34 of file IndexedFaceSet.h.

Referenced by Freestyle::BlenderFileLoader::addTriangle().

◆ EDGE_MARK_V3V1

const FaceEdgeMark Freestyle::IndexedFaceSet::EDGE_MARK_V3V1 = 1 << 3
static

Definition at line 35 of file IndexedFaceSet.h.

Referenced by Freestyle::BlenderFileLoader::addTriangle().

◆ FACE_MARK

const FaceEdgeMark Freestyle::IndexedFaceSet::FACE_MARK = 1 << 0
static

Definition at line 32 of file IndexedFaceSet.h.

Referenced by Freestyle::BlenderFileLoader::addTriangle().


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