anyKode Marilou
ContentsIndexHome
PreviousUpNext
GeomBody::GetInertia

Inertia information of the body.

C++
bool GetInertia(Moda::Commons::Inertia * pInertia);
Parameters 
Description 
Moda::Commons::Inertia * pInertia 
[out] Inertia structure pointer to be filled out. 

true if the pInertia structure was filled correctly, false otherwise.

GetInertia returns the inertia information about the body.

4.7.26

ModaCPP::Geom *pSphere=pWorld->QueryGeom("sphere0");
ModaCPP::GeomBody *pSphereBody=pSphere->GetBody();
if( pSphereBody)
    {
    Moda::Commons::Inertia InertiaValues;
    if( pSphereBody->GetInertia(&InertiaValues))
        {
        xkode::lib::String string=InertiaValues.ToString();
        _cprintf("%s\r\n",string.GetData());
        }
    else
        {
        _cprintf("Error while retrieving body's inertia values (%d)\r\n",pSphereBody->GetLastSystemError());
        }
    }
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
What do you think about this topic? Send feedback!