Blender V5.0
Freestyle::IndexedFaceSet Class Reference

#include <IndexedFaceSet.h>

Inherits Freestyle::Rep.

Public Types

enum  TRIANGLES_STYLE { TRIANGLE_STRIP , TRIANGLE_FAN , TRIANGLES }
typedef uchar FaceEdgeMark

Public Member Functions

 IndexedFaceSet ()
 IndexedFaceSet (float *iVertices, uint iVSize, float *iNormals, uint iNSize, FrsMaterial **iMaterials, uint iMSize, float *iTexCoords, uint iTSize, uint iNumFaces, uint *iNumVertexPerFace, TRIANGLES_STYLE *iFaceStyle, FaceEdgeMark *iFaceEdgeMarks, uint *iVIndices, uint iVISize, uint *iNIndices, uint iNISize, uint *iMIndices, uint iMISize, uint *iTIndices, uint iTISize, uint 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 uint vsize () const
virtual uint nsize () const
virtual uint msize () const
virtual uint tsize () const
virtual uint numFaces () const
virtual const uintnumVertexPerFaces () const
virtual const TRIANGLES_STYLEtrianglesStyle () const
virtual const ucharfaceEdgeMarks () const
virtual const uintvindices () const
virtual const uintnindices () const
virtual const uintmindices () const
virtual const uinttindices () const
virtual uint visize () const
virtual uint nisize () const
virtual uint misize () const
virtual uint 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
uint _VSize
uint _NSize
uint _MSize
uint _TSize
uint _NumFaces
uint_NumVertexPerFace
TRIANGLES_STYLE_FaceStyle
FaceEdgeMark_FaceEdgeMarks
uint_VIndices
uint_NIndices
uint_MIndices
uint_TIndices
uint _VISize
uint _NISize
uint _MISize
uint _TISize

Detailed Description

Definition at line 22 of file IndexedFaceSet.h.

Member Typedef Documentation

◆ FaceEdgeMark

User-specified face and edge marks for feature edge detection

Definition at line 33 of file IndexedFaceSet.h.

Member Enumeration Documentation

◆ TRIANGLES_STYLE

Triangles description style:

Enumerator
TRIANGLE_STRIP 
TRIANGLE_FAN 
TRIANGLES 

Definition at line 25 of file IndexedFaceSet.h.

Constructor & Destructor Documentation

◆ IndexedFaceSet() [1/3]

Freestyle::IndexedFaceSet::IndexedFaceSet ( )

◆ IndexedFaceSet() [2/3]

Freestyle::IndexedFaceSet::IndexedFaceSet ( float * iVertices,
uint iVSize,
float * iNormals,
uint iNSize,
FrsMaterial ** iMaterials,
uint iMSize,
float * iTexCoords,
uint iTSize,
uint iNumFaces,
uint * iNumVertexPerFace,
TRIANGLES_STYLE * iFaceStyle,
FaceEdgeMark * iFaceEdgeMarks,
uint * iVIndices,
uint iVISize,
uint * iNIndices,
uint iNISize,
uint * iMIndices,
uint iMISize,
uint * iTIndices,
uint iTISize,
uint 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 deallocation in charge. 1 : the arrays are copied. The caller is in charge of the arrays, passed as arguments deallocation.

Definition at line 40 of file IndexedFaceSet.cpp.

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

◆ IndexedFaceSet() [3/3]

◆ ~IndexedFaceSet()

Freestyle::IndexedFaceSet::~IndexedFaceSet ( )
virtual

Destructor deallocates all the resources

Definition at line 218 of file IndexedFaceSet.cpp.

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

Member Function Documentation

◆ accept()

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

Accept the corresponding visitor

Reimplemented from Freestyle::Rep.

Definition at line 278 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 284 of file IndexedFaceSet.cpp.

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

◆ faceEdgeMarks()

virtual const uchar * Freestyle::IndexedFaceSet::faceEdgeMarks ( ) const
inlinevirtual

Definition at line 224 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 179 of file IndexedFaceSet.h.

References _FrsMaterials.

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

◆ mindices()

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

Definition at line 239 of file IndexedFaceSet.h.

References _MIndices.

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

◆ misize()

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

Definition at line 259 of file IndexedFaceSet.h.

References _MISize.

Referenced by IndexedFaceSet().

◆ msize()

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

Definition at line 199 of file IndexedFaceSet.h.

References _MSize.

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

◆ nindices()

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

Definition at line 234 of file IndexedFaceSet.h.

References _NIndices.

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

◆ nisize()

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

Definition at line 254 of file IndexedFaceSet.h.

References _NISize.

Referenced by IndexedFaceSet().

◆ normals()

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

Definition at line 174 of file IndexedFaceSet.h.

References _Normals.

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

◆ nsize()

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

Definition at line 194 of file IndexedFaceSet.h.

References _NSize.

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

◆ numFaces()

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

Definition at line 209 of file IndexedFaceSet.h.

References _NumFaces.

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

◆ numVertexPerFaces()

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

Definition at line 214 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 150 of file IndexedFaceSet.h.

References IndexedFaceSet(), and swap.

◆ swap()

◆ texCoords()

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

Definition at line 184 of file IndexedFaceSet.h.

References _TexCoords.

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

◆ tindices()

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

Definition at line 244 of file IndexedFaceSet.h.

References _TIndices.

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

◆ tisize()

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

Definition at line 264 of file IndexedFaceSet.h.

References _TISize.

Referenced by IndexedFaceSet().

◆ trianglesStyle()

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

Definition at line 219 of file IndexedFaceSet.h.

References _FaceStyle.

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

◆ tsize()

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

Definition at line 204 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 169 of file IndexedFaceSet.h.

References _Vertices.

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

◆ vindices()

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

Definition at line 229 of file IndexedFaceSet.h.

References _VIndices.

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

◆ visize()

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

Definition at line 249 of file IndexedFaceSet.h.

References _VISize.

Referenced by IndexedFaceSet().

◆ vsize()

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

Definition at line 189 of file IndexedFaceSet.h.

References _VSize.

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

Member Data Documentation

◆ _FaceEdgeMarks

FaceEdgeMark* Freestyle::IndexedFaceSet::_FaceEdgeMarks
protected

◆ _FaceStyle

TRIANGLES_STYLE* Freestyle::IndexedFaceSet::_FaceStyle
protected

◆ _FrsMaterials

FrsMaterial** Freestyle::IndexedFaceSet::_FrsMaterials
protected

◆ _MIndices

uint* Freestyle::IndexedFaceSet::_MIndices
protected

◆ _MISize

uint Freestyle::IndexedFaceSet::_MISize
protected

Definition at line 292 of file IndexedFaceSet.h.

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

◆ _MSize

uint Freestyle::IndexedFaceSet::_MSize
protected

◆ _NIndices

uint* Freestyle::IndexedFaceSet::_NIndices
protected

◆ _NISize

uint Freestyle::IndexedFaceSet::_NISize
protected

Definition at line 291 of file IndexedFaceSet.h.

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

◆ _Normals

float* Freestyle::IndexedFaceSet::_Normals
protected

◆ _NSize

uint Freestyle::IndexedFaceSet::_NSize
protected

Definition at line 276 of file IndexedFaceSet.h.

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

◆ _NumFaces

uint Freestyle::IndexedFaceSet::_NumFaces
protected

Definition at line 280 of file IndexedFaceSet.h.

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

◆ _NumVertexPerFace

uint* Freestyle::IndexedFaceSet::_NumVertexPerFace
protected

◆ _TexCoords

float* Freestyle::IndexedFaceSet::_TexCoords
protected

◆ _TIndices

uint* Freestyle::IndexedFaceSet::_TIndices
protected

◆ _TISize

uint Freestyle::IndexedFaceSet::_TISize
protected

Definition at line 293 of file IndexedFaceSet.h.

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

◆ _TSize

uint Freestyle::IndexedFaceSet::_TSize
protected

Definition at line 278 of file IndexedFaceSet.h.

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

◆ _Vertices

float* Freestyle::IndexedFaceSet::_Vertices
protected

◆ _VIndices

uint* Freestyle::IndexedFaceSet::_VIndices
protected

◆ _VISize

uint Freestyle::IndexedFaceSet::_VISize
protected

Definition at line 290 of file IndexedFaceSet.h.

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

◆ _VSize

uint Freestyle::IndexedFaceSet::_VSize
protected

◆ EDGE_MARK_V1V2

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

Definition at line 35 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 36 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 37 of file IndexedFaceSet.h.

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

◆ FACE_MARK

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

Definition at line 34 of file IndexedFaceSet.h.

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


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