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 00123 struct iCelEntity; 00124 struct iBodyGroup; 00125 struct iMeshFactoryWrapper; 00126 struct iODEHinge2Joint; 00127 struct iODEAMotorJoint; 00128 struct iRigidBody; 00129 00130 struct iPcWheeled : public virtual iBase 00131 { 00132 SCF_INTERFACE (iPcWheeled, 1, 0, 0); 00133 00141 virtual void SetWheelMesh(const char* wheelfact, const char* wheelfile) = 0; 00142 00150 virtual void SetWheelMesh(size_t wheelnum, const char* wheelfact, 00151 const char* wheelfile) = 0; 00152 00157 virtual void SetTankMode(bool tankmode) = 0; 00158 00162 virtual bool GetTankMode() = 0; 00163 00168 CS_DEPRECATED_METHOD virtual void SetABSEnabled(bool enabled) = 0; 00169 00173 CS_DEPRECATED_METHOD virtual bool GetABSEnabled() = 0; 00174 00181 virtual void SetDifferential(bool enabled) = 0; 00182 00188 virtual void SetAntiSway(bool enabled) = 0; 00189 00194 virtual void SetAntiSwayFactor(float antiswayfactor) = 0; 00195 00200 virtual void SetAntiSwayLimit(float antiswaylimit) = 0; 00201 00202 00206 virtual bool GetDifferential() = 0; 00207 00211 virtual bool GetAntiSway() = 0; 00212 00216 virtual float GetAntiSwayFactor() = 0; 00217 00221 virtual float GetAntiSwayLimit() = 0; 00222 00227 virtual void SetABS(bool enabled) = 0; 00228 00232 virtual bool GetABS() = 0; 00233 00245 virtual size_t AddWheelAuto(csVector3 position, const char* wheelfact = 0, 00246 const char* wheelfile = 0, 00247 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00248 00252 CS_DEPRECATED_METHOD virtual size_t AddWheel(csVector3 position, 00253 float turnspeed, float returnspeed, 00254 float suspensionsoftness, float suspensiondamping, 00255 float brakepower, float enginepower, 00256 float leftsteersensitivity, 00257 float rightsteersensitivity, bool handbrakeaffect, 00258 bool steerinvert, const char* wheelfact = 0, 00259 const char* wheelfile = 0, 00260 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00261 00285 virtual size_t AddWheel(csVector3 position, 00286 float turnspeed, float returnspeed, 00287 float suspensionsoftness, float suspensiondamping, 00288 float brakepower, float enginepower, 00289 float leftsteersensitivity, float friction, float mass, 00290 float rightsteersensitivity, bool handbrakeaffect, 00291 bool steerinvert, const char* wheelfact = 0, 00292 const char* wheelfile = 0, 00293 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00294 00299 virtual void DeleteWheel(size_t wheelnum) = 0; 00300 00304 virtual void DeleteAllWheels() = 0; 00305 00310 virtual void DestroyWheel(size_t wheelnum) = 0; 00311 00316 virtual void DestroyAllWheels() = 0; 00317 00321 virtual void RestoreWheel(size_t wheelnum) = 0; 00322 00326 virtual void RestoreAllWheels() = 0; 00327 00336 virtual void SetOuterWheelSteerPreset(float sensitivity) = 0; 00337 00341 CS_DEPRECATED_METHOD virtual void SetFrontWheelPreset(float sensitivity, 00342 float power, float suspensionsoftness, float suspensiondamping) = 0; 00343 00357 virtual void SetFrontWheelPreset(float sensitivity,float power, 00358 float suspensionsoftness, float suspensiondamping, float friction, 00359 float mass) = 0; 00360 00364 CS_DEPRECATED_METHOD virtual void SetRearWheelPreset(float sensitivity, 00365 float power, float suspensionsoftness, float suspensiondamping) = 0; 00366 00380 virtual void SetRearWheelPreset(float sensitivity,float power, 00381 float suspensionsoftness, float suspensiondamping, float friction, 00382 float mass) = 0; 00383 00388 virtual void Accelerate(float amount = 1.0f) = 0; 00389 00393 virtual float GetAcceleratorAmount() = 0; 00394 00399 virtual void Brake(float amount = 1.0f) = 0; 00400 00404 virtual float GetBrakeAmount() = 0; 00405 00410 virtual void Handbrake(bool applied) = 0; 00411 00415 virtual bool IsHandbraking() = 0; 00416 00421 virtual void SetSteerAmount(float amount) = 0; 00422 00427 virtual void SetBrakeForce(float force) = 0; 00428 00432 virtual float GetSteerAmount() = 0; 00433 00437 virtual float GetSpeed() = 0; 00438 00443 virtual void SteerLeft(float amount = 1.0f) = 0; 00444 00449 virtual void SteerRight(float amount = 1.0f) = 0; 00450 00457 virtual void Steer(float amount) = 0; 00458 00462 virtual void SteerStraight() = 0; 00463 00467 virtual void Reverse() = 0; 00468 00473 virtual void Neutral() = 0; 00474 00480 virtual void SetAutoTransmission(bool auto) = 0; 00481 00487 virtual void SetGear(int gear) = 0; 00488 00492 virtual int GetGear() = 0; 00493 00497 virtual void SetGearSettings(int gear,float velocity, float force) = 0; 00498 00503 virtual float GetGearVelocity(int gear) = 0; 00504 00509 virtual float GetGearForce(int gear) = 0; 00510 00514 virtual int GetTopGear() = 0; 00515 00521 virtual void SetAutoReverse(bool autoreverse) = 0; 00522 00526 virtual iBodyGroup* GetBodyGroup() = 0; 00527 00533 virtual void SetWheelPosition(size_t wheelnum, csVector3 position) = 0; 00534 00540 virtual void SetWheelRotation(size_t wheelnum, csMatrix3 rotation) = 0; 00541 00547 virtual void SetWheelSuspensionSoftness(size_t wheelnum, float softness) = 0; 00548 00554 virtual void SetWheelSuspensionDamping(size_t wheelnum, float damping) = 0; 00555 00561 virtual void SetWheelLeftSteerSensitivity(size_t wheelnum, 00562 float sensitivity) = 0; 00563 00569 virtual void SetWheelRightSteerSensitivity(size_t wheelnum, 00570 float sensitivity) = 0; 00571 00577 virtual void SetWheelFriction(size_t wheelnum, 00578 float friction) = 0; 00579 00585 virtual void SetWheelMass(size_t wheelnum, 00586 float mass) = 0; 00587 00594 virtual void SetWheelTurnSpeed(size_t wheelnum, float speed) = 0; 00595 00601 virtual void SetWheelReturnSpeed(size_t wheelnum, float speed) = 0; 00602 00609 virtual void SetWheelEnginePower(size_t wheelnum, float power) = 0; 00610 00617 virtual void SetWheelBrakePower(size_t wheelnum, float power) = 0; 00618 00626 virtual void SetWheelSteerInverted(size_t wheelnum, bool inverted) = 0; 00627 00635 virtual void SetWheelHandbrakeAffected(size_t wheelnum, 00636 bool handbrakeaffected) = 0; 00637 00642 virtual csVector3 GetWheelPosition(size_t wheelnum) = 0; 00643 00648 virtual csMatrix3 GetWheelRotation(size_t wheelnum) = 0; 00649 00654 virtual float GetWheelSuspensionSoftness(size_t wheelnum) = 0; 00655 00660 virtual float GetWheelSuspensionDamping(size_t wheelnum) = 0; 00661 00666 virtual float GetWheelLeftSteerSensitivity(size_t wheelnum) = 0; 00667 00672 virtual float GetWheelRightSteerSensitivity(size_t wheelnum) = 0; 00673 00678 virtual float GetWheelFriction(size_t wheelnum) = 0; 00679 00684 virtual float GetWheelMass(size_t wheelnum) = 0; 00685 00690 virtual float GetWheelTurnSpeed(size_t wheelnum) = 0; 00691 00696 virtual float GetWheelReturnSpeed(size_t wheelnum) = 0; 00697 00703 virtual float GetWheelEnginePower(size_t wheelnum) = 0; 00704 00709 virtual float GetWheelBrakePower(size_t wheelnum) = 0; 00710 00715 virtual bool GetWheelSteerInverted(size_t wheelnum) = 0; 00716 00721 virtual bool GetWheelHandbrakeAffected(size_t wheelnum) = 0; 00722 00726 virtual size_t GetWheelCount() = 0; 00727 00732 virtual float GetWheelSpin(size_t wheelnum) = 0; 00733 00737 virtual float GetAverageWheelSpin() = 0; 00738 00743 virtual iRigidBody* GetWheelBody(size_t wheelnum) = 0; 00744 00749 virtual iODEHinge2Joint* GetWheelJoint(size_t wheelnum) = 0; 00750 00755 virtual iODEAMotorJoint* GetBrakeMotor(size_t wheelnum) = 0; 00756 00762 virtual void SetCollisionCallbackEnabled (bool en) = 0; 00763 00768 virtual bool IsCollisionCallbackEnabled () const = 0; 00769 }; 00770 00771 #endif // __CEL_PF_WHEELED__ 00772
Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1