| Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
#include <ISceneCollisionManager.h>

Public Member Functions | |
| virtual bool | getCollisionPoint (const core::line3d< f32 > &ray, ITriangleSelector *selector, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle)=0 |
| Finds the collision point of a line and lots of triangles, if there is one. | |
| virtual core::vector3df | getCollisionResultPosition (ITriangleSelector *selector, const core::vector3df &ellipsoidPosition, const core::vector3df &ellipsoidRadius, const core::vector3df &ellipsoidDirectionAndSpeed, core::triangle3df &triout, bool &outFalling, f32 slidingSpeed=0.0005f, const core::vector3df &gravityDirectionAndSpeed=core::vector3df(0.0f, 0.0f, 0.0f))=0 |
| Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid. | |
| virtual core::line3d< f32 > | getRayFromScreenCoordinates (core::position2d< s32 > pos, ICameraSceneNode *camera=0)=0 |
| Returns a 3d ray which would go through the 2d screen coodinates. | |
| virtual ISceneNode * | getSceneNodeFromCameraBB (ICameraSceneNode *camera, s32 idBitMask=0, bool bNoDebugObjects=false)=0 |
| Get the scene node, which the overgiven camera is looking at and whose id matches the bitmask. | |
| virtual ISceneNode * | getSceneNodeFromRayBB (core::line3d< f32 > ray, s32 idBitMask=0, bool bNoDebugObjects=false)=0 |
| Get the nearest scene node which collides with a 3d ray and whose id matches a bitmask. | |
| virtual ISceneNode * | getSceneNodeFromScreenCoordinatesBB (core::position2d< s32 > pos, s32 idBitMask=0, bool bNoDebugObjects=false)=0 |
| Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera. | |
| virtual core::position2d< s32 > | getScreenCoordinatesFrom3DPosition (core::vector3df pos, ICameraSceneNode *camera=0)=0 |
| Calculates 2d screen position from a 3d position. | |
| virtual | ~ISceneCollisionManager () |
| Destructor. | |
Definition at line 24 of file ISceneCollisionManager.h.
| virtual irr::scene::ISceneCollisionManager::~ISceneCollisionManager | ( | ) | [inline, virtual] |
| virtual bool irr::scene::ISceneCollisionManager::getCollisionPoint | ( | const core::line3d< f32 > & | ray, | |
| ITriangleSelector * | selector, | |||
| core::vector3df & | outCollisionPoint, | |||
| core::triangle3df & | outTriangle | |||
| ) | [pure virtual] |
Finds the collision point of a line and lots of triangles, if there is one.
| ray,: | Line with witch collisions are tested. | |
| selector,: | TriangleSelector containing the triangles. It can be created for example using ISceneManager::createTriangleSelector() or ISceneManager::createTriangleOctTreeSelector(). | |
| outCollisionPoint,: | If a collision is detected, this will contain the position of the nearest collision. | |
| outTriangle,: | If a collision is detected, this will contain the triangle with which the ray collided. |
| virtual core::vector3df irr::scene::ISceneCollisionManager::getCollisionResultPosition | ( | ITriangleSelector * | selector, | |
| const core::vector3df & | ellipsoidPosition, | |||
| const core::vector3df & | ellipsoidRadius, | |||
| const core::vector3df & | ellipsoidDirectionAndSpeed, | |||
| core::triangle3df & | triout, | |||
| bool & | outFalling, | |||
| f32 | slidingSpeed = 0.0005f, |
|||
| const core::vector3df & | gravityDirectionAndSpeed = core::vector3df(0.0f, 0.0f, 0.0f) | |||
| ) | [pure virtual] |
Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid.
This can be used for moving a character in a 3d world: The character will slide at walls and is able to walk up stairs. The method used how to calculate the collision result position is based on the paper "Improved Collision detection and Response" by Kasper Fauerby.
| selector,: | TriangleSelector containing the triangles of the world. It can be created for example using ISceneManager::createTriangleSelector() or ISceneManager::createTriangleOctTreeSelector(). | |
| ellipsoidPosition,: | Position of the ellipsoid. | |
| ellipsoidRadius,: | Radius of the ellipsoid. | |
| ellipsoidDirectionAndSpeed,: | Direction and speed of the movement of the ellipsoid. | |
| triout,: | Optional parameter where the last triangle causing a collision is stored, if there is a collision. | |
| outFalling,: | Is set to true if the ellipsoid is falling down, caused by gravity. | |
| slidingSpeed,: | DOCUMENTATION NEEDED. | |
| gravityDirectionAndSpeed,: | Direction and force of gravity. |
| virtual core::line3d<f32> irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates | ( | core::position2d< s32 > | pos, | |
| ICameraSceneNode * | camera = 0 | |||
| ) | [pure virtual] |
Returns a 3d ray which would go through the 2d screen coodinates.
| pos,: | Screen coordinates in pixels. | |
| camera,: | Camera from which the ray starts. If null, the active camera is used. |
| virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromCameraBB | ( | ICameraSceneNode * | camera, | |
| s32 | idBitMask = 0, |
|||
| bool | bNoDebugObjects = false | |||
| ) | [pure virtual] |
Get the scene node, which the overgiven camera is looking at and whose id matches the bitmask.
A ray is simply casted from the position of the camera to the view target position, and all scene nodes are tested against this ray. The collision tests are done using a bounding box for each scene node.
| camera,: | Camera from which the ray is casted. | |
| idBitMask,: | Only scene nodes with an id with bits set like in this mask will be tested. If the BitMask is 0, this feature is disabled. | |
| bNoDebugObjects,: | Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true. |
| virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromRayBB | ( | core::line3d< f32 > | ray, | |
| s32 | idBitMask = 0, |
|||
| bool | bNoDebugObjects = false | |||
| ) | [pure virtual] |
Get the nearest scene node which collides with a 3d ray and whose id matches a bitmask.
The collision tests are done using a bounding box for each scene node.
| ray,: | Line with witch collisions are tested. | |
| idBitMask,: | Only scene nodes with an id with bits set like in this mask will be tested. If the BitMask is 0, this feature is disabled. | |
| bNoDebugObjects,: | Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true. |
| virtual ISceneNode* irr::scene::ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB | ( | core::position2d< s32 > | pos, | |
| s32 | idBitMask = 0, |
|||
| bool | bNoDebugObjects = false | |||
| ) | [pure virtual] |
Gets the scene node, which is currently visible under the given screencoordinates, viewed from the currently active camera.
The collision tests are done using a bounding box for each scene node.
| pos,: | Position in pixel screen coordinates, under which the returned scene node will be. | |
| idBitMask,: | Only scene nodes with an id with bits set like in this mask will be tested. If the BitMask is 0, this feature is disabled. | |
| bNoDebugObjects,: | Doesn't take debug objects into account when true. These are scene nodes with IsDebugObject() = true. |
| virtual core::position2d<s32> irr::scene::ISceneCollisionManager::getScreenCoordinatesFrom3DPosition | ( | core::vector3df | pos, | |
| ICameraSceneNode * | camera = 0 | |||
| ) | [pure virtual] |
Calculates 2d screen position from a 3d position.
| pos,: | 3D position in world space to be transformed into 2d. | |
| camera,: | Camera to be used. If null, the currently active camera is used. |
| The Irrlicht
Engine Documentation © 2003-2008 by Nikolaus Gebhardt. Generated
on Sun Dec 14 08:04:54 2008 by Doxygen
(1.5.6) |