#ifndef _OGREMESHINTANCE_H__ #define _OGREMESHINTANCE_H__ #include #include "Intersectable.h" namespace Ogre { /** Wrapper for Ogre object intances for use with the preprocessed view cells. */ #if 1 class __declspec(dllexport) OgreMeshInstance: public GtpVisibilityPreprocessor::Intersectable { public: /** The default constructor taking an entity into account. */ OgreMeshInstance(Entity *ent); /** Returns 'mesh' associated with this instance. */ Entity *GetEntity() const; /** See get. */ void SetEntity(Entity *entity); ///////////////////////////// //-- inherited functions from Intersectable GtpVisibilityPreprocessor::AxisAlignedBox3 GetBox() const; int CastRay(GtpVisibilityPreprocessor::Ray &ray); bool IsConvex() const; bool IsWatertight() const; 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); int GetRandomEdgePoint(GtpVisibilityPreprocessor::Vector3 &point, GtpVisibilityPreprocessor::Vector3 &normal); std::ostream &Describe(std::ostream &s); protected: Entity *mEntity; }; } // namespace Ogre #endif #endif // OgreMeshIntance