[2069] | 1 | #ifndef _OGREMESHINTANCE_H__ |
---|
| 2 | #define _OGREMESHINTANCE_H__ |
---|
[870] | 3 | |
---|
| 4 | #include <OgreEntity.h> |
---|
| 5 | #include "Intersectable.h" |
---|
| 6 | |
---|
| 7 | namespace Ogre {
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | Wrapper for Ogre object intances for use with the preprocessed view cells.
|
---|
| 11 | */
|
---|
[2069] | 12 | #if 1
|
---|
[870] | 13 | class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable
|
---|
| 14 | {
|
---|
| 15 | public:
|
---|
[1593] | 16 | /** The default constructor taking an entity into account.
|
---|
| 17 | */
|
---|
[870] | 18 | OgreMeshInstance(Entity *ent);
|
---|
[1593] | 19 |
|
---|
[870] | 20 | /** Returns 'mesh' associated with this instance.
|
---|
| 21 | */
|
---|
[1593] | 22 | Entity *GetEntity() const;
|
---|
[870] | 23 |
|
---|
| 24 | /** See get.
|
---|
| 25 | */
|
---|
[1593] | 26 | void SetEntity(Entity *entity);
|
---|
[870] | 27 |
|
---|
| 28 |
|
---|
[1593] | 29 | /////////////////////////////
|
---|
[870] | 30 | //-- inherited functions from Intersectable
|
---|
| 31 |
|
---|
[1028] | 32 | GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox() const;
|
---|
[870] | 33 |
|
---|
| 34 | int CastRay(GtpVisibilityPreprocessor::Ray &ray);
|
---|
| 35 |
|
---|
[1028] | 36 | bool IsConvex() const;
|
---|
| 37 | bool IsWatertight() const;
|
---|
[870] | 38 | float IntersectionComplexity();
|
---|
| 39 |
|
---|
| 40 | int NumberOfFaces() const;
|
---|
| 41 | int Type() const;
|
---|
| 42 |
|
---|
[1028] | 43 | int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 44 | GtpVisibilityPreprocessor::Vector3 &normal);
|
---|
[870] | 45 |
|
---|
| 46 | int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 47 | GtpVisibilityPreprocessor::Vector3 &normal,
|
---|
| 48 | const GtpVisibilityPreprocessor::Vector3 &viewpoint,
|
---|
| 49 | const int maxTries);
|
---|
| 50 |
|
---|
[2115] | 51 | int GetRandomEdgePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 52 | GtpVisibilityPreprocessor::Vector3 &normal);
|
---|
| 53 |
|
---|
[2183] | 54 | std::ostream &Describe(std::ostream &s);
|
---|
[870] | 55 |
|
---|
| 56 |
|
---|
| 57 | protected:
|
---|
| 58 |
|
---|
[1593] | 59 | Entity *mEntity;
|
---|
[870] | 60 | };
|
---|
| 61 |
|
---|
[2066] | 62 |
|
---|
[870] | 63 | } // namespace Ogre
|
---|
[2066] | 64 | #endif
|
---|
[870] | 65 | #endif // OgreMeshIntance |
---|