OSGMatrixUtility.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2003 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038
00039 #ifndef _OSGMATRIXUTILITY_H_
00040 #define _OSGMATRIXUTILITY_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 #include "OSGBaseTypes.h"
00046 #include "OSGVector.h"
00047 #include "OSGMatrixFwd.h"
00048
00049 OSG_BEGIN_NAMESPACE
00050
00061 OSG_BASE_DLLMAPPING bool MatrixOrthogonal        (OSG::Matrix &result,
00062                                                   OSG::Real32  rLeft,
00063                                                   OSG::Real32  rRight,
00064                                                   OSG::Real32  rBottom,
00065                                                   OSG::Real32  rTop,
00066                                                   OSG::Real32  rNear,
00067                                                   OSG::Real32  rFar        );
00068
00072 OSG_BASE_DLLMAPPING bool MatrixFrustum           (OSG::Matrixr &result,
00073                                                   OSG::Real     rLeft,
00074                                                   OSG::Real     rRight,
00075                                                   OSG::Real     rBottom,
00076                                                   OSG::Real     rTop,
00077                                                   OSG::Real     rNear,
00078                                                   OSG::Real     rFar       );
00079
00083 OSG_BASE_DLLMAPPING bool MatrixPerspective      (OSG::Matrixr &result,
00084                                                  OSG::Real     rFovy,
00085                                                  OSG::Real     rAspect,
00086                                                  OSG::Real     rNear,
00087                                                  OSG::Real     rFar        );
00088
00092 OSG_BASE_DLLMAPPING bool MatrixStereoPerspective(OSG::Matrixr &projection,
00093                                                  OSG::Matrixr &projtrans,
00094                                                  OSG::Real     rFovy,
00095                                                  OSG::Real     rAspect,
00096                                                  OSG::Real     rNear,
00097                                                  OSG::Real     rFfar,
00098                                                  OSG::Real     rZeroparallax,
00099                                                  OSG::Real     rEyedistance,
00100                                                  OSG::Real     rWhicheye,
00101                                                  OSG::Real     rOverlap    );
00102
00106 OSG_BASE_DLLMAPPING bool MatrixLookAt           (OSG::Matrix &result,
00107                                                  OSG::Real32  fromx,
00108                                                  OSG::Real32  fromy,
00109                                                  OSG::Real32  fromz,
00110                                                  OSG::Real32  atx,
00111                                                  OSG::Real32  aty,
00112                                                  OSG::Real32  atz,
00113                                                  OSG::Real32  upx,
00114                                                  OSG::Real32  upy,
00115                                                  OSG::Real32  upz          );
00116
00120 OSG_BASE_DLLMAPPING bool MatrixLookAt           (OSG::Matrix &result,
00121                                                  OSG::Pnt3f   from,
00122                                                  OSG::Pnt3f   at,
00123                                                  OSG::Vec3f   up           );
00124
00125
00129 OSG_BASE_DLLMAPPING bool MatrixProjection       (OSG::Matrix &result,
00130                                                  OSG::Real32 rLeft,
00131                                                  OSG::Real32 rRight,
00132                                                  OSG::Real32 rBottom,
00133                                                  OSG::Real32 rTop,
00134                                                  OSG::Real32 rNear,
00135                                                  OSG::Real32 rFar          );
00136
00140 OSG_END_NAMESPACE
00141
00142 #endif /* _OSGMATRIXUTILITY_H_ */
00143
00144