Пример #1
0
static duk_ret_t RigidBody_Name(duk_context* ctx)
{
    RigidBody* thisObj = GetThisWeakObject<RigidBody>(ctx);
    const String & ret = thisObj->Name();
    duk_push_string(ctx, ret.CString());
    return 1;
}
Пример #2
0
void dump (const RigidBody& body)
{
  printf ("Body '%s':\n", body.Name ());
  printf ("  mass                       %.2f\n", body.Mass ());
  printf ("  mass space inertia tensor  "); dump (body.MassSpaceInertiaTensor ());  printf ("\n");
  printf ("  flags                      %08x\n", body.Flags ());
  printf ("  shape                      '%s'\n", body.Shape ().Name ());
  printf ("  material                   '%s'\n", body.Material ().Name ());
  printf ("  collision group            '%s'\n", body.CollisionGroup ());
}