OpenStructure
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
IndexedVertexArray Class Reference

#include <vertex_array.hh>

Data Structures

struct  Entry
 
struct  NormalizerTriEntry
 
struct  NormalizerVertexEntry
 

Public Types

typedef std::vector< EntryEntryList
 
typedef std::vector< VertexIDIndexList
 
typedef std::vector< NormalizerVertexEntryNVEntryList
 
typedef std::vector< NormalizerTriEntryNTEntryList
 

Public Member Functions

 IndexedVertexArray ()
 
 ~IndexedVertexArray ()
 
 IndexedVertexArray (const IndexedVertexArray &va)
 
IndexedVertexArrayoperator= (const IndexedVertexArray &va)
 
void Cleanup ()
 
void SetMode (int m)
 
int GetMode () const
 
void SetPolyMode (int m)
 
void SetLighting (bool f)
 
void SetTwoSided (bool f)
 
void SetCullFace (bool f)
 
void SetColorMaterial (bool f)
 
void SetLineWidth (float lw)
 
void SetAALines (bool f)
 
void SetPointSize (float ps)
 
void SetLineHalo (float lh)
 
void SetOutlineMode (int m)
 
int GetOutlineMode () const
 
void SetOutlineWidth (float f)
 
float GetOutlineWidth () const
 
void SetOutlineMaterial (const Material &m)
 
void SetOutlineExpandFactor (float f)
 
float GetOutlineExpandFactor () const
 
void SetOutlineExpandColor (const Color &c)
 
Color GetOutlineExpandColor () const
 
void SetSolid (bool f)
 
bool GetSolid () const
 
void SetSolidColor (const Color &c)
 
Color GetSolidcolor () const
 
void SetClipOffset (float f)
 
float GetClipOffset () const
 
VertexID Add (const geom::Vec3 &vert, const geom::Vec3 &norm, const Color &col, const geom::Vec2 &texc=geom::Vec2())
 
unsigned int GetVertexCount () const
 
void DumpVertices () const
 
LineID AddLine (VertexID id0, VertexID id1)
 
TriID AddTri (VertexID id0, VertexID id1, VertexID id2)
 
TriID AddTriN (VertexID id0, VertexID id1, VertexID id2)
 
QuadID AddQuad (VertexID id0, VertexID id1, VertexID id2, VertexID id3)
 
void AddSphere (const SpherePrim &prim, unsigned int detail)
 
void AddIcoSphere (const SpherePrim &prim, unsigned int detail)
 
void AddCylinder (const CylinderPrim &prim, unsigned int detail, bool cap=false)
 
void SetOpacity (float o)
 
void RenderGL ()
 
void RenderPov (PovState &pov, const std::string &name)
 
void Export (Exporter *ex) const
 
void Clear ()
 
void Reset ()
 
void FlagRefresh ()
 
void DrawNormals (bool f)
 
void CalcNormals (float smoothf)
 
void CalcFullNormals ()
 
void SmoothNormals (float smoothf)
 
void NPatch ()
 
void SmoothVertices (float smoothf)
 
void UseTex (bool b)
 
uintTexID ()
 
const EntryListGetEntries () const
 
const IndexListGetQuadIndices () const
 
const IndexListGetTriIndices () const
 
const IndexListGetLineIndices () const
 
geom::AlignedCuboid GetBoundingBox () const
 
geom::Vec3 GetVert (VertexID id) const
 
void SetVert (VertexID id, const geom::Vec3 &v)
 
geom::Vec3 GetNormal (VertexID id) const
 
void SetNormal (VertexID id, const geom::Vec3 &n)
 
Color GetColor (VertexID id) const
 
void SetColor (VertexID id, const Color &c)
 
geom::Vec2 GetTexCoord (VertexID id) const
 
void SetTexCoord (VertexID id, const geom::Vec2 &t)
 

Static Public Member Functions

static unsigned int GetFormat ()
 

Detailed Description

Definition at line 50 of file vertex_array.hh.

Member Typedef Documentation

◆ EntryList

typedef std::vector<Entry> EntryList

Definition at line 89 of file vertex_array.hh.

◆ IndexList

typedef std::vector<VertexID> IndexList

Definition at line 90 of file vertex_array.hh.

◆ NTEntryList

typedef std::vector<NormalizerTriEntry> NTEntryList

Definition at line 92 of file vertex_array.hh.

◆ NVEntryList

typedef std::vector<NormalizerVertexEntry> NVEntryList

Definition at line 91 of file vertex_array.hh.

Constructor & Destructor Documentation

◆ IndexedVertexArray() [1/2]

◆ ~IndexedVertexArray()

◆ IndexedVertexArray() [2/2]

Member Function Documentation

◆ Add()

VertexID Add ( const geom::Vec3 vert,
const geom::Vec3 norm,
const Color col,
const geom::Vec2 texc = geom::Vec2() 
)
inline

Definition at line 142 of file vertex_array.hh.

◆ AddCylinder()

void AddCylinder ( const CylinderPrim prim,
unsigned int  detail,
bool  cap = false 
)

◆ AddIcoSphere()

void AddIcoSphere ( const SpherePrim prim,
unsigned int  detail 
)

◆ AddLine()

LineID AddLine ( VertexID  id0,
VertexID  id1 
)

◆ AddQuad()

QuadID AddQuad ( VertexID  id0,
VertexID  id1,
VertexID  id2,
VertexID  id3 
)

◆ AddSphere()

void AddSphere ( const SpherePrim prim,
unsigned int  detail 
)

◆ AddTri()

TriID AddTri ( VertexID  id0,
VertexID  id1,
VertexID  id2 
)

◆ AddTriN()

