1 /* bzflag 2 * Copyright (c) 1993-2021 Tim Riker 3 * 4 * This package is free software; you can redistribute it and/or 5 * modify it under the terms of the license found in the file 6 * named COPYING that should have accompanied this file. 7 * 8 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 10 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11 */ 12 13 // interface headers 14 #include "ViewFrustum.h" 15 16 // common implementation headers 17 #include "bzfgl.h" 18 ViewFrustum()19ViewFrustum::ViewFrustum() 20 { 21 } 22 ~ViewFrustum()23ViewFrustum::~ViewFrustum() 24 { 25 // do nothing 26 } 27 executeProjection() const28void ViewFrustum::executeProjection() const 29 { 30 glMatrixMode(GL_PROJECTION); 31 glLoadMatrixf(projectionMatrix); 32 glMatrixMode(GL_MODELVIEW); 33 } 34 executeDeepProjection() const35void ViewFrustum::executeDeepProjection() const 36 { 37 glMatrixMode(GL_PROJECTION); 38 glLoadMatrixf(deepProjectionMatrix); 39 glMatrixMode(GL_MODELVIEW); 40 } 41 executeView() const42void ViewFrustum::executeView() const 43 { 44 glMultMatrixf(viewMatrix); 45 } 46 executeOrientation() const47void ViewFrustum::executeOrientation() const 48 { 49 glMultMatrixf(viewMatrix); 50 glTranslatef(eye[0], eye[1], eye[2]); 51 } 52 executeBillboard() const53void ViewFrustum::executeBillboard() const 54 { 55 glMultMatrixf(billboardMatrix); 56 } 57 58 // Local Variables: *** 59 // mode: C++ *** 60 // tab-width: 4 *** 61 // c-basic-offset: 4 *** 62 // indent-tabs-mode: nil *** 63 // End: *** 64 // ex: shiftwidth=4 tabstop=4 65