Changeset 528 for trunk/src/bullet
- Timestamp:
- 11/09/16 01:07:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bullet/bullet_world.cc
r527 r528 140 140 } 141 141 142 void nv::bullet_world::set_local_scaling( collision_shape shape, const vec3& value ) 143 { 144 btCollisionShape* sh = static_cast<btCollisionShape*>( shape.internal ); 145 sh->setLocalScaling( n2b( value ) ); 146 } 147 148 vec3 nv::bullet_world::get_local_scaling( collision_shape shape ) 149 { 150 btCollisionShape* sh = static_cast<btCollisionShape*>( shape.internal ); 151 return b2n( sh->getLocalScaling() ); 152 } 153 142 154 constraint nv::bullet_world::create_hinge_constraint( rigid_body a, const transform& ta, rigid_body b, const transform& tb, const vec2& low_high, const vec3& params /*= vec3( 0.9f, 0.3f, 1.0f ) */ ) 143 155 { … … 203 215 rb->setCcdMotionThreshold( threshold ); 204 216 rb->setCcdSweptSphereRadius( radius ); 217 } 218 219 vec3 nv::bullet_world::get_rigid_body_linear_velocity( rigid_body body ) 220 { 221 btRigidBody* rb = static_cast<btRigidBody*>( body.internal ); 222 return b2n( rb->getLinearVelocity() ); 223 } 224 225 void nv::bullet_world::apply_central_impulse( rigid_body body, const vec3& impulse ) 226 { 227 btRigidBody* rb = static_cast<btRigidBody*>( body.internal ); 228 rb->applyCentralImpulse( n2b( impulse ) ); 229 rb->forceActivationState( ACTIVE_TAG ); 205 230 } 206 231
Note: See TracChangeset
for help on using the changeset viewer.