TriID AddTriN ( VertexID  id0,
VertexID  id1,
VertexID  id2 
)

◆ CalcFullNormals()

void CalcFullNormals ( )

◆ CalcNormals()

void CalcNormals ( float  smoothf)

◆ Cleanup()

void Cleanup ( )

◆ Clear()

void Clear ( )

◆ DrawNormals()

void DrawNormals ( bool  f)

◆ DumpVertices()

void DumpVertices ( ) const

◆ Export()

void Export ( Exporter ex) const

◆ FlagRefresh()

void FlagRefresh ( )

◆ GetBoundingBox()

geom::AlignedCuboid GetBoundingBox ( ) const

return min/max of vertex entries - this call is not cached!

◆ GetClipOffset()

float GetClipOffset ( ) const
inline

Definition at line 139 of file vertex_array.hh.

◆ GetColor()

Color GetColor ( VertexID  id) const
inline

Definition at line 253 of file vertex_array.hh.

◆ GetEntries()

const EntryList& GetEntries ( ) const
inline

Definition at line 213 of file vertex_array.hh.

◆ GetFormat()

static unsigned int GetFormat ( )
static

◆ GetLineIndices()

const IndexList& GetLineIndices ( ) const
inline

Definition at line 216 of file vertex_array.hh.

◆ GetMode()

int GetMode ( ) const

◆ GetNormal()

geom::Vec3 GetNormal ( VertexID  id) const
inline

Definition at line 237 of file vertex_array.hh.

◆ GetOutlineExpandColor()

Color GetOutlineExpandColor ( ) const
inline

Definition at line 132 of file vertex_array.hh.

◆ GetOutlineExpandFactor()

float GetOutlineExpandFactor ( ) const
inline

Definition at line 130 of file vertex_array.hh.

◆ GetOutlineMode()

int GetOutlineMode ( ) const
inline

Definition at line 125 of file vertex_array.hh.

◆ GetOutlineWidth()

float GetOutlineWidth ( ) const
inline

Definition at line 127 of file vertex_array.hh.

◆ GetQuadIndices()

const IndexList& GetQuadIndices ( ) const
inline

Definition at line 214 of file vertex_array.hh.

◆ GetSolid()

bool GetSolid ( ) const
inline

Definition at line 135 of file vertex_array.hh.

◆ GetSolidcolor()

Color GetSolidcolor ( ) const
inline

Definition at line 137 of file vertex_array.hh.

◆ GetTexCoord()

geom::Vec2 GetTexCoord ( VertexID  id) const
inline

Definition at line 273 of file vertex_array.hh.

◆ GetTriIndices()

const IndexList& GetTriIndices ( ) const
inline

Definition at line 215 of file vertex_array.hh.

◆ GetVert()

geom::Vec3 GetVert ( VertexID  id) const
inline

Definition at line 221 of file vertex_array.hh.

◆ GetVertexCount()

unsigned int GetVertexCount ( ) const

◆ NPatch()

void NPatch ( )

◆ operator=()

IndexedVertexArray& operator= ( const IndexedVertexArray va)

◆ RenderGL()

void RenderGL ( )

◆ RenderPov()

void RenderPov ( PovState pov,
const std::string &  name 
)

◆ Reset()

void Reset ( )

◆ SetAALines()

void SetAALines ( bool  f)

◆ SetClipOffset()

void SetClipOffset ( float  f)
inline

Definition at line 138 of file vertex_array.hh.

◆ SetColor()

void SetColor ( VertexID  id,
const Color c 
)
inline

Definition at line 264 of file vertex_array.hh.

◆ SetColorMaterial()

void SetColorMaterial ( bool  f)

◆ SetCullFace()

void SetCullFace ( bool  f)

◆ SetLighting()

void SetLighting ( bool  f)

◆ SetLineHalo()

void SetLineHalo ( float  lh)

◆ SetLineWidth()

void SetLineWidth ( float  lw)

◆ SetMode()

void SetMode ( int  m)

◆ SetNormal()

void SetNormal ( VertexID  id,
const geom::Vec3 n 
)
inline

Definition at line 245 of file vertex_array.hh.

◆ SetOpacity()

void SetOpacity ( float  o)

◆ SetOutlineExpandColor()

void SetOutlineExpandColor ( const Color c)

◆ SetOutlineExpandFactor()

void SetOutlineExpandFactor ( float  f)

◆ SetOutlineMaterial()

void SetOutlineMaterial ( const Material m)

◆ SetOutlineMode()

void SetOutlineMode ( int  m)

◆ SetOutlineWidth()

void SetOutlineWidth ( float  f)

◆ SetPointSize()

void SetPointSize ( float  ps)

◆ SetPolyMode()

void SetPolyMode ( int  m)

◆ SetSolid()

void SetSolid ( bool  f)
inline

Definition at line 134 of file vertex_array.hh.

◆ SetSolidColor()

void SetSolidColor ( const Color c)
inline

Definition at line 136 of file vertex_array.hh.

◆ SetTexCoord()

void SetTexCoord ( VertexID  id,
const geom::Vec2 t 
)
inline

Definition at line 281 of file vertex_array.hh.

◆ SetTwoSided()

void SetTwoSided ( bool  f)

◆ SetVert()

void SetVert ( VertexID  id,
const geom::Vec3 v 
)
inline

Definition at line 229 of file vertex_array.hh.

◆ SmoothNormals()

void SmoothNormals ( float  smoothf)

◆ SmoothVertices()

void SmoothVertices ( float  smoothf)

◆ TexID()

uint& TexID ( )
inline

experimental

Definition at line 211 of file vertex_array.hh.

◆ UseTex()

void UseTex ( bool  b)
inline

experimental

Definition at line 209 of file vertex_array.hh.


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