Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Include
Modified Files:
CSPSim.i TerrainObject.h
Log Message:
Index: CSPSim.i
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.i,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CSPSim.i 23 Jul 2003 01:28:58 -0000 1.7
--- CSPSim.i 23 Jul 2003 07:11:57 -0000 1.8
***************
*** 79,82 ****
--- 79,83 ----
obj->setAttitude(q_attitude);
self->getBattlefield()->addUnit(obj);
+ if (!self->getActiveObject()) self->setActiveObject(obj);
}
void createVehicle(const char *path, simdata::LLA lla,
***************
*** 92,97 ****
--- 93,101 ----
obj->setAttitude(q_attitude);
self->getBattlefield()->addUnit(obj);
+ if (!self->getActiveObject()) self->setActiveObject(obj);
}
void setShell(PyObject *shell) { self->getShell()->bind(shell); }
+ std::string const &getTerrainName() { return self->getTheater()->getTerrain()->getName(); }
+ int getTerrainVersion() { return self->getTheater()->getTerrain()->getVersion(); }
}
Index: TerrainObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/TerrainObject.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TerrainObject.h 19 Jul 2003 14:08:25 -0000 1.9
--- TerrainObject.h 23 Jul 2003 07:11:57 -0000 1.10
***************
*** 91,103 ****
void setHit(float ratio, simdata::Vector3 const &normal);
protected:
! bool _hit;
! float _ratio;
! simdata::Vector3 _start;
! simdata::Vector3 _end;
! simdata::Vector3 _point;
! simdata::Vector3 _normal;
};
BEGIN_SIMDATA_XML_VIRTUAL_INTERFACE(TerrainObject)
SIMDATA_XML("center", TerrainObject::m_Center, true)
SIMDATA_XML("width", TerrainObject::m_Width, true)
--- 91,105 ----
void setHit(float ratio, simdata::Vector3 const &normal);
protected:
! bool _hit;
! float _ratio;
! simdata::Vector3 _start;
! simdata::Vector3 _end;
! simdata::Vector3 _point;
! simdata::Vector3 _normal;
};
BEGIN_SIMDATA_XML_VIRTUAL_INTERFACE(TerrainObject)
+ SIMDATA_XML("name", TerrainObject::m_Name, true)
+ SIMDATA_XML("version", TerrainObject::m_Version, true)
SIMDATA_XML("center", TerrainObject::m_Center, true)
SIMDATA_XML("width", TerrainObject::m_Width, true)
***************
*** 122,125 ****
--- 124,129 ----
inline float getWidth() const { return m_Width; }
inline float getHeight() const { return m_Height; }
+ inline std::string const &getName() const { return m_Name; }
+ inline int getVersion() const { return m_Version; }
Projection const & getProjection() const { return m_Map; }
virtual simdata::Vector3 getOrigin(simdata::Vector3 const &) const = 0;
***************
*** 131,134 ****
--- 135,140 ----
float m_Width, m_Height;
Projection m_Map;
+ std::string m_Name;
+ int m_Version;
virtual void pack(simdata::Packer& p) const;
|