stereof.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2005, 2008                            */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 #include <string.h>
00012 #include <math.h>
00013 
00014 #ifndef STEREOF_H
00015 #define STEREOF_H
00016 
00017 #ifndef CAMERAF_H
00018 #include "cameraf.h"
00019 #endif
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 typedef struct StereoRecf {
00026   point3f    position;         /* position of the observer        */
00027   float      d;                /* distance between the eyes       */
00028   float      l;                /* distance from the object centre */
00029   CameraRecf left, right;      /* cameras of the eyes             */
00030   trans3f    STr, STrInv;
00031 } StereoRecf;
00032 
00033 
00034 void StereoInitFramef ( StereoRecf *Stereo, boolean upside,
00035                         short width, short height, short xmin, short ymin,
00036                         float aspect, int ncplanes );
00037 void StereoSetDimf ( StereoRecf *Stereo, float f, float d, float l );
00038 void StereoSetMagf ( StereoRecf *Stereo, char mag );
00039 void StereoSetDepthRangef ( StereoRecf *Stereo, float zmin, float zmax );
00040 void StereoSetMappingf ( StereoRecf *Stereo );
00041 void StereoInitPosf ( StereoRecf *Stereo );
00042 void StereoSetRotCentref ( StereoRecf *Stereo,
00043                            point3f *centre,
00044                            boolean global_coord, boolean global_fixed );
00045 void StereoUpdateRotCentref ( StereoRecf *Stereo );
00046 void StereoMoveGf ( StereoRecf *Stereo, vector3f *v );
00047 void StereoMoveCf ( StereoRecf *Stereo, vector3f *v );
00048 void StereoRotGf ( StereoRecf *Stereo, float _psi, float _theta, float _phi );
00049 #define StereoRotXGf(Stereo,angle) \
00050   StereoRotGf ( Stereo, 0.0, angle, 0.0 )
00051 #define StereoRotYGf(Stereo,angle) \
00052   StereoRotGf ( Stereo, 0.5*PI, angle, -0.5*PI )
00053 #define StereoRotZGf(Stereo,angle) \
00054   StereoRotGf ( Stereo, angle, 0.0, 0.0 )
00055 void StereoRotVGf ( StereoRecf *Stereo, vector3f *v, float angle );
00056 void StereoRotCf ( StereoRecf *Stereo, float _psi, float _theta, float _phi );
00057 #define StereoRotXCf(Stereo,angle) \
00058   StereoRotCf ( Stereo, 0.0, angle, 0.0 )
00059 #define StereoRotYCf(Stereo,angle) \
00060   StereoRotCf ( Stereo, 0.5*PI, angle, -0.5*PI )
00061 #define StereoRotZCf(Stereo,angle) \
00062   StereoRotCf ( Stereo, angle, 0.0, 0.0 )
00063 void StereoRotVCf ( StereoRecf *Stereo, vector3f *v, float angle );
00064 void StereoZoomf ( StereoRecf *Stereo, float fchange );
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif /*STEREOF_H*/
00071