physics::Body
kn::physics::Body Declared in kraken/physics/bodies/Body.hpp
At a glance
17 membersBodyfunction~BodyfunctionaddColliderfunctiongetCollidersfunctionsetPosfunctiongetPosfunctionsetRotationfunctiongetRotationfunctiongetTransformfunctionisValidfunctiondestroyfunctionoperator==functionoperator!=functionsetCollisionLayerfunctiongetCollisionLayerfunctionsetCollisionMaskfunctiongetCollisionMaskfunctionReference
C++ APIBody
functionBody()=defaultNo description in the source header.
~Body
function~Body()=defaultNo description in the source header.
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
functionstd::vector< Collider > getColliders() constNo description in the source header.
setPos
functionvoid setPos(const Vec2 &pos)No description in the source header.
getPos
functionVec2 getPos() constNo description in the source header.
setRotation
functionvoid setRotation(float rotation)No description in the source header.
getRotation
functionfloat getRotation() constNo description in the source header.
getTransform
functionTransform getTransform() constNo description in the source header.
isValid
functionbool isValid() constNo description in the source header.
destroy
functionvoid destroy()No description in the source header.
operator==
functionbool operator==(const Body &other) constNo description in the source header.
operator!=
functionbool operator!=(const Body &other) constNo description in the source header.
setCollisionLayer
functionvoid setCollisionLayer(uint64_t layer)No description in the source header.
getCollisionLayer
functionuint64_t getCollisionLayer() constNo description in the source header.
setCollisionMask
functionvoid setCollisionMask(uint64_t mask)No description in the source header.
getCollisionMask
functionuint64_t getCollisionMask() constNo description in the source header.