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.7 2005/03/15 21:44:11 mju Exp $
00007  *
00008  * $Log: 3dpath.h_v $
00009  * Revision 1.7  2005/03/15 21:44:11  mju
00010  * Remove mapproj hdr.
00011  *
00012  * Revision 1.6  2004/08/25 23:02:15  vdronov
00013  * CoordRefSys and structure MmAlloc
00014  *
00015  * Revision 1.5  2004/06/30 14:52:11  vdronov
00016  * *** empty log message ***
00017  *
00018  * Revision 1.4  2003/09/15 13:48:59  fileserver!dwilliss
00019  * Doxygen
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 
00044 #ifndef GENERATING_DOXYGEN_OUTPUT
00045 struct MDISP3DPATHANGLE {
00046    double Roll;
00047    double Pitch;
00048    double Yaw;
00049    };
00050 
00051 struct MDISP3DPATHPOINT {
00052    double Time;                     //!< Time from beginning of path to this point (seconds)
00053    double TurnTime;                 //!< Time before/after point for start/end of turn
00054    DPOINT3D ViewPos;                //!< Viewer position in specified map coordinates
00055    DPOINT3D ViewDir;                //!< Direction of view in map coordinates (normalized)
00056    DPOINT3D ViewUp;                 //!< View-Up vector in map coordinates (normalized)
00057    DPOINT3D LinearVel;              //!< Linear velocity at this point
00058    DPOINT3D LinearAcc;              //!< Linear acceleration to next point
00059    MDISP3DPATHANGLE AngularVel;     //!< Angular velocity at this point in rad/sec for viewer rotation
00060    MDISP3DPATHANGLE AngularAcc;     //!< Angular acceleration rad/sec/sec for viewer rotation
00061    };
00062 
00063 struct MDISP3DPATHSEGMENT {
00064    UINT32 NumPoints;                //!< Number of points in this segment
00065    UINT32 flags;                    //!< Flags (PATH3D_SEGMENTFLAG_...)
00066    UINT8 ZMode;                     //!< Mode for determining Z values
00067    UINT8 SpeedMode;                 //!< Mode for determining velocity values
00068    UINT8 ViewElevationMode;            //!< Mode for determining viewpoint elevation angle
00069    double ZValue;                   //!< Value for ZMODE_Fixed... settings
00070    double SpeedValue;                  //!< Constant speed or turn rate depending on view mode
00071    double ViewElevationAngle;          //!< Elevation angle if not variable
00072    double StartAngle;                  //!< Start angle for orbit or panoramic mode
00073    double EndAngle;                 //!< End angle for orbit or panoramic mode
00074    DPOINT3D Center;                 //!< Center point for orbit or panoramic mode
00075    };
00076 
00077 struct MDISP3DPATHVIEW {
00078    double StereoDistance0;             //!< Stereo zero-parallax distance
00079    double StereoDepthScale;            //!< Stereo depth scaling
00080    double ZScale;                   //!< Overall Z-Scale
00081    double BaseElevation;               //!< Base elevation
00082 
00083    };
00084 
00085 struct _MDISP3DPATH {
00086    UINT32 NumSegments;                 //!< Number of segments
00087    UINT32 MaxSegments;                 //!< Number of segments allocated
00088    MDISP3DPATHSEGMENT *Segment;        //!< Segment array
00089    UINT32 NumPoints;                //!< Number of points
00090    UINT32 MaxPoints;                //!< Number of points allocated
00091    MDISP3DPATHPOINT *Point;            //!< Point array
00092    double MaxLinearVel;             //!< Maximum linear velocity in meters/sec
00093    double MaxLinearAcc;             //!< Maximum acceleration in meters/sec/sec
00094    double MaxLinearDec;             //!< Maximum deceleration in meters/sec/sec
00095    MDISP3DPATHANGLE MaxAngularAcc;        //!< Maximum angular acceleration rad/sec/sec
00096    MDISP3DPATHANGLE MaxAngularVel;        //!< Maximum angular velocity in radians/second
00097    SPATREF::COORDREFSYS PointCoordRefSys; //!< Map projection for points along path
00098    MDISP3DPATHVIEW View;               //!< Viewing parameters that apply to entire path
00099 
00100    _MDISP3DPATH (
00101       ) :
00102       NumSegments(0),
00103       MaxSegments(0),                  
00104       Segment(0),
00105       NumPoints(0),                 
00106       MaxPoints(0),                 
00107       Point(0),            
00108       MaxLinearVel(0.0),               
00109       MaxLinearAcc(0.0),               
00110       MaxLinearDec(0.0)             
00111       {
00112       };
00113    };
00114 typedef _MDISP3DPATH *MDISP3DPATH;
00115 
00116 #define  PATH3D_SEGMENTFLAG_TimeSet          0x00000001
00117 #define  PATH3D_SEGMENTFLAG_ViewToPoint         0x00000002
00118 #define  PATH3D_SEGMENTFLAG_Panoramic        0x00000004
00119 #define  PATH3D_SEGMENTFLAG_Orbit            0x00000008
00120 #define  PATH3D_SEGMENTFLAG_DualSweep        0x00000020
00121 
00122 #define  PATH3D_ZMODE_Variable               0
00123 #define  PATH3D_ZMODE_FixedAboveSurface         1
00124 #define  PATH3D_ZMODE_FixedAbsolute          2
00125 
00126 #define  PATH3D_SPEEDMODE_Variable           0
00127 #define  PATH3D_SPEEDMODE_Constant           1
00128 
00129 #define  PATH3D_VIEWELEVATIONMODE_Variable      0
00130 #define  PATH3D_VIEWELEVATIONMODE_Constant      1
00131 #define  PATH3D_VIEWELEVATIONMODE_PathRelative  2
00132 
00133 extern "C" {   //! C Linkage
00134 
00135 int            Mdisp3dPathClear (MDISP3DPATH);
00136 int            Mdisp3dPathCompute (MDISP3DPATH);
00137 double         Mdisp3dPathComputeSegmentLength (MDISP3DPATH, UINT32);
00138 double         Mdisp3dPathComputeSegmentTime (MDISP3DPATH, UINT32);
00139 double         Mdisp3dPathComputeSegmentSweepAngle (MDISP3DPATH, UINT32);
00140 double         Mdisp3dPathComputeTotalLength (MDISP3DPATH);
00141 double         Mdisp3dPathComputeTotalTime (MDISP3DPATH);
00142 int            Mdisp3dPathCreate (MDISP3DPATH*, GRE_GROUP*);
00143 void        Mdisp3dPathDestroy (MDISP3DPATH);
00144 int            Mdisp3dPathPointAppend (MDISP3DPATH, MDISP3DPATHPOINT*);
00145 
00146 int            Mdisp3dSimPlayCreate (void**, MDISP3DPATH, GRE_VIEW*);
00147 void        Mdisp3dSimPlayDestroy (void*);
00148 int            Mdisp3dSimPlayDrawFrame (void*, int);
00149 int            Mdisp3dSimPlayIncrement (void*, double);
00150 void        Mdisp3dSimPlayGetPositionOverall (void*, UINT32*, double*);
00151 void        Mdisp3dSimPlayGetPositionSegment (void*, UINT32*, UINT32*, double*);
00152 void        Mdisp3dSimPlayOpenObjects (void*);
00153 int            Mdisp3dSimPlaySetPositionSegment (void*, UINT32, UINT32);
00154 void        Mdisp3dSimPlaySetReduceSpeckle (void*, UINT8);
00155 int            Mdisp3dSimPlaySetSurfaceLayer (void*, GRE_LAYER_SURFACE*);
00156 void        Mdisp3dSimPlayGetSurfTrans (void*, void**);
00157 void        Mdisp3dSimPlayGetPositionDirection (void*, DPOINT3D*, DPOINT3D*);
00158 void        Mdisp3dSimPlayGetOrbitRadius (void*, DOUBLE*);
00159 
00160 }  //! C Linkage
00161 
00162 #endif //!< GENERATING_DOXYGEN_OUTPUT
00163 
00164 
00165 #endif   INC_GRE_3DPATH_H

Generated on Wed May 31 15:26:38 2006 for TNTsdk by  doxygen 1.3.8-20040913