Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/display/clearableRegion.h

Go to the documentation of this file.
00001 // Filename: clearableRegion.h
00002 // Created by:  drose (11Jul02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef CLEARABLEREGION_H
00020 #define CLEARABLEREGION_H
00021 
00022 #include "pandabase.h"
00023 #include "luse.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : ClearableRegion
00027 // Description : This is just an interface definition for a
00028 //               rectangular region of the screen that might or might
00029 //               not need to be cleared every frame before rendering.
00030 //               This includes DisplayRegions and GraphicsWindows.
00031 ////////////////////////////////////////////////////////////////////
00032 class EXPCL_PANDA ClearableRegion {
00033 public:
00034   INLINE ClearableRegion();
00035   INLINE ClearableRegion(const ClearableRegion &copy);
00036   INLINE void operator = (const ClearableRegion &copy);
00037 
00038   INLINE void copy_clear_settings(const ClearableRegion &copy);
00039 
00040 PUBLISHED:
00041   INLINE void set_clear_color_active(bool clear_color_active);
00042   INLINE bool get_clear_color_active() const;
00043 
00044   INLINE void set_clear_depth_active(bool clear_depth_active);
00045   INLINE bool get_clear_depth_active() const;
00046 
00047   INLINE void set_clear_color(const Colorf &color);
00048   INLINE const Colorf &get_clear_color() const;
00049 
00050   INLINE void set_clear_depth(float depth);
00051   INLINE float get_clear_depth() const;
00052 
00053   INLINE bool is_any_clear_active() const;
00054 
00055 private:
00056   // This data needs to be cycled.
00057   enum Flags {
00058     F_clear_color_active = 0x0001,
00059     F_clear_depth_active = 0x0002,
00060   };
00061   int _flags;
00062 
00063   Colorf _clear_color;
00064   float _clear_depth;
00065 };
00066 
00067 #include "clearableRegion.I"
00068 
00069 #endif

Generated on Fri May 2 00:36:20 2003 for Panda by doxygen1.3