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 00120 struct iCelEntity; 00121 struct iBodyGroup; 00122 struct iMeshFactoryWrapper; 00123 struct iODEHinge2Joint; 00124 struct iODEAMotorJoint; 00125 struct iRigidBody; 00126 00127 struct iPcWheeled : public virtual iBase 00128 { 00129 SCF_INTERFACE (iPcWheeled, 1, 0, 0); 00130 00138 virtual void SetWheelMesh(const char* wheelfact, const char* wheelfile) = 0; 00139 00147 virtual void SetWheelMesh(size_t wheelnum, const char* wheelfact, 00148 const char* wheelfile) = 0; 00149 00154 virtual void SetTankMode(bool tankmode) = 0; 00155 00159 virtual bool GetTankMode() = 0; 00160 00165 CS_DEPRECATED_METHOD virtual void SetABSEnabled(bool enabled) = 0; 00166 00170 CS_DEPRECATED_METHOD virtual bool GetABSEnabled() = 0; 00171 00178 virtual void SetDifferential(bool enabled) = 0; 00179 00185 virtual void SetAntiSway(bool enabled) = 0; 00186 00191 virtual void SetAntiSwayFactor(float antiswayfactor) = 0; 00192 00197 virtual void SetAntiSwayLimit(float antiswaylimit) = 0; 00198 00199 00203 virtual bool GetDifferential() = 0; 00204 00208 virtual bool GetAntiSway() = 0; 00209 00213 virtual float GetAntiSwayFactor() = 0; 00214 00218 virtual float GetAntiSwayLimit() = 0; 00219 00224 virtual void SetABS(bool enabled) = 0; 00225 00229 virtual bool GetABS() = 0; 00230 00242 virtual size_t AddWheelAuto(csVector3 position, const char* wheelfact = 0, 00243 const char* wheelfile = 0, 00244 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00245 00249 CS_DEPRECATED_METHOD virtual size_t AddWheel(csVector3 position, 00250 float turnspeed, float returnspeed, 00251 float suspensionsoftness, float suspensiondamping, 00252 float brakepower, float enginepower, 00253 float leftsteersensitivity, 00254 float rightsteersensitivity, bool handbrakeaffect, 00255 bool steerinvert, const char* wheelfact = 0, 00256 const char* wheelfile = 0, 00257 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00258 00282 virtual size_t AddWheel(csVector3 position, 00283 float turnspeed, float returnspeed, 00284 float suspensionsoftness, float suspensiondamping, 00285 float brakepower, float enginepower, 00286 float leftsteersensitivity, float friction, float mass, 00287 float rightsteersensitivity, bool handbrakeaffect, 00288 bool steerinvert, const char* wheelfact = 0, 00289 const char* wheelfile = 0, 00290 csMatrix3 rotation = csMatrix3(0.0f,0.0f,0.0f,0.0f)) = 0; 00291 00296 virtual void DeleteWheel(size_t wheelnum) = 0; 00297 00301 virtual void DeleteAllWheels() = 0; 00302 00307 virtual void DestroyWheel(size_t wheelnum) = 0; 00308 00313 virtual void DestroyAllWheels() = 0; 00314 00318 virtual void RestoreWheel(size_t wheelnum) = 0; 00319 00323 virtual void RestoreAllWheels() = 0; 00324 00333 virtual void SetOuterWheelSteerPreset(float sensitivity) = 0; 00334 00338 CS_DEPRECATED_METHOD virtual void SetFrontWheelPreset(float sensitivity, 00339 float power, float suspensionsoftness, float suspensiondamping) = 0; 00340 00354 virtual void SetFrontWheelPreset(float sensitivity,float power, 00355 float suspensionsoftness, float suspensiondamping, float friction, 00356 float mass) = 0; 00357 00361 CS_DEPRECATED_METHOD virtual void SetRearWheelPreset(float sensitivity, 00362 float power, float suspensionsoftness, float suspensiondamping) = 0; 00363 00377 virtual void SetRearWheelPreset(float sensitivity,float power, 00378 float suspensionsoftness, float suspensiondamping, float friction, 00379 float mass) = 0; 00380 00385 virtual void Accelerate(float amount = 1.0f) = 0; 00386 00390 virtual float GetAcceleratorAmount() = 0; 00391 00396 virtual void Brake(float amount = 1.0f) = 0; 00397 00401 virtual float GetBrakeAmount() = 0; 00402 00407 virtual void Handbrake(bool applied) = 0; 00408 00412 virtual bool IsHandbraking() = 0; 00413 00418 virtual void SetSteerAmount(float amount) = 0; 00419 00424 virtual void SetBrakeForce(float force) = 0; 00425 00429 virtual float GetSteerAmount() = 0; 00430 00434 virtual float GetSpeed() = 0; 00435 00440 virtual void SteerLeft(float amount = 1.0f) = 0; 00441 00446 virtual void SteerRight(float amount = 1.0f) = 0; 00447 00454 virtual void Steer(float amount) = 0; 00455 00459 virtual void SteerStraight() = 0; 00460 00464 virtual void Reverse() = 0; 00465 00470 virtual void Neutral() = 0; 00471 00477 virtual void SetAutoTransmission(bool autoTransmission) = 0; 00478 00484 virtual void SetGear(int gear) = 0; 00485 00489 virtual int GetGear() = 0; 00490 00494 virtual void SetGearSettings(int gear,float velocity, float force) = 0; 00495 00500 virtual float GetGearVelocity(int gear) = 0; 00501 00506 virtual float GetGearForce(int gear) = 0; 00507 00511 virtual int GetTopGear() = 0; 00512 00518 virtual void SetAutoReverse(bool autoreverse) = 0; 00519 00523 virtual iBodyGroup* GetBodyGroup() = 0; 00524 00530 virtual void SetWheelPosition(size_t wheelnum, csVector3 position) = 0; 00531 00537 virtual void SetWheelRotation(size_t wheelnum, csMatrix3 rotation) = 0; 00538 00544 virtual void SetWheelSuspensionSoftness(size_t wheelnum, float softness) = 0; 00545 00551 virtual void SetWheelSuspensionDamping(size_t wheelnum, float damping) = 0; 00552 00558 virtual void SetWheelLeftSteerSensitivity(size_t wheelnum, 00559 float sensitivity) = 0; 00560 00566 virtual void SetWheelRightSteerSensitivity(size_t wheelnum, 00567 float sensitivity) = 0; 00568 00574 virtual void SetWheelFriction(size_t wheelnum, 00575 float friction) = 0; 00576 00582 virtual void SetWheelMass(size_t wheelnum, 00583 float mass) = 0; 00584 00591 virtual void SetWheelTurnSpeed(size_t wheelnum, float speed) = 0; 00592 00598 virtual void SetWheelReturnSpeed(size_t wheelnum, float speed) = 0; 00599 00606 virtual void SetWheelEnginePower(size_t wheelnum, float power) = 0; 00607 00614 virtual void SetWheelBrakePower(size_t wheelnum, float power) = 0; 00615 00623 virtual void SetWheelSteerInverted(size_t wheelnum, bool inverted) = 0; 00624 00632 virtual void SetWheelHandbrakeAffected(size_t wheelnum, 00633 bool handbrakeaffected) = 0; 00634 00639 virtual csVector3 GetWheelPosition(size_t wheelnum) = 0; 00640 00645 virtual csMatrix3 GetWheelRotation(size_t wheelnum) = 0; 00646 00651 virtual float GetWheelSuspensionSoftness(size_t wheelnum) = 0; 00652 00657 virtual float GetWheelSuspensionDamping(size_t wheelnum) = 0; 00658 00663 virtual float GetWheelLeftSteerSensitivity(size_t wheelnum) = 0; 00664 00669 virtual float GetWheelRightSteerSensitivity(size_t wheelnum) = 0; 00670 00675 virtual float GetWheelFriction(size_t wheelnum) = 0; 00676 00681 virtual float GetWheelMass(size_t wheelnum) = 0; 00682 00687 virtual float GetWheelTurnSpeed(size_t wheelnum) = 0; 00688 00693 virtual float GetWheelReturnSpeed(size_t wheelnum) = 0; 00694 00700 virtual float GetWheelEnginePower(size_t wheelnum) = 0; 00701 00706 virtual float GetWheelBrakePower(size_t wheelnum) = 0; 00707 00712 virtual bool GetWheelSteerInverted(size_t wheelnum) = 0; 00713 00718 virtual bool GetWheelHandbrakeAffected(size_t wheelnum) = 0; 00719 00723 virtual size_t GetWheelCount() = 0; 00724 00729 virtual float GetWheelSpin(size_t wheelnum) = 0; 00730 00734 virtual float GetAverageWheelSpin() = 0; 00735 00740 virtual iRigidBody* GetWheelBody(size_t wheelnum) = 0; 00741 00746 virtual iODEHinge2Joint* GetWheelJoint(size_t wheelnum) = 0; 00747 00752 virtual iODEAMotorJoint* GetBrakeMotor(size_t wheelnum) = 0; 00753 00759 virtual void SetCollisionCallbackEnabled (bool en) = 0; 00760 00765 virtual bool IsCollisionCallbackEnabled () const = 0; 00766 }; 00767 00768 #endif // __CEL_PF_WHEELED__ 00769
Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.6.1
