/** * @file llcamera.h * @brief Header file for the LLCamera class. * * Copyright (c) 2000-$CurrentYear$, Linden Research, Inc. * $License$ */ #ifndef LL_CAMERA_H #define LL_CAMERA_H #include "llmath.h" #include "llcoordframe.h" #include "llplane.h" const F32 DEFAULT_FIELD_OF_VIEW = 60.f * DEG_TO_RAD; const F32 DEFAULT_ASPECT_RATIO = 640.f / 480.f; const F32 DEFAULT_NEAR_PLANE = 0.25f; const F32 DEFAULT_FAR_PLANE = 64.f; // far reaches across two horizontal, not diagonal, regions const F32 MAX_FIELD_OF_VIEW = F_PI; const F32 MAX_ASPECT_RATIO = 50.0f; const F32 MAX_NEAR_PLANE = 10.f; const F32 MAX_FAR_PLANE = 100000.0f; //1000000.0f; // Max allowed. Not good Z precision though. const F32 MAX_FAR_CLIP = 1024.0f; const F32 MIN_FIELD_OF_VIEW = 0.1f; const F32 MIN_ASPECT_RATIO = 0.02f; const F32 MIN_NEAR_PLANE = 0.1f; const F32 MIN_FAR_PLANE = 0.2f; static const LLVector3 X_AXIS(1.f,0.f,0.f); static const LLVector3 Y_AXIS(0.f,1.f,0.f); static const LLVector3 Z_AXIS(0.f,0.f,1.f); static const LLVector3 NEG_X_AXIS(-1.f,0.f,0.f); static const LLVector3 NEG_Y_AXIS(0.f,-1.f,0.f); static const LLVector3 NEG_Z_AXIS(0.f,0.f,-1.f); // An LLCamera is an LLCoorFrame with a view frustum. // This means that it has several methods for moving it around // that are inherited from the LLCoordFrame() class : // // setOrigin(), setAxes() // translate(), rotate() // roll(), pitch(), yaw() // etc... class LLCamera : public LLCoordFrame { public: enum { PLANE_LEFT = 0, PLANE_RIGHT = 1, PLANE_BOTTOM = 2, PLANE_TOP = 3, PLANE_NUM = 4 }; enum { PLANE_LEFT_MASK = (1<