File CollisionTools.h

namespace MOC
class CollisionTools

Public Functions

CollisionTools(Ogre::SceneManager *sceneMgr)
~CollisionTools()
bool raycastFromCamera(int width, int height, Ogre::Camera *camera, const Ogre::Vector2 &mousecoords, Ogre::Vector3 &result, Ogre::MovableObject *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
bool raycastFromCamera(int width, int height, Ogre::Camera *camera, const Ogre::Vector2 &mousecoords, Ogre::Vector3 &result, OgreV1::Entity *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
bool collidesWithEntity(const Ogre::Vector3 &fromPoint, const Ogre::Vector3 &toPoint, const float collisionRadius = 2.5f, const float rayHeightLevel = 0.0f, const Ogre::uint32 queryMask = 0xFFFFFFFF)
void calculateY(Ogre::SceneNode *n, const bool doTerrainCheck = true, const bool doGridCheck = true, const float gridWidth = 1.0f, const Ogre::uint32 queryMask = 0xFFFFFFFF)
float getTSMHeightAt(const float x, const float z)
bool raycastFromPoint(const Ogre::Vector3 &point, const Ogre::Vector3 &normal, Ogre::Vector3 &result, Ogre::MovableObject *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
bool raycastFromPoint(const Ogre::Vector3 &point, const Ogre::Vector3 &normal, Ogre::Vector3 &result, OgreV1::Entity *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
bool raycast(const Ogre::Ray &ray, Ogre::Vector3 &result, Ogre::MovableObject *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
bool raycast(const Ogre::Ray &ray, Ogre::Vector3 &result, OgreV1::Entity *&target, float &closest_distance, const Ogre::uint32 queryMask = 0xFFFFFFFF)
void setHeightAdjust(const float heightadjust)
float getHeightAdjust(void)

Public Members

Ogre::RaySceneQuery *mRaySceneQuery
Ogre::RaySceneQuery *mTSMRaySceneQuery
Ogre::SceneManager *mSceneMgr

Private Members

float _heightAdjust