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 #include "csgeom/matrix3.h" 00026 00119 struct iCelEntity; 00120 struct iBodyGroup; 00121 struct iMeshFactoryWrapper; 00122 struct iODEHinge2Joint; 00123 struct iODEAMotorJoint; 00124 struct iRigidBody; 00125 00126 struct iPcWheeled : public virtual iBase 00127 { 00128 SCF_INTERFACE (iPcWheeled, 1, 0, 0); 00129 00137 virtual void SetWheelMesh(const char* wheelfact, const char* wheelfile) = 0; 00138 00146 virtual void SetWheelMesh(size_t wheelnum, const char* wheelfact, 00147 const char* wheelfile) = 0; 00148 00153 virtual void SetTankMode(bool tankmode) = 0; 00154 00158 virtual bool GetTankMode() = 0; 00159 00164 CS_DEPRECATED_METHOD virtual void SetABSEnabled(bool enabled) = 0; 00165 00169 CS_DEPRECATED_METHOD virtual bool GetABSEnabled() = 0; 00170 00177 virtual void SetDifferential(bool enabled) = 0; 00178 00182 virtual bool GetDifferential() = 0; 00183 00184 00189 virtual void SetABS(bool enabled) = 0; 00190 00194 virtual bool GetABS() = 0; 00195 00207 virtual size_t AddWheelAuto(csVector3 position, const char* wheelfact = 0, 00208 const char* wheelfile = 0, 00209 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00210 00214 CS_DEPRECATED_METHOD virtual size_t AddWheel(csVector3 position, 00215 float turnspeed, float returnspeed, 00216 float suspensionsoftness, float suspensiondamping, 00217 float brakepower, float enginepower, 00218 float leftsteersensitivity, 00219 float rightsteersensitivity, bool handbrakeaffect, 00220 bool steerinvert, const char* wheelfact = 0, 00221 const char* wheelfile = 0, 00222 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00223 00247 virtual size_t AddWheel(csVector3 position, 00248 float turnspeed, float returnspeed, 00249 float suspensionsoftness, float suspensiondamping, 00250 float brakepower, float enginepower, 00251 float leftsteersensitivity, float friction, float mass, 00252 float rightsteersensitivity, bool handbrakeaffect, 00253 bool steerinvert, const char* wheelfact = 0, 00254 const char* wheelfile = 0, 00255 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00256 00261 virtual void DeleteWheel(size_t wheelnum) = 0; 00262 00266 virtual void DeleteAllWheels() = 0; 00267 00272 virtual void DestroyWheel(size_t wheelnum) = 0; 00273 00278 virtual void DestroyAllWheels() = 0; 00279 00283 virtual void RestoreWheel(size_t wheelnum) = 0; 00284 00288 virtual void RestoreAllWheels() = 0; 00289 00298 virtual void SetOuterWheelSteerPreset(float sensitivity) = 0; 00299 00303 CS_DEPRECATED_METHOD virtual void SetFrontWheelPreset(float sensitivity, 00304 float power, float suspensionsoftness, float suspensiondamping) = 0; 00305 00319 virtual void SetFrontWheelPreset(float sensitivity,float power, 00320 float suspensionsoftness, float suspensiondamping, float friction, 00321 float mass) = 0; 00322 00326 CS_DEPRECATED_METHOD virtual void SetRearWheelPreset(float sensitivity, 00327 float power, float suspensionsoftness, float suspensiondamping) = 0; 00328 00342 virtual void SetRearWheelPreset(float sensitivity,float power, 00343 float suspensionsoftness, float suspensiondamping, float friction, 00344 float mass) = 0; 00345 00350 virtual void Accelerate(float amount = 1.0f) = 0; 00351 00355 virtual float GetAcceleratorAmount() = 0; 00356 00361 virtual void Brake(float amount = 1.0f) = 0; 00362 00366 virtual float GetBrakeAmount() = 0; 00367 00372 virtual void Handbrake(bool applied) = 0; 00373 00377 virtual bool IsHandbraking() = 0; 00378 00383 virtual void SetSteerAmount(float amount) = 0; 00384 00389 virtual void SetBrakeForce(float force) = 0; 00390 00394 virtual float GetSteerAmount() = 0; 00395 00399 virtual float GetSpeed() = 0; 00400 00405 virtual void SteerLeft(float amount = 1.0f) = 0; 00406 00411 virtual void SteerRight(float amount = 1.0f) = 0; 00412 00419 virtual void Steer(float amount) = 0; 00420 00424 virtual void SteerStraight() = 0; 00425 00429 virtual void Reverse() = 0; 00430 00435 virtual void Neutral() = 0; 00436 00442 virtual void SetAutoTransmission(bool auto) = 0; 00443 00449 virtual void SetGear(int gear) = 0; 00450 00454 virtual int GetGear() = 0; 00455 00459 virtual void SetGearSettings(int gear,float velocity, float force) = 0; 00460 00465 virtual float GetGearVelocity(int gear) = 0; 00466 00471 virtual float GetGearForce(int gear) = 0; 00472 00476 virtual int GetTopGear() = 0; 00477 00483 virtual void SetAutoReverse(bool autoreverse) = 0; 00484 00488 virtual iBodyGroup* GetBodyGroup() = 0; 00489 00495 virtual void SetWheelPosition(size_t wheelnum, csVector3 position) = 0; 00496 00502 virtual void SetWheelRotation(size_t wheelnum, csMatrix3 rotation) = 0; 00503 00509 virtual void SetWheelSuspensionSoftness(size_t wheelnum, float softness) = 0; 00510 00516 virtual void SetWheelSuspensionDamping(size_t wheelnum, float damping) = 0; 00517 00523 virtual void SetWheelLeftSteerSensitivity(size_t wheelnum, 00524 float sensitivity) = 0; 00525 00531 virtual void SetWheelRightSteerSensitivity(size_t wheelnum, 00532 float sensitivity) = 0; 00533 00539 virtual void SetWheelFriction(size_t wheelnum, 00540 float friction) = 0; 00541 00547 virtual void SetWheelMass(size_t wheelnum, 00548 float mass) = 0; 00549 00556 virtual void SetWheelTurnSpeed(size_t wheelnum, float speed) = 0; 00557 00563 virtual void SetWheelReturnSpeed(size_t wheelnum, float speed) = 0; 00564 00571 virtual void SetWheelEnginePower(size_t wheelnum, float power) = 0; 00572 00579 virtual void SetWheelBrakePower(size_t wheelnum, float power) = 0; 00580 00588 virtual void SetWheelSteerInverted(size_t wheelnum, bool inverted) = 0; 00589 00597 virtual void SetWheelHandbrakeAffected(size_t wheelnum, 00598 bool handbrakeaffected) = 0; 00599 00604 virtual csVector3 GetWheelPosition(size_t wheelnum) = 0; 00605 00610 virtual csMatrix3 GetWheelRotation(size_t wheelnum) = 0; 00611 00616 virtual float GetWheelSuspensionSoftness(size_t wheelnum) = 0; 00617 00622 virtual float GetWheelSuspensionDamping(size_t wheelnum) = 0; 00623 00628 virtual float GetWheelLeftSteerSensitivity(size_t wheelnum) = 0; 00629 00634 virtual float GetWheelRightSteerSensitivity(size_t wheelnum) = 0; 00635 00640 virtual float GetWheelFriction(size_t wheelnum) = 0; 00641 00646 virtual float GetWheelMass(size_t wheelnum) = 0; 00647 00652 virtual float GetWheelTurnSpeed(size_t wheelnum) = 0; 00653 00658 virtual float GetWheelReturnSpeed(size_t wheelnum) = 0; 00659 00665 virtual float GetWheelEnginePower(size_t wheelnum) = 0; 00666 00671 virtual float GetWheelBrakePower(size_t wheelnum) = 0; 00672 00677 virtual bool GetWheelSteerInverted(size_t wheelnum) = 0; 00678 00683 virtual bool GetWheelHandbrakeAffected(size_t wheelnum) = 0; 00684 00688 virtual size_t GetWheelCount() = 0; 00689 00694 virtual float GetWheelSpin(size_t wheelnum) = 0; 00695 00699 virtual float GetAverageWheelSpin() = 0; 00700 00705 virtual iRigidBody* GetWheelBody(size_t wheelnum) = 0; 00706 00711 virtual iODEHinge2Joint* GetWheelJoint(size_t wheelnum) = 0; 00712 00717 virtual iODEAMotorJoint* GetBrakeMotor(size_t wheelnum) = 0; 00718 00724 virtual void SetCollisionCallbackEnabled (bool en) = 0; 00725 00730 virtual bool IsCollisionCallbackEnabled () const = 0; 00731 }; 00732 00733 #endif // __CEL_PF_WHEELED__ 00734
Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7
