propclass/mechthruster.h
00001 /* 00002 Crystal Space Entity Layer 00003 Copyright (C) 2005 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_MECHANICS_THRUSTER__ 00021 #define __CEL_PF_MECHANICS_THRUSTER__ 00022 00023 #include "cstypes.h" 00024 #include "csutil/scf.h" 00025 00026 #include "propclass/mechcommon.h" 00027 00028 class csVector3; 00029 struct iPcMechanicsObject; 00030 struct iPcMechanicsThrusterGroup; 00031 00040 struct iPcMechanicsThruster : public virtual iBase 00041 { 00042 SCF_INTERFACE (iPcMechanicsThruster, 0, 0, 1); 00043 00048 virtual void SetMechanicsObject (iPcMechanicsObject* mechsys) = 0; 00049 00053 virtual iPcMechanicsObject* GetMechanicsObject () = 0; 00054 00055 00057 //Set thruster properties 00058 00063 virtual void SetPosition (const csVector3& pos) = 0; 00064 00068 virtual const csVector3& GetPosition () = 0; 00069 00074 virtual void SetOrientation (const csVector3& orientation) = 0; 00075 00079 virtual const csVector3& GetOrientation () = 0; 00080 00086 virtual void SetMaxThrust (float maxthrust) = 0; 00087 00091 virtual float GetMaxThrust () = 0; 00092 00098 virtual float GetThrustForce (float thrust) = 0; 00099 00103 virtual float AvailableThrust () = 0; 00104 00105 00107 //Applying thrust 00108 00113 virtual void ThrustChange (float deltathrust) = 0; 00114 }; 00115 00116 00117 enum celAxisType 00118 { 00119 CEL_AT_NONE, 00120 CEL_AT_ROTATION, 00121 CEL_AT_TRANSLATION 00122 }; 00123 00133 struct iPcMechanicsBalancedGroup : public virtual iBase 00134 { 00135 SCF_INTERFACE (iPcMechanicsBalancedGroup, 0, 0, 1); 00136 00141 virtual void SetType (celAxisType type) = 0; 00142 00146 virtual celAxisType GetType () = 0; 00147 00148 00155 virtual void AddThruster (iPcMechanicsThruster* thruster, 00156 float multiplier) = 0; 00157 00162 virtual void RemoveThruster (const char* tag) = 0; 00163 00168 virtual iPcMechanicsThruster* GetThruster (const char* tag) = 0; 00169 00174 virtual float AvailableThrust () = 0; 00175 00180 virtual float AvailableThrustForce () = 0; 00181 00186 virtual void ChangeThrust (float deltathrust) = 0; 00187 }; 00188 00189 00202 struct iPcMechanicsThrusterController : public virtual iBase 00203 { 00204 SCF_INTERFACE (iPcMechanicsThrusterController, 0, 0, 1); 00205 00210 virtual void SetMechanicsObject (iPcMechanicsObject* mechobj) = 0; 00211 00215 virtual iPcMechanicsObject* GetMechanicsObject () = 0; 00216 00226 virtual void AddAxis (const char* name, celAxisType type, const 00227 csVector3 axis) = 0; 00228 00233 virtual const csVector3 GetAxis (const char* name) = 0; 00234 00239 virtual const celAxisType GetAxisType (const char* name) = 0; 00240 00245 virtual const float GetAxisVelocity (const char* name) = 0; 00246 00251 virtual float GetAxisMaxForce (const char* name) = 0; 00252 00258 virtual float GetAxisMaxThrust (const char* name) = 0; 00259 00265 virtual void AddBalancedGroup (iPcMechanicsBalancedGroup* group, 00266 const char* axisname) = 0; 00267 00273 virtual void RemoveBalancedGroup (const char* grouptag, const char* 00274 axisname) = 0; 00275 00282 virtual void ApplyThrust (float thrust, const char* axisname, 00283 uint32& id) = 0; 00284 00289 virtual void CancelThrust (uint32 id) = 0; 00290 }; 00291 00292 #endif //__CEL_PF_MECHANICS_THRUSTER__
Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.6.1
