5#ifndef JPP_I_SCENE_COLLISION_MANAGER_HPP_INCLUDED
6#define JPP_I_SCENE_COLLISION_MANAGER_HPP_INCLUDED
8#include <jimcpp/core/engine/IReferenceCounted.hpp>
9#include <jimcpp/core/engine/vector3d.hpp>
10#include <jimcpp/core/engine/triangle3d.hpp>
11#include <jimcpp/core/engine/position2d.hpp>
12#include <jimcpp/core/engine/line3d.hpp>
20 class ICameraSceneNode;
21 class ITriangleSelector;
85 outNode = hitResult.
Node;
123 f32 slidingSpeed = 0.0005f,
172 s32 idBitMask=0,
bool bNoDebugObjects=
false,
ISceneNode* root=0) =0;
188 s32 idBitMask=0,
bool bNoDebugObjects=
false,
ISceneNode* root=0) =0;
208 s32 idBitMask=0,
bool bNoDebugObjects =
false) = 0;
243 bool noDebugObjects =
false) = 0;
269 bool noDebugObjects =
false)
Base class of most objects of the Jimcpp Engine.
Definition IReferenceCounted.hpp:46
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Scene Node which is a (controllable) camera.
Definition ICameraSceneNode.hpp:24
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
The Scene Collision Manager provides methods for performing collision tests and picking on scene node...
Definition ISceneCollisionManager.hpp:52
virtual core::line3d< f32 > getRayFromScreenCoordinates(const core::position2d< s32 > &pos, const ICameraSceneNode *camera=0)=0
Returns a 3d ray which would go through the 2d screen coordinates.
virtual core::position2d< s32 > getScreenCoordinatesFrom3DPosition(const core::vector3df &pos, const ICameraSceneNode *camera=0, bool useViewPort=false)=0
Calculates 2d screen position from a 3d position.
virtual bool getCollisionPoint(const core::line3d< f32 > &ray, ITriangleSelector *selector, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, ISceneNode *&outNode)
Finds the nearest collision point of a line and lots of triangles, if there is one.
Definition ISceneCollisionManager.hpp:76
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 screen coordinates,...
virtual bool getCollisionPoint(SCollisionHit &hitResult, const core::line3d< f32 > &ray, ITriangleSelector *selector)=0
Finds the nearest collision point of a line and lots of triangles, if there is one.
virtual ISceneNode * getSceneNodeFromCameraBB(const 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 * 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 * getSceneNodeAndCollisionPointFromRay(SCollisionHit &hitResult, const core::line3df &ray, s32 idBitMask=0, ISceneNode *collisionRootNode=0, bool noDebugObjects=false)=0
Perform a ray/box and ray/triangle collision check on a hierarchy of scene nodes.
virtual ISceneNode * getSceneNodeAndCollisionPointFromRay(const core::line3df &ray, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle, s32 idBitMask=0, ISceneNode *collisionRootNode=0, bool noDebugObjects=false)
Perform a ray/box and ray/triangle collision check on a hierarchy of scene nodes.
Definition ISceneCollisionManager.hpp:263
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...
Scene node interface.
Definition ISceneNode.hpp:43
Interface to return triangles with specific properties.
Definition ITriangleSelector.hpp:74
Definition ISceneCollisionManager.hpp:25
const ITriangleSelector * TriangleSelector
Triangle selector which contained the colliding triangle (useful when having MetaTriangleSelector)
Definition ISceneCollisionManager.hpp:34
core::triangle3df Triangle
Triangle with which we collided.
Definition ISceneCollisionManager.hpp:31
jpp::u32 MaterialIndex
Index of selected material of the triangle in the SceneNode. Usually only valid when MeshBuffer is al...
Definition ISceneCollisionManager.hpp:43
const IMeshBuffer * MeshBuffer
Meshbuffer which contained the triangle (is 0 when the selector doesn't have that information,...
Definition ISceneCollisionManager.hpp:40
core::vector3df Intersection
Point of collision.
Definition ISceneCollisionManager.hpp:28
ISceneNode * Node
Node which contained the triangle (is 0 when selector doesn't have that information)
Definition ISceneCollisionManager.hpp:37
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110