c++ - bullet vehicle addWheel parameters -


i'm trying make simple raycast vehicle in bullet. supposed box on sour wheels.

i'm stuck calls btrayvastvehicle::addwheel, because don't understand mean, they're not documented in api documentation , non-native english speaker, i'm having hard time, infer based on names.

what particularly puzzles me, how 3 first parameters define position , orientation of wheel.

so parameters of btraycastvehicle::addwheel do?

from the documentation method btrayvastvehicle::addwheel has signature

btwheelinfo & btraycastvehicle::addwheel( const btvector3& connectionpointcs0,                                           const btvector3& wheeldirectioncs0,                                           const btvector3& wheelaxlecs,                                           btscalar suspensionrestlength,                                           btscalar wheelradius,                                           const btvehicletuning& tuning,                                           bool  isfrontwheel                                         ) 

from method definition can click on each of member variables go header (which vaguely documented unfortunately).

// // of code general 2 or 4 wheel vehicles, of needs reviewed // btwheelinfo& btraycastvehicle::addwheel( const btvector3& connectionpointcs, const btvector3& wheeldirectioncs0,const btvector3& wheelaxlecs, btscalar suspensionrestlength, btscalar wheelradius,const btvehicletuning& tuning, bool isfrontwheel) {      btwheelinfoconstructioninfo ci;      ci.m_chassisconnectioncs = connectionpointcs;     ci.m_wheeldirectioncs = wheeldirectioncs0;     ci.m_wheelaxlecs = wheelaxlecs;     ci.m_suspensionrestlength = suspensionrestlength;     ci.m_wheelradius = wheelradius;     ci.m_suspensionstiffness = tuning.m_suspensionstiffness;     ci.m_wheelsdampingcompression = tuning.m_suspensioncompression;     ci.m_wheelsdampingrelaxation = tuning.m_suspensiondamping;     ci.m_frictionslip = tuning.m_frictionslip;     ci.m_bisfrontwheel = isfrontwheel;     ci.m_maxsuspensiontravelcm = tuning.m_maxsuspensiontravelcm;     ci.m_maxsuspensionforce = tuning.m_maxsuspensionforce;      m_wheelinfo.push_back( btwheelinfo(ci));      btwheelinfo& wheel = m_wheelinfo[getnumwheels()-1];      updatewheeltransformsws( wheel , false );     updatewheeltransform(getnumwheels()-1,false);     return wheel; } 

so looks first 5 arguments describe position , orientation of each of wheels. 6th argument (tuning) seems describe mechanical properties of tire such friction, damping, etc. last parameter seems self-explanatory.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -