#include <geometry.h>

Public Types | |
| enum | GEOMETRY_TYPE { GEOMETRY_UNKNOWN, GEOMETRY_TRIANGLE } |
| Type of representation. More... | |
Public Member Functions | |
| Geometry (const wxString &_name) | |
| Class constructor. | |
| Geometry (const Geometry &g) | |
| Copy constructor. | |
| virtual | ~Geometry () |
| Class destructor. | |
| const wxString | GetName () const |
| Get name. | |
| const AABB & | GetAABB () const |
| Get AABB. | |
| virtual void | BuildAABB ()=0 |
| Build AABB. | |
| virtual bool | Intersects (const Ray &ray, float *dist=(float *) NULL) const =0 |
| virtual bool | CastRay (const Ray &ray, RayIntersectionInfo &info) const |
| virtual std::vector< Triangle > | Triangulate () const =0 |
| Get geometry as list of triangles. | |
| virtual void | AddBox (const vector3 &position, const vector3 &size)=0 |
| Add Box to geometry. | |
| virtual wxString | ToString () const |
| Get string with geometry properties. | |
| virtual Geometry * | Clone () const =0 |
| Get copy of instance. | |
Public Attributes | |
| enum VRUT::Geometry::GEOMETRY_TYPE | type |
Protected Attributes | |
| wxString | name |
| Name. | |
| AABB | aabb |
| Model space axis aligned bounding box. | |
Friends | |
| class | Scene |
Definition at line 41 of file geometry.h.
Type of representation.
Definition at line 51 of file geometry.h.
00052 { 00053 GEOMETRY_UNKNOWN, 00054 GEOMETRY_TRIANGLE 00055 } type;
| VRUT::Geometry::Geometry | ( | const wxString & | _name | ) | [inline] |
Class constructor.
Definition at line 58 of file geometry.h.
00058 : name(CloneWxString(_name)), type(GEOMETRY_UNKNOWN) {}
| VRUT::Geometry::Geometry | ( | const Geometry & | g | ) | [inline] |
Copy constructor.
Definition at line 60 of file geometry.h.
00060 : name(CloneWxString(g.name)), type(g.type), aabb(g.aabb) {}
| virtual VRUT::Geometry::~Geometry | ( | ) | [inline, virtual] |
| const wxString VRUT::Geometry::GetName | ( | ) | const [inline] |
| const AABB& VRUT::Geometry::GetAABB | ( | ) | const [inline] |
| virtual void VRUT::Geometry::BuildAABB | ( | ) | [pure virtual] |
| virtual bool VRUT::Geometry::Intersects | ( | const Ray & | ray, | |
| float * | dist = (float *) NULL | |||
| ) | const [pure virtual] |
Check if ray intersects geometry, get intersection point distance from ray origin if it does NOTE: everything must be in one space (model space by default), dist will be in that space too!
Implemented in VRUT::GeometryTriangles.
| virtual bool VRUT::Geometry::CastRay | ( | const Ray & | ray, | |
| RayIntersectionInfo & | info | |||
| ) | const [inline, virtual] |
Cast ray towards the geometry, get intersection info if it does NOTE: everything must be in one space (model space by default), intersection info will be in that space too!
Reimplemented in VRUT::GeometryTriangles.
Definition at line 83 of file geometry.h.
| virtual std::vector<Triangle> VRUT::Geometry::Triangulate | ( | ) | const [pure virtual] |
| virtual wxString VRUT::Geometry::ToString | ( | ) | const [inline, virtual] |
Get string with geometry properties.
Reimplemented in VRUT::GeometryTriangles.
Definition at line 95 of file geometry.h.
00096 { 00097 return wxString::Format(wxT("Geometry type: %i\n"), unsigned(type)); 00098 }
| virtual Geometry* VRUT::Geometry::Clone | ( | ) | const [pure virtual] |
friend class Scene [friend] |
Definition at line 102 of file geometry.h.
wxString VRUT::Geometry::name [protected] |
AABB VRUT::Geometry::aabb [protected] |
1.5.5