NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::ConvexPolyhedron Class Reference

#include <ConvexPolyhedron.hpp>

Classes

struct  Edge
 
struct  Face
 
struct  FaceEdge
 
struct  Vertex
 

Public Member Functions

 ConvexPolyhedron (void)
 
 ConvexPolyhedron (const Vec3f &lo, const Vec3f &hi)
 
 ConvexPolyhedron (const ConvexPolyhedron &other)
 
 ~ConvexPolyhedron (void)
 
int getNumVertices (void) const
 
const Vec3fgetVertex (int idx) const
 
int getNumEdges (void) const
 
Vec2i getEdge (int idx) const
 
int getEdgeStartVertex (int idx) const
 
int getEdgeEndVertex (int idx) const
 
const Vec3fgetEdgeStartPos (int idx) const
 
const Vec3fgetEdgeEndPos (int idx) const
 
int getNumFaces (void) const
 
const Vec4fgetFacePlaneEq (int idx) const
 
int getFacePlaneID (int idx) const
 
int getFaceNumEdges (int idx) const
 
int getFaceEdge (int faceIdx, int idx)
 
void set (const ConvexPolyhedron &other)
 
void setEmpty (void)
 
void setCube (const Vec3f &lo, const Vec3f &hi)
 
bool intersect (const Vec4f &planeEq, int planeID=-1)
 
bool intersect (const ConvexPolyhedron &other)
 
bool intersectCube (const Vec3f &lo, const Vec3f &hi)
 
F32 computeVolume (void) const
 
F32 computeArea (int faceIdx) const
 
F32 computeArea (void) const
 
Vec3f computeCenterOfMass (int faceIdx) const
 
Vec3f computeCenterOfMass (void) const
 
Mesh< VertexPN > * createMesh (void) const
 
ConvexPolyhedronoperator= (const ConvexPolyhedron &other)
 

Detailed Description

Definition at line 35 of file ConvexPolyhedron.hpp.

Constructor & Destructor Documentation

FW::ConvexPolyhedron::ConvexPolyhedron ( void  )
inline

Definition at line 70 of file ConvexPolyhedron.hpp.

FW::ConvexPolyhedron::ConvexPolyhedron ( const Vec3f lo,
const Vec3f hi 
)
inline

Definition at line 71 of file ConvexPolyhedron.hpp.

FW::ConvexPolyhedron::ConvexPolyhedron ( const ConvexPolyhedron other)
inline

Definition at line 72 of file ConvexPolyhedron.hpp.

FW::ConvexPolyhedron::~ConvexPolyhedron ( void  )
inline

Definition at line 73 of file ConvexPolyhedron.hpp.

Member Function Documentation

F32 ConvexPolyhedron::computeArea ( int  faceIdx) const

Definition at line 299 of file ConvexPolyhedron.cpp.

F32 FW::ConvexPolyhedron::computeArea ( void  ) const
inline

Definition at line 101 of file ConvexPolyhedron.hpp.

Vec3f ConvexPolyhedron::computeCenterOfMass ( int  faceIdx) const

Definition at line 316 of file ConvexPolyhedron.cpp.

Vec3f ConvexPolyhedron::computeCenterOfMass ( void  ) const

Definition at line 338 of file ConvexPolyhedron.cpp.

F32 ConvexPolyhedron::computeVolume ( void  ) const

Definition at line 274 of file ConvexPolyhedron.cpp.

Mesh< VertexPN > * ConvexPolyhedron::createMesh ( void  ) const

Definition at line 368 of file ConvexPolyhedron.cpp.

Vec2i FW::ConvexPolyhedron::getEdge ( int  idx) const
inline

Definition at line 79 of file ConvexPolyhedron.hpp.

const Vec3f& FW::ConvexPolyhedron::getEdgeEndPos ( int  idx) const
inline

Definition at line 83 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getEdgeEndVertex ( int  idx) const
inline

Definition at line 81 of file ConvexPolyhedron.hpp.

const Vec3f& FW::ConvexPolyhedron::getEdgeStartPos ( int  idx) const
inline

Definition at line 82 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getEdgeStartVertex ( int  idx) const
inline

Definition at line 80 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getFaceEdge ( int  faceIdx,
int  idx 
)
inline

Definition at line 89 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getFaceNumEdges ( int  idx) const
inline

Definition at line 88 of file ConvexPolyhedron.hpp.

const Vec4f& FW::ConvexPolyhedron::getFacePlaneEq ( int  idx) const
inline

Definition at line 86 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getFacePlaneID ( int  idx) const
inline

Definition at line 87 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getNumEdges ( void  ) const
inline

Definition at line 78 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getNumFaces ( void  ) const
inline

Definition at line 85 of file ConvexPolyhedron.hpp.

int FW::ConvexPolyhedron::getNumVertices ( void  ) const
inline

Definition at line 75 of file ConvexPolyhedron.hpp.

const Vec3f& FW::ConvexPolyhedron::getVertex ( int  idx) const
inline

Definition at line 76 of file ConvexPolyhedron.hpp.

bool ConvexPolyhedron::intersect ( const Vec4f planeEq,
int  planeID = -1 
)

Definition at line 89 of file ConvexPolyhedron.cpp.

bool ConvexPolyhedron::intersect ( const ConvexPolyhedron other)

Definition at line 260 of file ConvexPolyhedron.cpp.

bool FW::ConvexPolyhedron::intersectCube ( const Vec3f lo,
const Vec3f hi 
)
inline

Definition at line 97 of file ConvexPolyhedron.hpp.

ConvexPolyhedron& FW::ConvexPolyhedron::operator= ( const ConvexPolyhedron other)
inline

Definition at line 106 of file ConvexPolyhedron.hpp.

void FW::ConvexPolyhedron::set ( const ConvexPolyhedron other)
inline

Definition at line 91 of file ConvexPolyhedron.hpp.

void ConvexPolyhedron::setCube ( const Vec3f lo,
const Vec3f hi 
)

Definition at line 39 of file ConvexPolyhedron.cpp.

void FW::ConvexPolyhedron::setEmpty ( void  )
inline

Definition at line 92 of file ConvexPolyhedron.hpp.


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