CEL: Crystal Entity Layer: propclass/wheeled.h Source File (CEL: Crystal Entity Layer Public API Reference)

| ## Public API Reference

- Main Page
- Classes
- Files

# propclass/wheeled.h

    00001 /*
    00002     Crystal Space Entity Layer
    00003     Copyright (C) 2006 by Jorrit Tyberghein
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public
    00016     License along with this library; if not, write to the Free
    00017     Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __CEL_PF_WHEELED__
    00021 #define __CEL_PF_WHEELED__
    00022
    00023 #include "cstypes.h"
    00024 #include "csutil/scf.h"
    00025
    00050 struct iCelEntity;
    00051 struct iBodyGroup;
    00052 struct iMeshFactoryWrapper;
    00053 struct iODEHinge2Joint;
    00054 struct iRigidBody;
    00055
    00056
    00057 struct iPcWheeled : public virtual iBase
    00058
    00059 {
    00060   SCF_INTERFACE (iPcWheeled, 0, 0, 1);
    00061
    00067   virtual void SetWheelMesh(const char* file, const char* factname) = 0;
    00068
    00073   virtual void SetTankMode(bool tankmode) = 0;
    00074
    00078   virtual int GetTankMode() = 0;
    00079
    00092   virtual int AddWheelAuto(csVector3 position,float turnspeed=2.0f, float returnspeed=2.0f,
    00093                        float suspensionsoftness=0.000125f, float suspensiondamping=0.125f,
    00094                        float brakepower=1.0f) = 0;
    00095
    00111   virtual int AddWheel(csVector3 position,float turnspeed, float returnspeed,
    00112                        float suspensionsoftness, float suspensiondamping,
    00113                        float brakepower, float enginepower, float leftsteersensitivity,
    00114                        float rightsteersensitivity, bool handbrakeaffect,
    00115                        bool steerinvert) = 0;
    00116
    00121   virtual void DeleteWheel(int wheelnum) = 0;
    00122
    00126   virtual void DeleteAllWheels() = 0;
    00127
    00132   virtual void DestroyWheel(int wheelnum) = 0;
    00133
    00137   virtual void DestroyAllWheels() = 0;
    00138
    00142   virtual void RestoreWheel(int wheelnum) = 0;
    00143
    00147   virtual void RestoreAllWheels() = 0;
    00148
    00155   virtual void SetOuterWheelSteerPreset(float sensitivity) = 0;
    00156
    00164   virtual void SetFrontWheelPreset(float sensitivity,float power) = 0;
    00165
    00172   virtual void SetRearWheelPreset(float sensitivity,float power) = 0;
    00173
    00177   virtual void ClearWheelPresets() = 0;
    00178
    00183   virtual void Accelerate(bool applied) = 0;
    00184
    00188   virtual bool IsAccelerating() = 0;
    00189
    00194   virtual void Brake(bool applied) = 0;
    00195
    00199   virtual bool IsBraking() = 0;
    00200
    00205   virtual void Handbrake(bool applied) = 0;
    00206
    00210   virtual bool IsHandbraking() = 0;
    00211
    00212
    00217   virtual void SetSteerAmount(float amount) = 0;
    00218
    00223   virtual void SetBrakeForce(float force) = 0;
    00224
    00228   virtual float GetSteerAmount() = 0;
    00229
    00233   virtual void SteerLeft() = 0;
    00234
    00238   virtual void SteerRight() = 0;
    00239
    00243   virtual void SteerStraight() = 0;
    00244
    00248   virtual void Reverse() = 0;
    00249
    00253   virtual void Neutral() = 0;
    00254
    00259   virtual void SetAutoTransmission(bool auto) = 0;
    00260
    00265   virtual void SetGear(int gear) = 0;
    00266
    00270   virtual int GetGear() = 0;
    00271
    00275   virtual void SetGearSettings(int gear,float velocity, float force) = 0;
    00276
    00281   virtual void SetNumberGears(int number) = 0;
    00282
    00286   virtual size_t GetNumberGears() = 0;
    00287
    00292   virtual void SetAutoReverse(bool autoreverse) = 0;
    00293
    00297   virtual iBodyGroup* GetBodyGroup() = 0;
    00298
    00304   virtual void SetWheelPosition(int wheelnum, csVector3 position) = 0;
    00305
    00311   virtual void SetWheelSuspensionSoftness(int wheelnum, float softness) = 0;
    00312
    00318   virtual void SetWheelSuspensionDamping(int wheelnum, float damping) = 0;
    00319
    00325   virtual void SetWheelLeftSteerSensitivity(int wheelnum, float sensitivity) = 0;
    00326
    00332   virtual void SetWheelRightSteerSensitivity(int wheelnum, float sensitivity) = 0;
    00333
    00339   virtual void SetWheelTurnSpeed(int wheelnum, float speed) = 0;
    00340
    00346   virtual void SetWheelReturnSpeed(int wheelnum, float speed) = 0;
    00347
    00353   virtual void SetWheelEnginePower(int wheelnum, float power) = 0;
    00354
    00360   virtual void SetWheelBrakePower(int wheelnum, float power) = 0;
    00361
    00367   virtual void SetWheelSteerInverted(int wheelnum, bool inverted) = 0;
    00368
    00374   virtual void SetWheelHandbrakeAffected(int wheelnum, bool handbrakeaffected) = 0;
    00375
    00380   virtual csVector3 GetWheelPosition(int wheelnum) = 0;
    00381
    00386   virtual float GetWheelSuspensionSoftness(int wheelnum) = 0;
    00387
    00392   virtual float GetWheelSuspensionDamping(int wheelnum) = 0;
    00393
    00398   virtual float GetWheelLeftSteerSensitivity(int wheelnum) = 0;
    00399
    00404   virtual float GetWheelRightSteerSensitivity(int wheelnum) = 0;
    00405
    00410   virtual float GetWheelTurnSpeed(int wheelnum) = 0;
    00411
    00416   virtual float GetWheelReturnSpeed(int wheelnum) = 0;
    00417
    00422   virtual float GetWheelEnginePower(int wheelnum) = 0;
    00423
    00428   virtual float GetWheelBrakePower(int wheelnum) = 0;
    00429
    00434   virtual bool GetWheelSteerInverted(int wheelnum) = 0;
    00435
    00440   virtual bool GetWheelHandbrakeAffected(int wheelnum) = 0;
    00441 };
    00442
    00443 #endif // __CEL_PF_WHEELED__
    00444