Rev | Line | |
---|
[1138] | 1 | #ifndef __KDINTERSECTABLE_H
|
---|
| 2 | #define __KDINTERSECTABLE_H
|
---|
| 3 |
|
---|
| 4 | #include "AxisAlignedBox3.h"
|
---|
| 5 | #include "Intersectable.h"
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | namespace GtpVisibilityPreprocessor {
|
---|
| 9 |
|
---|
| 10 | struct VssRayContainer;
|
---|
| 11 | class KdNode;
|
---|
| 12 |
|
---|
| 13 | /**
|
---|
| 14 | Wrapper for Kd nodes for use in a PVS.
|
---|
| 15 | */
|
---|
| 16 | class KdIntersectable: public Intersectable
|
---|
| 17 | {
|
---|
| 18 | public:
|
---|
| 19 | KdIntersectable(KdNode *node);
|
---|
| 20 |
|
---|
| 21 | /** Returns 'mesh' associated with this instance.
|
---|
| 22 | */
|
---|
| 23 | KdNode *GetNode() const;
|
---|
| 24 |
|
---|
| 25 | /** See get.
|
---|
| 26 | */
|
---|
| 27 | void SetNode(KdNode *node);
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | //-- inherited functions from Intersectable
|
---|
| 31 |
|
---|
| 32 | AxisAlignedBox3 GetBox() const;
|
---|
| 33 |
|
---|
| 34 | int CastRay(Ray &ray);
|
---|
| 35 |
|
---|
| 36 | bool IsConvex() const;
|
---|
| 37 | bool IsWatertight() const;
|
---|
| 38 | float IntersectionComplexity();
|
---|
| 39 |
|
---|
| 40 | int NumberOfFaces() const;
|
---|
| 41 | int Type() const;
|
---|
| 42 |
|
---|
| 43 | int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 44 | GtpVisibilityPreprocessor::Vector3 &normal);
|
---|
| 45 |
|
---|
| 46 | int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 47 | GtpVisibilityPreprocessor::Vector3 &normal,
|
---|
| 48 | const GtpVisibilityPreprocessor::Vector3 &viewpoint,
|
---|
| 49 | const int maxTries);
|
---|
| 50 |
|
---|
| 51 | ostream &Describe(ostream &s);
|
---|
| 52 |
|
---|
| 53 |
|
---|
[1139] | 54 | /** Pointer to kd leaf object that was hit during ray casting.
|
---|
| 55 | */
|
---|
| 56 | Intersectable *mHitObject;
|
---|
| 57 |
|
---|
[1138] | 58 | protected:
|
---|
| 59 |
|
---|
| 60 | KdNode *mNode;
|
---|
| 61 | };
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.