#include "OgreMeshInstance.h" #include "OgreTypeConverter.h" namespace Ogre { OgreMeshInstance::OgreMeshInstance(Entity *ent): GtpVisibilityPreprocessor::Intersectable(), mMesh(ent) { } void OgreMeshInstance::SetMesh(Entity *mesh) { mMesh = mesh; } Entity *OgreMeshInstance::GetMesh() const { return mMesh; } GtpVisibilityPreprocessor::AxisAlignedBox3 OgreMeshInstance::GetBox() { return OgreTypeConverter::ConvertFromOgre(mMesh->getWorldBoundingBox()); } int OgreMeshInstance::CastRay(GtpVisibilityPreprocessor::Ray &ray) { return 0; } bool OgreMeshInstance::IsConvex() { return true; } bool OgreMeshInstance::IsWatertight() { return true; } float OgreMeshInstance::IntersectionComplexity() { return 1.0f; } int OgreMeshInstance::NumberOfFaces() const { return 0; } int OgreMeshInstance::Type() const { return OGRE_MESH_INSTANCE; } int OgreMeshInstance::GetRandomSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point, GtpVisibilityPreprocessor::Vector3 &normal) { return 0; } int OgreMeshInstance::GetRandomVisibleSurfacePoint(GtpVisibilityPreprocessor::Vector3 &point, GtpVisibilityPreprocessor::Vector3 &normal, const GtpVisibilityPreprocessor::Vector3 &viewpoint, const int maxTries) { return 0; } ostream &OgreMeshInstance::Describe(ostream &s) { s << mMesh; return s; } }