示例#1
0
void Physics3DRigidBody::setLinearVelocity( const cocos2d::Vec3& lin_vel )
{
    _btRigidBody->setLinearVelocity(convertVec3TobtVector3(lin_vel));
}
示例#2
0
void Physics3DRigidBody::applyCentralForce( const cocos2d::Vec3& force )
{
    _btRigidBody->applyCentralForce(convertVec3TobtVector3(force));
}
示例#3
0
void Physics3DRigidBody::setMassProps( float mass, const cocos2d::Vec3& inertia )
{
    _btRigidBody->setMassProps(mass, convertVec3TobtVector3(inertia));
}
示例#4
0
void Physics3DRigidBody::applyForce( const cocos2d::Vec3& force, const cocos2d::Vec3& rel_pos )
{
    _btRigidBody->applyForce(convertVec3TobtVector3(force), convertVec3TobtVector3(rel_pos));
}
示例#5
0
void Physics3DRigidBody::setGravity( const cocos2d::Vec3& acceleration )
{
    _btRigidBody->setGravity(convertVec3TobtVector3(acceleration));
}
示例#6
0
void Physics3DRigidBody::setInvInertiaDiagLocal( const cocos2d::Vec3& diagInvInertia )
{
    _btRigidBody->setInvInertiaDiagLocal(convertVec3TobtVector3(diagInvInertia));
}
示例#7
0
void Physics3DRigidBody::setAngularFactor( const cocos2d::Vec3& angFac )
{
    _btRigidBody->setAngularFactor(convertVec3TobtVector3(angFac));
}
示例#8
0
void Physics3DRigidBody::setAngularVelocity( const cocos2d::Vec3& ang_vel )
{
    _btRigidBody->setAngularVelocity(convertVec3TobtVector3(ang_vel));
}
示例#9
0
void Physics3DRigidBody::applyImpulse( const cocos2d::Vec3& impulse, const cocos2d::Vec3& rel_pos )
{
    _btRigidBody->applyImpulse(convertVec3TobtVector3(impulse), convertVec3TobtVector3(rel_pos));
}
示例#10
0
void Physics3DRigidBody::setLinearFactor( const cocos2d::Vec3& linearFactor )
{
    _btRigidBody->setLinearFactor(convertVec3TobtVector3(linearFactor));
}
示例#11
0
void Physics3DRigidBody::applyTorqueImpulse( const cocos2d::Vec3& torque )
{
    _btRigidBody->applyTorqueImpulse(convertVec3TobtVector3(torque));
}
示例#12
0
void Physics3DRigidBody::applyCentralImpulse( const cocos2d::Vec3& impulse )
{
    _btRigidBody->applyCentralImpulse(convertVec3TobtVector3(impulse));
}
示例#13
0
bool Physics3DShape::initCylinder(float radius, float height)
{
    _shapeType = ShapeType::CYLINDER;
    _btShape = new btCylinderShape(convertVec3TobtVector3(cocos2d::Vec3(radius, height, radius) * 0.5f));
    return true;
}
示例#14
0
bool Physics3DShape::initBox(const cocos2d::Vec3& ext)
{
    _shapeType = ShapeType::BOX;
    _btShape = new btBoxShape(convertVec3TobtVector3(ext * 0.5f));
    return true;
}
void Physics3DWorld::setGravity(const Vec3& gravity)
{
    _btPhyiscsWorld->setGravity(convertVec3TobtVector3(gravity));
}