Revision 176,
772 bytes
checked in by bittner, 19 years ago
(diff) |
cosine sampling bug fixed
|
Rev | Line | |
---|
[162] | 1 | #ifndef __INTERSECTABLE_H
|
---|
| 2 | #define __INTERSECTABLE_H
|
---|
| 3 |
|
---|
[176] | 4 | #include "AxisAlignedBox3.h"
|
---|
| 5 | #include "Pvs.h"
|
---|
[162] | 6 |
|
---|
[176] | 7 |
|
---|
[162] | 8 | class Intersectable {
|
---|
[176] | 9 | public:
|
---|
| 10 | static int mailID;
|
---|
| 11 | int mailbox;
|
---|
| 12 |
|
---|
| 13 | KdPvs mKdPvs;
|
---|
[162] | 14 |
|
---|
[176] | 15 | enum { MESH_INSTANCE, TRANSFORMED_MESH_INSTANCE, SPHERE };
|
---|
[162] | 16 |
|
---|
[176] | 17 | Intersectable():mailbox(0) {}
|
---|
| 18 |
|
---|
| 19 | void Mail() { mailbox = mailID; }
|
---|
| 20 | static void NewMail() { mailID++; }
|
---|
| 21 | bool Mailed() const { return mailbox == mailID; }
|
---|
| 22 |
|
---|
| 23 | virtual AxisAlignedBox3 GetBox() = 0;
|
---|
| 24 |
|
---|
| 25 | virtual int CastRay(Ray &ray) = 0;
|
---|
| 26 |
|
---|
| 27 | virtual bool IsConvex() = 0;
|
---|
| 28 | virtual bool IsWatertight() = 0;
|
---|
| 29 | virtual float IntersectionComplexity() = 0;
|
---|
| 30 |
|
---|
| 31 | virtual int Type() const = 0;
|
---|
| 32 |
|
---|
| 33 | virtual void GetRandomSurfacePoint(Vector3 &point, Vector3 &normal) = 0;
|
---|
| 34 |
|
---|
[162] | 35 | };
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.