IceTriList.h
Go to the documentation of this file.
1 
8 
11 // Include Guard
12 #ifndef __ICETRILIST_H__
13 #define __ICETRILIST_H__
14 
16  {
17  public:
18  // Constructor / Destructor
19  TriList() {}
20  ~TriList() {}
21 
22  inline_ udword GetNbTriangles() const { return GetNbEntries()/9; }
23  inline_ Triangle* GetTriangles() const { return (Triangle*)GetEntries(); }
24 
25  void AddTri(const Triangle& tri)
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  }
31 
32  void AddTri(const Point& p0, const Point& p1, const Point& p2)
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  }
38  };
39 
41  {
42  public:
43  // Constructor / Destructor
46 
47  inline_ udword GetNbTriangles() const { return GetNbEntries()/3; }
49 
50  void AddTriangle(const IndexedTriangle& tri)
51  {
52  Add(tri.mVRef[0]).Add(tri.mVRef[1]).Add(tri.mVRef[2]);
53  }
54 
55  void AddTriangle(udword vref0, udword vref1, udword vref2)
56  {
57  Add(vref0).Add(vref1).Add(vref2);
58  }
59  };
60 
61 #endif //__ICETRILIST_H__
inline_ IndexedTriangle * GetTriangles() const
Definition: IceTriList.h:48
inline_ udword GetNbTriangles() const
Definition: IceTriList.h:22
udword mVRef[3]
Vertex-references.
#define inline_
float z
Definition: IcePoint.h:524
Definition: IcePoint.h:25
#define ICEMATHS_API
Definition: OPC_IceHook.h:51
void AddTriangle(udword vref0, udword vref1, udword vref2)
Definition: IceTriList.h:55
void AddTriangle(const IndexedTriangle &tri)
Definition: IceTriList.h:50
float x
Definition: IcePoint.h:524
void AddTri(const Triangle &tri)
Definition: IceTriList.h:25
unsigned int udword
sizeof(udword) must be 4
Definition: IceTypes.h:65
TriList()
Definition: IceTriList.h:19
inline_ Container & Add(udword entry)
Definition: IceContainer.h:47
~TriList()
Definition: IceTriList.h:20
inline_ Triangle * GetTriangles() const
Definition: IceTriList.h:23
float y
Definition: IcePoint.h:524
void AddTri(const Point &p0, const Point &p1, const Point &p2)
Definition: IceTriList.h:32
inline_ udword GetNbEntries() const
Returns the current number of entries.
Definition: IceContainer.h:170
inline_ udword * GetEntries() const
Returns the list of entries.
Definition: IceContainer.h:172
inline_ udword GetNbTriangles() const
Definition: IceTriList.h:47
Point mVerts[3]
Vertices.
Definition: IceTriangle.h:47


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:38