[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd gl_helpers.h
From: |
Gerhard Reitmayr |
Subject: |
[libcvd-members] libcvd/cvd gl_helpers.h |
Date: |
Wed, 16 Dec 2009 14:45:58 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Gerhard Reitmayr <gerhard> 09/12/16 14:45:58
Modified files:
cvd : gl_helpers.h
Log message:
avoiding near and far on Win32 as they are keywords (happy old DOS
times)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/gl_helpers.h?cvsroot=libcvd&r1=1.43&r2=1.44
Patches:
Index: gl_helpers.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/gl_helpers.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- gl_helpers.h 16 Dec 2009 14:36:30 -0000 1.43
+++ gl_helpers.h 16 Dec 2009 14:45:57 -0000 1.44
@@ -375,14 +375,14 @@
/// @param far far clipping plane
/// @ingroup gGL
template <typename P, typename A>
- inline void glFrustum( const TooN::Vector<4,P,A> & params, double
width, double height, double near = 0.1, double far = 100)
+ inline void glFrustum( const TooN::Vector<4,P,A> & params, double
width, double height, double nearPlane = 0.1, double farPlane = 100)
{
GLdouble left, right, bottom, top;
- left = -near * params[2] / params[0];
- top = near * params[3] / params[1];
- right = near * ( width - params[2] ) / params[0];
- bottom = - near * ( height - params[3] ) / params[1];
- ::glFrustum( left, right, bottom, top, near, far );
+ left = -nearPlane * params[2] / params[0];
+ top = nearPlane * params[3] / params[1];
+ right = nearPlane * ( width - params[2] ) / params[0];
+ bottom = - nearPlane * ( height - params[3] ) / params[1];
+ ::glFrustum( left, right, bottom, top, nearPlane, farPlane );
}
/// sets a gl frustum taking the first 4 parameters from the camera
model. see @see glFrustum for
@@ -393,9 +393,9 @@
/// @param near near clipping plane
/// @param far far clipping plane
/// @ingroup gGL
- template <class CAMERA> inline void glFrustum( const CAMERA & camera,
double width, double height, double near = 0.1, double far = 100)
+ template <class CAMERA> inline void glFrustum( const CAMERA & camera,
double width, double height, double nearPlane = 0.1, double farPlane = 100)
{
- glFrustum( camera.get_parameters().template slice<0,4>(),
width, height, near, far);
+ glFrustum( camera.get_parameters().template slice<0,4>(),
width, height, nearPlane, farPlane);
}
/// Sets up an ortho projection from a simple Vector<6>