#include "irrlichttypes_bloated.h"
#include <vector>
Go to the source code of this file.
|
collisionMoveResult | collisionMoveSimple (Environment *env, IGameDef *gamedef, f32 pos_max_d, const aabb3f &box_0, f32 stepheight, f32 dtime, v3f *pos_f, v3f *speed_f, v3f accel_f, ActiveObject *self=NULL, bool collide_with_objects=true) |
| Moves using a single iteration; speed should not exceed pos_max_d/dtime.
|
|
bool | collision_check_intersection (Environment *env, IGameDef *gamedef, const aabb3f &box_0, const v3f &pos_f, ActiveObject *self=nullptr, bool collide_with_objects=true) |
| A simpler version of "collisionMoveSimple" that only checks whether a collision occurs at the given position.
|
|
CollisionAxis | axisAlignedCollision (const aabb3f &staticbox, const aabb3f &movingbox, v3f speed, f32 *dtime) |
|
bool | wouldCollideWithCeiling (const std::vector< aabb3f > &staticboxes, const aabb3f &movingbox, f32 y_increase, f32 d) |
|
◆ CollisionAxis
Enumerator |
---|
COLLISION_AXIS_NONE | |
COLLISION_AXIS_X | |
COLLISION_AXIS_Y | |
COLLISION_AXIS_Z | |
◆ CollisionType
Enumerator |
---|
COLLISION_NODE | |
COLLISION_OBJECT | |
◆ axisAlignedCollision()
◆ collision_check_intersection()
◆ collisionMoveSimple()
collisionMoveResult collisionMoveSimple |
( |
Environment * | env, |
|
|
IGameDef * | gamedef, |
|
|
f32 | pos_max_d, |
|
|
const aabb3f & | box_0, |
|
|
f32 | stepheight, |
|
|
f32 | dtime, |
|
|
v3f * | pos_f, |
|
|
v3f * | speed_f, |
|
|
v3f | accel_f, |
|
|
ActiveObject * | self = NULL, |
|
|
bool | collide_with_objects = true ) |
Moves using a single iteration; speed should not exceed pos_max_d/dtime.
- Parameters
-
self | (optional) ActiveObject to ignore in the collision detection. |
References add_area_node_boxes(), add_object_boxes(), CollisionInfo::axis, axisAlignedCollision(), BS, collisionMoveResult::collides, COLLISION_AXIS_NONE, COLLISION_AXIS_X, COLLISION_AXIS_Y, COLLISION_AXIS_Z, COLLISION_NODE, COLLISION_OBJECT, collisionMoveResult::collisions, DTIME_LIMIT, floatToInt(), g_profiler, MYMAX, MYMIN, CollisionInfo::new_pos, CollisionInfo::new_speed, CollisionInfo::node_p, CollisionInfo::object, CollisionInfo::old_speed, CollisionInfo::plane, PRECISION_MICRO, PROFILER_NAME, SPT_AVG, collisionMoveResult::standing_on_object, collisionMoveResult::touching_ground, CollisionInfo::type, warningstream, and wouldCollideWithCeiling().
Referenced by LocalPlayer::handleAutojump(), LocalPlayer::move(), LocalPlayer::old_move(), GenericCAO::step(), LuaEntitySAO::step(), and Particle::step().
◆ wouldCollideWithCeiling()
bool wouldCollideWithCeiling |
( |
const std::vector< aabb3f > & | staticboxes, |
|
|
const aabb3f & | movingbox, |
|
|
f32 | y_increase, |
|
|
f32 | d ) |