|
| CarEngine (Vehicle *vehicle, vtHeightField3d *hf) |
|
bool | Valid () |
|
void | Eval () |
|
void | IgnoreElapsedTime () |
|
FPoint3 | GetCurPos () |
|
void | SetEarthPos (const DPoint2 &pos) |
|
DPoint2 | GetEarthPos () |
|
void | SetSpeed (float fMeterPerSec) |
|
void | SetRotation (float fRot) |
|
float | GetRotation () |
|
void | SetSteeringAngle (float fRadians) |
|
void | SetFriction (float factor) |
|
void | SetCameraFollow (bool bOn) |
|
void | SetCameraDistance (float fMeters) |
|
osg::Referenced * | GetTarget (uint which=0) |
|
void | AddTarget (osg::Referenced *ptr) |
|
void | SetTarget (osg::Referenced *ptr) |
|
void | RemoveTarget (osg::Referenced *ptr) |
|
uint | NumTargets () |
| Return the number of targets for this engine.
|
|
void | setName (const char *str) |
|
const char * | getName () |
|
virtual void | OnMouse (vtMouseEvent &event) |
| Virtual handler, to catch mouse events, can be overridden by your engine class.
|
|
virtual void | OnKey (int key, int flags) |
| Virtual handler, to catch keyboard events, can be overridden by your engine class.
|
|
virtual void | OnWindowSize (int width, int height) |
| Virtual handler, to catch resize events, can be overridden by your engine class.
|
|
void | SetWindow (vtWindow *pWin) |
|
vtWindow * | GetWindow () |
|
void | AddChild (vtEngine *pEngine) |
|
void | RemoveChild (vtEngine *pEngine) |
|
vtEngine * | GetChild (uint i) |
|
uint | NumChildren () |
|
void | AddChildrenToList (vtArray< vtEngine * > &list, bool bEnabledOnly) |
|
virtual void | SetEnabled (bool bOn) |
|
bool | GetEnabled () |
|
|
vtHeightField3d * | m_pHeightField |
|
CarEngineMode | m_eMode |
|
FPoint3 | m_vCurPos |
|
float | m_fCurRotation |
|
float | m_fCurPitch |
|
FPoint3 | m_vAxis |
|
float | m_fSpeed |
|
float | m_fTargetSpeed |
|
float | m_fPrevTime |
|
float | m_fSteeringAngle |
|
float | m_fFriction |
|
bool | m_bFirstTime |
|
bool | m_bCameraFollow |
|
float | m_bCameraDistance |
|
Vehicle * | m_pVehicle |
|
vtArray< osg::Referenced * > | m_Targets |
|
std::vector< vtEnginePtr > | m_Children |
|
vtString | m_strName |
|
vtWindow * | m_pWindow |
|
bool | m_bEnabled |
|
Setup engine to drive freely.
- Parameters
-
vehicle | The vehicle this engine will control. |
hf | The surface to drive on. |
Virtual handler, will be called every frame to do the work of the engine. You must override this if you want your engine to be useful.
Reimplemented from vtEngine.
void CarEngine::MoveCarTo |
( |
const FPoint3 & |
next_pos) | |
|
|
protected |
Rotate (yaw) body to head toward next location, pitch it based on tire locations, and determine overall height of vehicle. Steering of wheels is done in here too.
The documentation for this class was generated from the following files:
- D:/job/3kb/gelistirme/umasoft/vtp-src/VTP/TerrainSDK/vtlib/core/CarEngine.h
- D:/job/3kb/gelistirme/umasoft/vtp-src/VTP/TerrainSDK/vtlib/core/CarEngine.cpp