CLASS v1.8.0

physics::World

kn::physics::World

Declared in kraken/physics/World.hpp

Reference

C++ API

World

function
World(const Vec2 &gravity=Vec2::ZERO)

No description in the source header.

~World

function
~World()

No description in the source header.

DistanceJoint createDistanceJoint(const Body &bodyA, const Body &bodyB, const Vec2 &anchorA, const Vec2 &anchorB)

No description in the source header.

FilterJoint createFilterJoint(const Body &bodyA, const Body &bodyB)

No description in the source header.

MotorJoint createMotorJoint(const Body &bodyA, const Body &bodyB)

No description in the source header.

MouseJoint createMouseJoint(const Body &groundBody, const Body &pulledBody, const Vec2 &target)

No description in the source header.

PrismaticJoint createPrismaticJoint(const Body &bodyA, const Body &bodyB, const Vec2 &anchor, const Vec2 &axis)

No description in the source header.

RevoluteJoint createRevoluteJoint(const Body &bodyA, const Body &bodyB, const Vec2 &anchor)

No description in the source header.

WeldJoint createWeldJoint(const Body &bodyA, const Body &bodyB, const Vec2 &anchor)

No description in the source header.

WheelJoint createWheelJoint(const Body &bodyA, const Body &bodyB, const Vec2 &anchor, const Vec2 &axis)

No description in the source header.

std::vector< Collision > getCollisions()

No description in the source header.

const std::vector< ContactEvent > & getContactEvents() const

No description in the source header.

const std::vector< SensorEvent > & getSensorEvents() const

No description in the source header.

queryPoint

function
std::vector< Body > queryPoint(const Vec2 &point)

No description in the source header.

queryAABB

function
std::vector< Body > queryAABB(const Rect &rect)

No description in the source header.

rayCast

function
std::vector< CastHit > rayCast(const Vec2 &origin, const Vec2 &translation)

No description in the source header.

shapeCast

function4 overloads
std::vector< CastHit > shapeCast(const Circle &circle, const Transform &transform, const Vec2 &translation)
std::vector< CastHit > shapeCast(const Capsule &capsule, const Transform &transform, const Vec2 &translation)
std::vector< CastHit > shapeCast(const Polygon &polygon, const Transform &transform, const Vec2 &translation)
std::vector< CastHit > shapeCast(const Rect &rect, const Transform &transform, const Vec2 &translation)

No description in the source header.

fromMapLayer

function
StaticBody fromMapLayer(const tilemap::Layer &layer)

No description in the source header.

setGravity

function
void setGravity(const Vec2 &gravity)

No description in the source header.

getGravity

function
Vec2 getGravity() const

No description in the source header.

isValid

function
bool isValid() const

No description in the source header.

step

function
void step(float delta)

No description in the source header.

debugDraw

function
void debugDraw(const Color &color=Color::RED, const DebugDrawOptions &options={}) const

No description in the source header.

Find your next step

Start typing to search the manual.