Update of /cvsroot/gcblue/gcb_wx/include/sim
In directory sc8-pr-cvs1:/tmp/cvs-serv6686/include/sim
Modified Files:
tc3DViewer.h tcDirectorEvent.h
Log Message:
more briefing and scenario generation features
Index: tc3DViewer.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tc3DViewer.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tc3DViewer.h 31 Dec 2003 00:23:22 -0000 1.16
--- tc3DViewer.h 1 Jan 2004 23:44:46 -0000 1.17
***************
*** 66,70 ****
osg::ref_ptr<osgProducer::OsgCameraGroup> camera_group;
osg::ref_ptr<osg::NodeVisitor> updateVisitor;
! osg::ref_ptr<osgText::Text> viewerText;
osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform
osg::ref_ptr<osg::Projection> orthoProjection; ///< ortho projection for HUD objects
--- 66,70 ----
osg::ref_ptr<osgProducer::OsgCameraGroup> camera_group;
osg::ref_ptr<osg::NodeVisitor> updateVisitor;
! osg::ref_ptr<osgText::Text> viewerText; ///< text for debug/basic viewer info display
osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform
osg::ref_ptr<osg::Projection> orthoProjection; ///< ortho projection for HUD objects
***************
*** 98,101 ****
--- 98,103 ----
void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame
+ void AddText(osgText::Text *text);
+ void RemoveText(osgText::Text *text);
void CreateScene();
void CreateSky();
***************
*** 113,117 ****
void SetHookID(long id) {hookID = id;}
void SetLook(float az, float el);
! void SetMoveWithVector(float az, float el, float range);
void SetText(const char *s);
void ToggleFog();
--- 115,120 ----
void SetHookID(long id) {hookID = id;}
void SetLook(float az, float el);
! void SetCartesianOffset(float x, float y, float z);
! void SetPolarOffset(float az, float el, float range);
void SetText(const char *s);
void ToggleFog();
***************
*** 149,156 ****
--- 152,161 ----
bool lookAtTarget; ///< true to make camera point at target
bool moveWithTarget; ///< true to make camera move with target
+ bool usePolarOffset; ///< uses cameraAz, cameraEl, cameraRange for moveWith if true, otherwise use cameraPositionOffset
double cameraLongitude; ///< lon,lat,alt pos of camera for non moveWith modes
double cameraLatitude; ///< radians
float cameraAltitude; ///< meters
Producer::Vec3 cameraPosition; ///< current position of camera
+ Producer::Vec3 cameraPositionOffset; ///< current position offset of camera rel to target, for moveWith
Producer::Vec3 cameraTarget; ///< point camera is looking at for lookAt modes
float cameraAz; ///< camera azimuth relative to target for moveWith modes
Index: tcDirectorEvent.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirectorEvent.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tcDirectorEvent.h 31 Dec 2003 17:34:10 -0000 1.3
--- tcDirectorEvent.h 1 Jan 2004 23:44:46 -0000 1.4
***************
*** 30,33 ****
--- 30,35 ----
#include <string>
#include <Producer/Math>
+ #include <osg/ref_ptr>
+ //#include <osgText/Text> // for tc3DTextEvent
class tcMapObject;
***************
*** 42,45 ****
--- 44,57 ----
class tc3DViewer;
+ namespace osg
+ {
+ class ref_ptr;
+ }
+
+ namespace osgText
+ {
+ class Text;
+ }
+
using MapView::tcMapView;
/**
***************
*** 204,207 ****
--- 216,223 ----
};
+ /**
+ * A camera that is locked to a target with az/el/range that
+ * can change over the camera move. Name is not the best.
+ */
class tcFlybyCameraEvent : public tcCameraEvent
{
***************
*** 221,224 ****
--- 237,282 ----
};
+ /**
+ * Camera that moves in (x,y,z) relative to target. Same as
+ * FlybyCamera otherwise.
+ */
+ class tcTrackCameraEvent : public tcCameraEvent
+ {
+ public:
+ float startX;
+ float startY;
+ float startZ;
+ float stopX;
+ float stopY;
+ float stopZ;
+
+ virtual void Update(double t);
+
+ tcTrackCameraEvent(double tStart, double tStop, long targID,
+ float x1, float x2, float y1, float y2, float z1, float z2 );
+ virtual ~tcTrackCameraEvent();
+ };
+
+ /**
+ * Adds to viewer and maintains an osgText::Text object to
+ * display 3D text effects for briefing.
+ */
+ class tc3DTextEvent : public tcCameraEvent
+ {
+ public:
+ std::string theText;
+ float fontSize;
+ float textx, texty; ///< normalized text coordinates
+ int effectCode;
+
+ virtual void Update(double t);
+
+ tc3DTextEvent(std::string text, double startTime, double endTime,
+ float x, float y, float size, int effect);
+ virtual ~tc3DTextEvent();
+
+ protected:
+ osg::ref_ptr<osgText::Text> viewerText;
+ };
#endif
|