// Copyright (c) 2000, 2001, 2002, 2003 by David Scherer and others. // Copyright (c) 2003, 2004 by Jonathan Brandmeyer and others. // See the file license.txt for complete license terms. // See the file authors.txt for a complete list of contributors. #include "renderable.hpp" #include "material.hpp" namespace cvisual { // TODO: tan_hfov_x and tan_hfov_y must be revisited in the face of // nonuniform scaling. It may be more appropriate to describe the viewing // frustum in a different way entirely. view::view( const vector n_forward, vector n_center, int n_width, int n_height, bool n_forward_changed, double n_gcf, vector n_gcfvec, bool n_gcf_changed, gl_extensions& glext) : forward( n_forward), center(n_center), view_width( n_width), view_height( n_height), forward_changed( n_forward_changed), gcf( n_gcf), gcfvec( n_gcfvec), gcf_changed( n_gcf_changed), lod_adjust(0), anaglyph(false), coloranaglyph(false), tan_hfov_x(0), tan_hfov_y(0), screen_objects( z_comparator( forward)), glext(glext), enable_shaders(true) { for(int i=0; i m ) { mat = m; } shared_ptr renderable::get_material() { return mat; } bool renderable::translucent() { return opacity != 1.0 || (mat && mat->get_translucent()); } } // !namespace cvisual