CLASS v1.8.0

physics::Body

kn::physics::Body

Declared in kraken/physics/bodies/Body.hpp

Reference

C++ API

Body

function
Body()=default

No description in the source header.

~Body

function
~Body()=default

No description in the source header.

addCollider

function4 overloads
void addCollider(const Circle &circle, float density=1.0f, float friction=0.2f, float restitution=0.0f, bool enableEvents=false, bool isSensor=false)
void addCollider(const Polygon &polygon, float density=1.0f, float friction=0.2f, float restitution=0.0f, bool enableEvents=false, bool isSensor=false)
void addCollider(const Rect &rect, float density=1.0f, float friction=0.2f, float restitution=0.0f, bool enableEvents=false, bool isSensor=false)
void addCollider(const Capsule &capsule, float density=1.0f, float friction=0.2f, float restitution=0.0f, bool enableEvents=false, bool isSensor=false)

No description in the source header.

getColliders

function
std::vector< Collider > getColliders() const

No description in the source header.

setPos

function
void setPos(const Vec2 &pos)

No description in the source header.

getPos

function
Vec2 getPos() const

No description in the source header.

setRotation

function
void setRotation(float rotation)

No description in the source header.

getRotation

function
float getRotation() const

No description in the source header.

getTransform

function
Transform getTransform() const

No description in the source header.

isValid

function
bool isValid() const

No description in the source header.

destroy

function
void destroy()

No description in the source header.

operator==

function
bool operator==(const Body &other) const

No description in the source header.

operator!=

function
bool operator!=(const Body &other) const

No description in the source header.

void setCollisionLayer(uint64_t layer)

No description in the source header.

uint64_t getCollisionLayer() const

No description in the source header.

void setCollisionMask(uint64_t mask)

No description in the source header.

uint64_t getCollisionMask() const

No description in the source header.

Find your next step

Start typing to search the manual.