Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TriList Class Reference

#include <IceTrilist.h>

Inheritance diagram for TriList:
Container

Public Member Functions

 TriList ()
 
 ~TriList ()
 
inline_ udword GetNbTriangles () const
 
inline_ TriangleGetTriangles () const
 
void AddTri (const Triangle &tri)
 
void AddTri (const Point &p0, const Point &p1, const Point &p2)
 
- Public Member Functions inherited from Container
 Container ()
 
 Container (const Container &object)
 
 Container (udword size, float growth_factor)
 
 ~Container ()
 
inline_ ContainerAdd (udword entry)
 
inline_ ContainerAdd (const udword *entries, udword nb)
 
inline_ ContainerAdd (float entry)
 
inline_ ContainerAdd (const float *entries, udword nb)
 
inline_ ContainerAddUnique (udword entry)
 Add unique [slow]. More...
 
ContainerEmpty ()
 
inline_ void Reset ()
 
inline_ void ForceSize (udword size)
 
bool SetSize (udword nb)
 
bool Refit ()
 
bool Contains (udword entry, udword *location=null) const
 
bool Delete (udword entry)
 
bool DeleteKeepingOrder (udword entry)
 
inline_ void DeleteLastEntry ()
 Deletes the very last entry. More...
 
inline_ void DeleteIndex (udword index)
 Deletes the entry whose index is given. More...
 
ContainerFindNext (udword &entry, FindMode find_mode=FIND_CLAMP)
 
ContainerFindPrev (udword &entry, FindMode find_mode=FIND_CLAMP)
 
inline_ udword GetNbEntries () const
 Returns the current number of entries. More...
 
inline_ udword GetEntry (udword i) const
 Returns ith entry. More...
 
inline_ udwordGetEntries () const
 Returns the list of entries. More...
 
inline_ udword GetFirst () const
 
inline_ udword GetLast () const
 
inline_ float GetGrowthFactor () const
 Returns the growth factor. More...
 
inline_ void SetGrowthFactor (float growth)
 Sets the growth factor. More...
 
inline_ bool IsFull () const
 Checks the container is full. More...
 
inline_ BOOL IsNotEmpty () const
 Checks the container is empty. More...
 
inline_ udword operator[] (udword i) const
 Read-access as an array. More...
 
inline_ udwordoperator[] (udword i)
 Write-access as an array. More...
 
udword GetUsedRam () const
 
void operator= (const Container &object)
 Operator for "Container A = Container B". More...
 
inline_ udword GetNbContainers () const
 
inline_ udword GetTotalBytes () const
 

Detailed Description

Definition at line 15 of file IceTrilist.h.

Constructor & Destructor Documentation

TriList::TriList ( )
inline

Definition at line 19 of file IceTrilist.h.

19 {}
TriList::~TriList ( )
inline

Definition at line 20 of file IceTrilist.h.

20 {}

Member Function Documentation

void TriList::AddTri ( const Triangle tri)
inline

Definition at line 25 of file IceTrilist.h.

References Container::Add(), Triangle::mVerts, Point::x, Point::y, and Point::z.

26  {
27  Add(tri.mVerts[0].x).Add(tri.mVerts[0].y).Add(tri.mVerts[0].z);
28  Add(tri.mVerts[1].x).Add(tri.mVerts[1].y).Add(tri.mVerts[1].z);
29  Add(tri.mVerts[2].x).Add(tri.mVerts[2].y).Add(tri.mVerts[2].z);
30  }
void TriList::AddTri ( const Point p0,
const Point p1,
const Point p2 
)
inline

Definition at line 32 of file IceTrilist.h.

References Container::Add(), Point::x, Point::y, and Point::z.

33  {
34  Add(p0.x).Add(p0.y).Add(p0.z);
35  Add(p1.x).Add(p1.y).Add(p1.z);
36  Add(p2.x).Add(p2.y).Add(p2.z);
37  }
inline_ udword TriList::GetNbTriangles ( ) const
inline

Definition at line 22 of file IceTrilist.h.

References Container::GetNbEntries().

22 { return GetNbEntries()/9; }
inline_ Triangle* TriList::GetTriangles ( ) const
inline

Definition at line 23 of file IceTrilist.h.

References Container::GetEntries().

23 { return (Triangle*)GetEntries(); }

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