| Irrlicht 3D Engine |

ISceneCollisionManager.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
    00006 #define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
    00007
    00008 #include "IReferenceCounted.h"
    00009 #include "vector3d.h"
    00010 #include "triangle3d.h"
    00011 #include "position2d.h"
    00012 #include "line3d.h"
    00013
    00014 namespace irr
    00015 {
    00016
    00017 namespace scene
    00018 {
    00019     class ISceneNode;
    00020     class ICameraSceneNode;
    00021     class ITriangleSelector;
    00022
    00024     class ISceneCollisionManager : public virtual IReferenceCounted
    00025     {
    00026     public:
    00027
    00029
    00041         virtual bool getCollisionPoint(const core::line3d<f32>& ray,
    00042                 ITriangleSelector* selector, core::vector3df& outCollisionPoint,
    00043                 core::triangle3df& outTriangle, ISceneNode*& outNode) =0;
    00044
    00046
    00068         virtual core::vector3df getCollisionResultPosition(
    00069             ITriangleSelector* selector,
    00070             const core::vector3df &ellipsoidPosition,
    00071             const core::vector3df& ellipsoidRadius,
    00072             const core::vector3df& ellipsoidDirectionAndSpeed,
    00073             core::triangle3df& triout,
    00074             core::vector3df& hitPosition,
    00075             bool& outFalling,
    00076             ISceneNode*& outNode,
    00077             f32 slidingSpeed = 0.0005f,
    00078             const core::vector3df& gravityDirectionAndSpeed
    00079             = core::vector3df(0.0f, 0.0f, 0.0f)) = 0;
    00080
    00082
    00088         virtual core::line3d<f32> getRayFromScreenCoordinates(
    00089             const core::position2d<s32>& pos, ICameraSceneNode* camera = 0) = 0;
    00090
    00092
    00106         virtual core::position2d<s32> getScreenCoordinatesFrom3DPosition(
    00107             const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0;
    00108
    00110
    00125         virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d<s32>& pos,
    00126                 s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
    00127
    00129
    00141         virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d<f32>& ray,
    00142                             s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
    00143
    00145
    00161         virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera,
    00162             s32 idBitMask=0, bool bNoDebugObjects = false) = 0;
    00163
    00165
    00191         virtual ISceneNode* getSceneNodeAndCollisionPointFromRay(
    00192                                 core::line3df ray,
    00193                                 core::vector3df & outCollisionPoint,
    00194                                 core::triangle3df & outTriangle,
    00195                                 s32 idBitMask = 0,
    00196                                 ISceneNode * collisionRootNode = 0,
    00197                                 bool noDebugObjects = false) = 0;
    00198     };
    00199
    00200
    00201 } // end namespace scene
    00202 } // end namespace irr
    00203
    00204 #endif
    00205