Loading...
Searching...
No Matches
ISceneCollisionManager.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
#define __I_SCENE_COLLISION_MANAGER_H_INCLUDED__
#include "IReferenceCounted.h"
#include "vector3d.h"
#include "triangle3d.h"
#include "position2d.h"
#include "line3d.h"
namespace irr
{
namespace scene
{
class ISceneNode;
class ICameraSceneNode;
class ITriangleSelector;
class ISceneCollisionManager : public virtual IReferenceCounted
{
public:
virtual bool getCollisionPoint(const core::line3d<f32>& ray,
ITriangleSelector* selector, core::vector3df& outCollisionPoint,
core::triangle3df& outTriangle, ISceneNode*& outNode) =0;
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;
virtual core::line3d<f32> getRayFromScreenCoordinates(
const core::position2d<s32>& pos, ICameraSceneNode* camera = 0) = 0;
virtual core::position2d<s32> getScreenCoordinatesFrom3DPosition(
const core::vector3df& pos, ICameraSceneNode* camera=0, bool useViewPort=false) = 0;
virtual ISceneNode* getSceneNodeFromScreenCoordinatesBB(const core::position2d<s32>& pos,
s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
virtual ISceneNode* getSceneNodeFromRayBB(const core::line3d<f32>& ray,
s32 idBitMask=0, bool bNoDebugObjects=false, ISceneNode* root=0) =0;
virtual ISceneNode* getSceneNodeFromCameraBB(ICameraSceneNode* camera,
s32 idBitMask=0, bool bNoDebugObjects = false) = 0;
virtual ISceneNode* getSceneNodeAndCollisionPointFromRay(
core::line3df ray,
core::vector3df & outCollisionPoint,
core::triangle3df & outTriangle,
s32 idBitMask = 0,
ISceneNode * collisionRootNode = 0,
bool noDebugObjects = false) = 0;
};
} // end namespace scene
} // end namespace irr
#endif
IReferenceCounted.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::core::line3d
3D line between two points with intersection methods.
Definition line3d.h:19
irr::scene::ICameraSceneNode
Scene Node which is a (controlable) camera.
Definition ICameraSceneNode.h:24
irr::scene::ISceneCollisionManager
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
Definition ISceneCollisionManager.h:25
irr::scene::ISceneCollisionManager::getCollisionPoint
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.
irr::scene::ISceneCollisionManager::getCollisionResultPosition
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...
irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates
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.
irr::scene::ISceneCollisionManager::getScreenCoordinatesFrom3DPosition
virtual core::position2d< s32 > getScreenCoordinatesFrom3DPosition(const core::vector3df &pos, ICameraSceneNode *camera=0, bool useViewPort=false)=0
Calculates 2d screen position from a 3d position.
irr::scene::ISceneCollisionManager::getSceneNodeFromCameraBB
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.
irr::scene::ISceneCollisionManager::getSceneNodeAndCollisionPointFromRay
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.
irr::scene::ISceneCollisionManager::getSceneNodeFromRayBB
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.
irr::scene::ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB
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,...
irr::scene::ISceneNode
Scene node interface.
Definition ISceneNode.h:41
irr::scene::ITriangleSelector
Interface to return triangles with specific properties.
Definition ITriangleSelector.h:29
line3d.h
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::core::triangle3df
triangle3d< f32 > triangle3df
Typedef for a f32 3d triangle.
Definition triangle3d.h:270
irr::core::line3df
line3d< f32 > line3df
Typedef for an f32 line.
Definition line3d.h:136
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::f32
float f32
32 bit floating point variable.
Definition irrTypes.h:104
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
position2d.h
triangle3d.h
vector3d.h
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0