[870] | 1 | #ifndef _OgreMeshIntance_H__ |
---|
| 2 | #define _OgreMeshIntance_H__ |
---|
| 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 | */
|
---|
| 12 | class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable
|
---|
| 13 | {
|
---|
| 14 | public:
|
---|
[1593] | 15 | /** The default constructor taking an entity into account.
|
---|
| 16 | */
|
---|
[870] | 17 | OgreMeshInstance(Entity *ent);
|
---|
[1593] | 18 |
|
---|
[870] | 19 | /** Returns 'mesh' associated with this instance.
|
---|
| 20 | */
|
---|
[1593] | 21 | Entity *GetEntity() const;
|
---|
[870] | 22 |
|
---|
| 23 | /** See get.
|
---|
| 24 | */
|
---|
[1593] | 25 | void SetEntity(Entity *entity);
|
---|
[870] | 26 |
|
---|
| 27 |
|
---|
[1593] | 28 | /////////////////////////////
|
---|
[870] | 29 | //-- inherited functions from Intersectable
|
---|
| 30 |
|
---|
[1028] | 31 | GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox() const;
|
---|
[870] | 32 |
|
---|
| 33 | int CastRay(GtpVisibilityPreprocessor::Ray &ray);
|
---|
| 34 |
|
---|
[1028] | 35 | bool IsConvex() const;
|
---|
| 36 | bool IsWatertight() const;
|
---|
[870] | 37 | float IntersectionComplexity();
|
---|
| 38 |
|
---|
| 39 | int NumberOfFaces() const;
|
---|
| 40 | int Type() const;
|
---|
| 41 |
|
---|
[1028] | 42 | int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 43 | GtpVisibilityPreprocessor::Vector3 &normal);
|
---|
[870] | 44 |
|
---|
| 45 | int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point,
|
---|
| 46 | GtpVisibilityPreprocessor::Vector3 &normal,
|
---|
| 47 | const GtpVisibilityPreprocessor::Vector3 &viewpoint,
|
---|
| 48 | const int maxTries);
|
---|
| 49 |
|
---|
| 50 | ostream &Describe(ostream &s);
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | protected:
|
---|
| 54 |
|
---|
[1593] | 55 | Entity *mEntity;
|
---|
[870] | 56 | };
|
---|
| 57 |
|
---|
| 58 | } // namespace Ogre
|
---|
| 59 |
|
---|
| 60 | #endif // OgreMeshIntance |
---|