gre/3dpath.h

Go to the documentation of this file.
00001 /**
00002  * \file 3dpath.h <gre/3dpath.h>
00003  * \brief GRE 3D PATH classes
00004  *
00005  * \if NODOC
00006  * $Id: 3dpath.h_v 1.10 2006/06/23 19:26:55 mju Exp $
00007  *
00008  * $Log: 3dpath.h_v $
00009  * Revision 1.10  2006/06/23 19:26:55  mju
00010  * Include spatref hdr.
00011  *
00012  * Revision 1.9  2006/01/05 15:32:23  mju
00013  * Fix ending guard comment.
00014  *
00015  * Revision 1.8  2005/10/27 13:06:26  mju
00016  * Use gre namespace instead of legacy types.
00017  *
00018  * Revision 1.6  2004/08/25 23:02:15  vdronov
00019  * CoordRefSys and structure MmAlloc
00020  *
00021  * Revision 1.3  2003/06/25 13:18:07  mju
00022  * Include gre/base hdr.
00023  *
00024  * Revision 1.2  2003/06/24 16:49:33  mju
00025  * Move fn prototypes here too.
00026  *
00027  * Revision 1.1  2003/06/24 16:38:13  mju
00028  * Initial revision
00029  * \endif
00030 **/
00031 
00032 #ifndef  INC_GRE_3DPATH_H
00033 #define  INC_GRE_3DPATH_H
00034 
00035 #ifndef  INC_GRE_BASE_H
00036    #include <gre/base.h>
00037 #endif
00038 
00039 #ifndef  INC_MI32_POINT_H
00040    #include <mi32/point.h>
00041 #endif
00042 
00043 #ifndef  INC_MI32_SPATREF_H
00044    #include <mi32/spatref.h>
00045 #endif
00046 
00047 
00048 #ifndef GENERATING_DOXYGEN_OUTPUT
00049 struct MDISP3DPATHANGLE {
00050    double Roll;
00051    double Pitch;
00052    double Yaw;
00053    };
00054 
00055 struct MDISP3DPATHPOINT {
00056    double Time;                     //!< Time from beginning of path to this point (seconds)
00057    double TurnTime;                 //!< Time before/after point for start/end of turn
00058    DPOINT3D ViewPos;                //!< Viewer position in specified map coordinates
00059    DPOINT3D ViewDir;                //!< Direction of view in map coordinates (normalized)
00060    DPOINT3D ViewUp;                 //!< View-Up vector in map coordinates (normalized)
00061    DPOINT3D LinearVel;              //!< Linear velocity at this point
00062    DPOINT3D LinearAcc;              //!< Linear acceleration to next point
00063    MDISP3DPATHANGLE AngularVel;     //!< Angular velocity at this point in rad/sec for viewer rotation
00064    MDISP3DPATHANGLE AngularAcc;     //!< Angular acceleration rad/sec/sec for viewer rotation
00065    };
00066 
00067 struct MDISP3DPATHSEGMENT {
00068    UINT32 NumPoints;                //!< Number of points in this segment
00069    UINT32 flags;                    //!< Flags (PATH3D_SEGMENTFLAG_...)
00070    UINT8 ZMode;                     //!< Mode for determining Z values
00071    UINT8 SpeedMode;                 //!< Mode for determining velocity values
00072    UINT8 ViewElevationMode;            //!< Mode for determining viewpoint elevation angle
00073    double ZValue;                   //!< Value for ZMODE_Fixed... settings
00074    double SpeedValue;                  //!< Constant speed or turn rate depending on view mode
00075    double ViewElevationAngle;          //!< Elevation angle if not variable
00076    double StartAngle;                  //!< Start angle for orbit or panoramic mode
00077    double EndAngle;                 //!< End angle for orbit or panoramic mode
00078    DPOINT3D Center;                 //!< Center point for orbit or panoramic mode
00079    };
00080 
00081 struct MDISP3DPATHVIEW {
00082    double StereoDistance0;             //!< Stereo zero-parallax distance
00083    double StereoDepthScale;            //!< Stereo depth scaling
00084    double ZScale;                   //!< Overall Z-Scale
00085    double BaseElevation;               //!< Base elevation
00086 
00087    };
00088 
00089 struct _MDISP3DPATH {
00090    UINT32 NumSegments;                 //!< Number of segments
00091    UINT32 MaxSegments;                 //!< Number of segments allocated
00092    MDISP3DPATHSEGMENT *Segment;        //!< Segment array
00093    UINT32 NumPoints;                //!< Number of points
00094    UINT32 MaxPoints;                //!< Number of points allocated
00095    MDISP3DPATHPOINT *Point;            //!< Point array
00096    double MaxLinearVel;             //!< Maximum linear velocity in meters/sec
00097    double MaxLinearAcc;             //!< Maximum acceleration in meters/sec/sec
00098    double MaxLinearDec;             //!< Maximum deceleration in meters/sec/sec
00099    MDISP3DPATHANGLE MaxAngularAcc;        //!< Maximum angular acceleration rad/sec/sec
00100    MDISP3DPATHANGLE MaxAngularVel;        //!< Maximum angular velocity in radians/second
00101    SPATREF::COORDREFSYS PointCoordRefSys; //!< Map projection for points along path
00102    MDISP3DPATHVIEW View;               //!< Viewing parameters that apply to entire path
00103 
00104    _MDISP3DPATH (
00105       ) :
00106       NumSegments(0),
00107       MaxSegments(0),                  
00108       Segment(0),
00109       NumPoints(0),                 
00110       MaxPoints(0),                 
00111       Point(0),            
00112       MaxLinearVel(0.0),               
00113       MaxLinearAcc(0.0),               
00114       MaxLinearDec(0.0)             
00115       {
00116       };
00117    };
00118 typedef _MDISP3DPATH *MDISP3DPATH;
00119 
00120 #define  PATH3D_SEGMENTFLAG_TimeSet          0x00000001
00121 #define  PATH3D_SEGMENTFLAG_ViewToPoint         0x00000002
00122 #define  PATH3D_SEGMENTFLAG_Panoramic        0x00000004
00123 #define  PATH3D_SEGMENTFLAG_Orbit            0x00000008
00124 #define  PATH3D_SEGMENTFLAG_DualSweep        0x00000020
00125 
00126 #define  PATH3D_ZMODE_Variable               0
00127 #define  PATH3D_ZMODE_FixedAboveSurface         1
00128 #define  PATH3D_ZMODE_FixedAbsolute          2
00129 
00130 #define  PATH3D_SPEEDMODE_Variable           0
00131 #define  PATH3D_SPEEDMODE_Constant           1
00132 
00133 #define  PATH3D_VIEWELEVATIONMODE_Variable      0
00134 #define  PATH3D_VIEWELEVATIONMODE_Constant      1
00135 #define  PATH3D_VIEWELEVATIONMODE_PathRelative  2
00136 
00137 extern "C" {   // C Linkage
00138 
00139 int            Mdisp3dPathClear (MDISP3DPATH);
00140 int            Mdisp3dPathCompute (MDISP3DPATH);
00141 double         Mdisp3dPathComputeSegmentLength (MDISP3DPATH, UINT32);
00142 double         Mdisp3dPathComputeSegmentTime (MDISP3DPATH, UINT32);
00143 double         Mdisp3dPathComputeSegmentSweepAngle (MDISP3DPATH, UINT32);
00144 double         Mdisp3dPathComputeTotalLength (MDISP3DPATH);
00145 double         Mdisp3dPathComputeTotalTime (MDISP3DPATH);
00146 int            Mdisp3dPathCreate (MDISP3DPATH*, GRE::GROUP*);
00147 void        Mdisp3dPathDestroy (MDISP3DPATH);
00148 int            Mdisp3dPathPointAppend (MDISP3DPATH, MDISP3DPATHPOINT*);
00149 
00150 int            Mdisp3dSimPlayCreate (void**, MDISP3DPATH, GRE::VIEW*);
00151 void        Mdisp3dSimPlayDestroy (void*);
00152 int            Mdisp3dSimPlayDrawFrame (void*, int);
00153 int            Mdisp3dSimPlayIncrement (void*, double);
00154 void        Mdisp3dSimPlayGetPositionOverall (void*, UINT32*, double*);
00155 void        Mdisp3dSimPlayGetPositionSegment (void*, UINT32*, UINT32*, double*);
00156 void        Mdisp3dSimPlayOpenObjects (void*);
00157 int            Mdisp3dSimPlaySetPositionSegment (void*, UINT32, UINT32);
00158 void        Mdisp3dSimPlaySetReduceSpeckle (void*, UINT8);
00159 int            Mdisp3dSimPlaySetSurfaceLayer (void*, GRE::LAYER_SURFACE*);
00160 void        Mdisp3dSimPlayGetSurfTrans (void*, void**);
00161 void        Mdisp3dSimPlayGetPositionDirection (void*, DPOINT3D*, DPOINT3D*);
00162 void        Mdisp3dSimPlayGetOrbitRadius (void*, DOUBLE*);
00163 
00164 }  // C Linkage
00165 
00166 #endif // GENERATING_DOXYGEN_OUTPUT
00167 
00168 
00169 #endif   // INC_GRE_3DPATH_H

Generated on Thu Apr 26 04:03:29 2007 for TNTsdk by  doxygen 1.5.2