Irrlicht 3D Engine
 
Loading...
Searching...
No Matches
ISceneCollisionManager.h
Go to the documentation of this file.
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
6#define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "vector3d.h"
10#include "triangle3d.h"
11#include "position2d.h"
12#include "line3d.h"
13
14namespace irr
15{
16
17namespace scene
18{
19 class ISceneNode;
20 class ICameraSceneNode;
21 class ITriangleSelector;
22
25 {
26 public:
27
29
41 virtual bool getCollisionPoint(const core::line3d<f32>& ray,
42 ITriangleSelector* selector, core::vector3df& outCollisionPoint,
43 core::triangle3df& outTriangle, ISceneNode*& outNode) =0;
44
46
69 ITriangleSelector* selector,
70 const core::vector3df &ellipsoidPosition,
71 const core::vector3df& ellipsoidRadius,
72 const core::vector3df& ellipsoidDirectionAndSpeed,
73 core::triangle3df& triout,
74 core::vector3df& hitPosition,
75 bool& outFalling,
76 ISceneNode*& outNode,
77 f32 slidingSpeed = 0.0005f,
78 const core::vector3df& gravityDirectionAndSpeed
79 = core::vector3df(0.0f, 0.0f, 0.0f)) = 0;
80
82
89 const core::position2d<s32>& pos, ICameraSceneNode* camera = 0) = 0;
90
92
107 const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0;
108
110
126 s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
127
129
142 s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
143
145
162 s32 idBitMask=0, bool bNoDebugObjects = false) = 0;
163
165
192 core::line3df ray,
193 core::vector3df & outCollisionPoint,
194 core::triangle3df & outTriangle,
195 s32 idBitMask = 0,
196 ISceneNode * collisionRootNode = 0,
197 bool noDebugObjects = false) = 0;
198 };
199
200
201} // end namespace scene
202} // end namespace irr
203
204#endif
205
Base class of most objects of the Irrlicht Engine.
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.h:22
Scene Node which is a (controlable) camera.
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
virtual bool getCollisionPoint(const core::line3d< f32 > &ray, ITriangleSelector *selector, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, ISceneNode *&outNode)=0
Finds the nearest 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, core::vector3df &hitPosition, bool &outFalling, ISceneNode *&outNode, 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 th...
virtual core::line3d< f32 > getRayFromScreenCoordinates(const core::position2d< s32 > &pos, ICameraSceneNode *camera=0)=0
Returns a 3d ray which would go through the 2d screen coodinates.
virtual core::position2d< s32 > getScreenCoordinatesFrom3DPosition(const core::vector3df &pos, ICameraSceneNode *camera=0, bool useViewPort=false)=0
Calculates 2d screen position from a 3d position.
virtual ISceneNode * getSceneNodeFromCameraBB(ICameraSceneNode *camera, s32 idBitMask=0, bool bNoDebugObjects=false)=0
Get the scene node, which the given camera is looking at and whose id matches the bitmask.
virtual ISceneNode * getSceneNodeAndCollisionPointFromRay(core::line3df ray, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, s32 idBitMask=0, ISceneNode *collisionRootNode=0, bool noDebugObjects=false)=0
Perform a ray/box and ray/triangle collision check on a heirarchy of scene nodes.
virtual ISceneNode * getSceneNodeFromRayBB(const core::line3d< f32 > &ray, s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode *root=0)=0
Returns the nearest scene node which collides with a 3d ray and whose id matches a bitmask.
virtual ISceneNode * getSceneNodeFromScreenCoordinatesBB(const core::position2d< s32 > &pos, s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode *root=0)=0
Gets the scene node, which is currently visible under the given screencoordinates,...
Scene node interface.
Definition ISceneNode.h:41
Interface to return triangles with specific properties.
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
float f32
32 bit floating point variable.
Definition irrTypes.h:104
signed int s32
32 bit signed variable.
Definition irrTypes.h:66