Changeset 527 for trunk/src


Ignore:
Timestamp:
11/03/16 00:51:07 (9 years ago)
Author:
epyon
Message:
  • physics update
Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bullet/bullet_world.cc

    r525 r527  
    8888{
    8989        return collision_shape{ ( void* )new btCapsuleShape( radius, height ) };
     90}
     91
     92nv::collision_shape nv::bullet_world::create_cylinder( const vec3& half_extents )
     93{
     94        return collision_shape{ ( void* )new btCylinderShape( n2b( half_extents ) ) };
    9095}
    9196
  • trunk/src/engine/model_manager.cc

    r526 r527  
    8585        }
    8686
     87        if ( table.has_field( "phx_hextents" ) )
     88                node->phx_hextents = table.get<vec3>( "phx_hextents", vec3() );
     89        if ( table.has_field( "phx_offset" ) )
     90                node->phx_offset = table.get<vec3>( "phx_offset", vec3() );
     91        if ( table.has_field( "phx_mass" ) )
     92                node->phx_mass = table.get<float>( "phx_mass", 0.0f);
     93        if ( table.has_field( "phx_mass" ) )
     94                node->phx_shape = nv::phx_shape( table.get<int>( "phx_shape", 0 ) );
     95
    8796        if ( table.has_field( "local_position" ) )
    8897                node->local.set_position( table.get<vec3>( "local_position", vec3() ) );
Note: See TracChangeset for help on using the changeset viewer.