![]() |
Kiwano Engine
v1.2.x
|
固定距离关节 更多...
#include <Joint.h>
类 | |
struct | Param |
固定距离关节参数 更多... | |
Public 成员函数 | |
DistanceJoint (const Param ¶m) | |
创建固定距离关节 更多... | |
bool | Init (PhysicWorld *world) override |
初始化关节 | |
void | SetLength (float length) |
设置关节长度 | |
float | GetLength () const |
获取关节长度 | |
void | SetFrequency (float hz) |
设置弹簧响应速度 [赫兹] | |
float | GetFrequency () const |
获取弹簧响应速度 [赫兹] | |
void | SetDampingRatio (float ratio) |
设置阻尼率 | |
float | GetDampingRatio () const |
获取阻尼率 | |
![]() | |
bool | Init (PhysicWorld *world, b2JointDef *joint_def) |
初始化关节 | |
PhysicBodyPtr | GetBodyA () const |
获取关节连接的物体A | |
PhysicBodyPtr | GetBodyB () const |
获取关节连接的物体B | |
PhysicWorld * | GetWorld () const |
获取物理世界 | |
void | Destroy () |
销毁关节 | |
b2Joint * | GetB2Joint () const |
获取b2Joint | |
void | SetB2Joint (b2Joint *joint) |
设置b2Joint | |
![]() | |
ObjectBase () | |
构造基础对象 | |
void | SetName (const String &name) |
设置对象名 | |
String | GetName () const |
获取对象名 | |
bool | IsName (const String &name) const |
判断对象的名称是否相同 更多... | |
void * | GetUserData () const |
获取用户数据 | |
void | SetUserData (void *data) |
设置用户数据 | |
uint64_t | GetObjectID () const |
获取对象ID | |
void | DoSerialize (Serializer *serializer) const override |
序列化 | |
void | DoDeserialize (Deserializer *deserializer) override |
反序列化 | |
virtual bool | IsValid () const |
判断对象是否有效 | |
ObjectStatus * | GetStatus () const |
获取对象状态 | |
void | SetStatus (const ObjectStatus &status) |
设置对象状态 | |
void | Fail (const String &msg, int code=ObjectStatus::fail) |
将对象标记为失败状态 | |
void | ClearStatus () |
清除对象状态 | |
![]() | |
void | Retain () |
增加引用计数 | |
void | Release () |
减少引用计数 | |
uint32_t | GetRefCount () const |
获取引用计数 | |
![]() | |
Vector< uint8_t > | Serialize () const |
序列化为字节串 | |
void | Deserialize (const Vector< uint8_t > &data) |
从字节串反序列化 | |
额外继承的成员函数 | |
![]() | |
enum | Type { Type::Unknown = 0, Type::Revolute, Type::Prismatic, Type::Distance, Type::Pulley, Type::Mouse, Type::Gear, Type::Wheel, Type::Weld, Type::Friction, Type::Rope, Type::Motor } |
关节类型 更多... | |
![]() | |
static void | SetObjectPolicy (const ObjectPolicyFunc &policy) |
设置对象处理策略 | |
static bool | IsTracingLeaks () |
是否启用了内存泄漏追踪 | |
static void | StartTracingLeaks () |
开始追踪内存泄漏 | |
static void | StopTracingLeaks () |
停止追踪内存泄漏 | |
static void | DumpTracingObjects () |
打印所有追踪中的对象信息 | |
static Vector< ObjectBase * > & | GetTracingObjects () |
获取所有追踪中的对象 | |
![]() | |
static void * | operator new (size_t size) |
static void | operator delete (void *ptr) |
static void * | operator new (size_t size, std::nothrow_t const &) noexcept |
static void | operator delete (void *ptr, std::nothrow_t const &) noexcept |
static void * | operator new (size_t size, void *ptr) noexcept |
static void | operator delete (void *ptr, void *place) noexcept |
固定距离关节
kiwano::physics::DistanceJoint::DistanceJoint | ( | const Param & | param | ) |
创建固定距离关节
param | 关节参数 |