[Gcblue-commits] gcb_wx/include/sim tcGroundObject.h,NONE,1.1 tcBallisticWeapon.h,1.4,1.5 tcGameObje
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-01-31 01:32:46
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20285/include/sim Modified Files: tcBallisticWeapon.h tcGameObject.h tcHeloObject.h Added Files: tcGroundObject.h Log Message: Moved launcher position to 3D model animation xml file Added tcGroundObject for ground SAM site Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcGameObject.h 2 Dec 2004 04:17:24 -0000 1.28 --- tcGameObject.h 31 Jan 2005 01:32:36 -0000 1.29 *************** *** 1,20 **** /* ! * Copyright (C) 2003 Dewitt Colclough (de...@tw...) ! * All rights reserved. ! * ! * This file is part of the Global Conflict Blue (GCB) program. ! * GCB is free software; you can redistribute it and/or modify ! * it under the terms of version 2 of the GNU General Public License as ! * published by the Free Software Foundation. ! * ! * GCB is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with GCB; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ #ifndef _TCGAMEOBJECT_H_ --- 1,23 ---- + /** + ** @file tcGameObject.h + */ /* ! ** Copyright (C) 2003-2005 Dewitt Colclough (de...@tw...) ! ** All rights reserved. ! ! ** This file is part of the Global Conflict Blue (GCB) program. ! ** GCB is free software; you can redistribute it and/or modify ! ** it under the terms of version 2 of the GNU General Public License as ! ** published by the Free Software Foundation. ! ! ** GCB is distributed in the hope that it will be useful, ! ** but WITHOUT ANY WARRANTY; without even the implied warranty of ! ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ** GNU General Public License for more details. ! ! ** You should have received a copy of the GNU General Public License ! ** along with GCB; if not, write to the Free Software ! ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! **/ #ifndef _TCGAMEOBJECT_H_ *************** *** 53,75 **** /** * 3D model coordinates relative to parent frame of ! * reference. Objects point in -z direction. */ ! typedef struct _formationparams { bool mbFormation; tnPoolIndex mnFormationLeader; tcKinematics mcFormationKin; float mfFormationRange_km; ! float mfFormationBearing_rad; // relative to leader course ! } tsFormationParameters; /** * 3D model coordinates relative to parent frame of ! * reference. Objects point in -z direction. */ struct tsRelativePosition { float dx; ///< right ! float dy; ///< up ! float dz; ///< back float yaw, pitch, roll; bool isVisible; --- 56,79 ---- /** * 3D model coordinates relative to parent frame of ! * reference. Objects point in y direction. */ ! struct tsFormationParameters ! { bool mbFormation; tnPoolIndex mnFormationLeader; tcKinematics mcFormationKin; float mfFormationRange_km; ! float mfFormationBearing_rad; ///< relative to leader course ! }; /** * 3D model coordinates relative to parent frame of ! * reference. Objects point in y direction. */ struct tsRelativePosition { float dx; ///< right ! float dy; ///< forward ! float dz; ///< up float yaw, pitch, roll; bool isVisible; *************** *** 84,106 **** /** ! * Base class for all game objects. ! */ class tcGameObject { public: tcGameObject *parent; ! tsRelativePosition rel_pos; // if parent is not NULL, this contains relative position std::vector<tcGameObject*> children; ! std::vector<tcGameObject*> toLaunch; // list of ex-childrent to launch ! //osg::ref_ptr<osg::Group> model; ///< 3D model tc3DModel *model; ///< 3D model ! UINT mnModelType; // class MTYPE_ identifier long mnID; ! tcDBString mzClass; // name of database class ! tnPoolIndex mnDBKey; // key of database entry ! tcDBString mzUnit; // specific name of class instance UINT8 mnAlliance; ! // derived objects can have different DB obj type in their scope ! // mpDBObject should always point to relevant data for current model class tcDatabaseObject *mpDBObject; double mfStatusTime; ///< timestamp for parameters --- 88,110 ---- /** ! * Base class for all game objects. ! */ class tcGameObject { public: tcGameObject *parent; ! tsRelativePosition rel_pos; ///< if parent is not NULL, this contains relative position std::vector<tcGameObject*> children; ! std::vector<tcGameObject*> toLaunch; ///< list of ex-childrent to launch tc3DModel *model; ///< 3D model ! UINT mnModelType; ///< class MTYPE_ identifier long mnID; ! tcDBString mzClass; ///< name of database class ! tnPoolIndex mnDBKey; ///< key of database entry ! tcDBString mzUnit; ///< specific name of class instance UINT8 mnAlliance; ! ! /** derived objects can have different DB obj type in their scope ! /* mpDBObject should always point to relevant data for current model class */ tcDatabaseObject *mpDBObject; double mfStatusTime; ///< timestamp for parameters --- NEW FILE: tcGroundObject.h --- /** ** @file tcGroundObject.h */ /* Copyright (C) 2005 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _TCGROUNDOBJECT_H_ #define _TCGROUNDOBJECT_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcFile.h" #include "tcPlatformObject.h" /** * Models a generic ground object (SAM site was initial use) * */ class tcGroundObject : public tcPlatformObject { public: virtual void Clear(); virtual void RandInitNear(float afLon_deg, float afLat_deg); void PrintToFile(tcFile& file); void SaveToFile(tcFile& file); void LoadFromFile(tcFile& file); virtual void Serialize(tcFile& file, bool mbLoad); virtual void Update(double afStatusTime); tcGroundObject(); tcGroundObject(tcGroundObject&); tcGroundObject(tcGenericDBObject* obj); virtual ~tcGroundObject(); }; #endif Index: tcHeloObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcHeloObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcHeloObject.h 9 Aug 2004 02:35:14 -0000 1.1 --- tcHeloObject.h 31 Jan 2005 01:32:36 -0000 1.2 *************** *** 41,44 **** --- 41,45 ---- virtual void UpdateClimb(float dt_s); + virtual void UpdateSpeed(float dt_s); virtual void Update(double afStatusTime); Index: tcBallisticWeapon.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcBallisticWeapon.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcBallisticWeapon.h 17 Aug 2004 02:22:56 -0000 1.4 --- tcBallisticWeapon.h 31 Jan 2005 01:32:36 -0000 1.5 *************** *** 50,54 **** void LaunchFrom(tcGameObject* obj, unsigned nLauncher); virtual void Update(double afStatusTime); ! void PrintToFile(tcFile&); --- 50,55 ---- void LaunchFrom(tcGameObject* obj, unsigned nLauncher); virtual void Update(double afStatusTime); ! bool IsGravityBomb() const; ! bool IsGunRound() const; void PrintToFile(tcFile&); |