#ifndef _OgreMeshIntance_H__ #define _OgreMeshIntance_H__ #include #include "Intersectable.h" namespace Ogre { /** Wrapper for Ogre object intances for use with the preprocessed view cells. */ class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable { public: OgreMeshInstance(Entity *ent); /** Returns 'mesh' associated with this instance. */ Entity *GetMesh() const; /** See get. */ void SetMesh(Entity *mesh); //-- inherited functions from Intersectable /** Returns the mail of this box. */ GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox(); int CastRay(GtpVisibilityPreprocessor::Ray &ray); bool IsConvex(); bool IsWatertight(); float IntersectionComplexity(); int NumberOfFaces() const; int Type() const; int GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point, GtpVisibilityPreprocessor::Vector3 &normal); int GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point, GtpVisibilityPreprocessor::Vector3 &normal, const GtpVisibilityPreprocessor::Vector3 &viewpoint, const int maxTries); ostream &Describe(ostream &s); protected: Entity *mMesh; //AxisAlignedBox3 }; } // namespace Ogre #endif // OgreMeshIntance