13 #ifndef G3D_CONVEXPOLYHEDRON_H
14 #define G3D_CONVEXPOLYHEDRON_H
61 return _vertex.
size();
102 return (_vertex[1] - _vertex[0]).cross(_vertex[2] - _vertex[0]).direction();
166 return m_vertex.
size();
171 return m_vertex[index];
ConvexPolyhedron()
Definition: ConvexPolyhedron.h:120
void resize(size_t n, bool shrinkIfNecessary=true)
Definition: Array.h:490
void removeDuplicateVertices()
Definition: ConvexPolyhedron.cpp:202
Array< Vector3 > _vertex
Definition: ConvexPolyhedron.h:37
Vector3 start
Definition: ConvexPolyhedron.h:28
Array< Vector2 > m_vertex
Definition: ConvexPolyhedron.h:150
Dynamic 1D array tuned for performance.
Definition: Array.h:95
Array< ConvexPolygon > face
Definition: ConvexPolyhedron.h:118
Vector3 stop
Definition: ConvexPolyhedron.h:29
int length() const
Definition: Array.h:438
float getArea() const
Definition: ConvexPolyhedron.cpp:34
Definition: ConvexPolyhedron.h:147
bool contains(const Vector2 &p, bool reverseWinding=false) const
Definition: ConvexPolyhedron.cpp:427
#define debugAssert(exp)
Definition: debugAssert.h:160
ConvexPolygon()
Definition: ConvexPolyhedron.h:41
ConvexPolygon inverse() const
Definition: ConvexPolyhedron.cpp:189
int numVertices() const
Definition: ConvexPolyhedron.h:165
int size() const
Definition: Array.h:430
float getVolume() const
Definition: ConvexPolyhedron.cpp:228
const Vector2 & vertex(int index) const
Definition: ConvexPolyhedron.h:169
ConvexPolygon2D()
Definition: ConvexPolyhedron.h:154
Definition: ConvexPolyhedron.h:32
Definition: ConvexPolyhedron.h:113
bool isEmpty() const
Definition: ConvexPolyhedron.cpp:29
void cut(const Plane &plane, ConvexPolyhedron &above, ConvexPolyhedron &below)
Definition: ConvexPolyhedron.cpp:258
void cut(const Plane &plane, ConvexPolygon &above, ConvexPolygon &below, DirectedEdge &newEdge)
Definition: ConvexPolyhedron.cpp:60
void setNumVertices(int n)
Definition: ConvexPolyhedron.h:64
bool isEmpty() const
Definition: ConvexPolyhedron.cpp:254
Definition: ConvexPolyhedron.h:26
virtual ~ConvexPolygon()
Definition: ConvexPolyhedron.h:44
const Vector3 & vertex(int i) const
Definition: ConvexPolyhedron.h:49
void setVertex(int i, const Vector3 &v)
Definition: ConvexPolyhedron.h:53
int numVertices() const
Definition: ConvexPolyhedron.h:60
Vector3 normal() const
Definition: ConvexPolyhedron.h:100