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

ClearableRegion Class Reference

This is just an interface definition for a rectangular region of the screen that might or might not need to be cleared every frame before rendering. More...

#include <clearableRegion.h>

Inheritance diagram for ClearableRegion:

DisplayRegion GraphicsWindow glxGraphicsWindow RIBGraphicsWindow wcrGraphicsWindow WinGraphicsWindow wdxGraphicsWindow7 wdxGraphicsWindow8 wglGraphicsWindow List of all members.

Public Member Functions

 ClearableRegion ()
 ClearableRegion (const ClearableRegion &copy)
void operator= (const ClearableRegion &copy)
void copy_clear_settings (const ClearableRegion &copy)
 A convenience function that does the same thing as the assignment operator; this is just syntactically a little nicer (and a little clearer) to call from a derived class.

void set_clear_color_active (bool clear_color_active)
 Toggles the flag that indicates whether the color buffer should be cleared every frame.

bool get_clear_color_active () const
 Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

void set_clear_depth_active (bool clear_depth_active)
 Toggles the flag that indicates whether the depth buffer should be cleared every frame.

bool get_clear_depth_active () const
 Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.

void set_clear_color (const Colorf &color)
 Sets the clear color to the indicated value.

const Colorfget_clear_color () const
 Returns the current clear color value.

void set_clear_depth (float depth)
 Sets the clear depth to the indicated value.

float get_clear_depth () const
 Returns the current clear depth value.

bool is_any_clear_active () const
 Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.


Private Types

enum  Flags { F_clear_color_active = 0x0001, F_clear_depth_active = 0x0002 }

Private Attributes

int _flags
Colorf _clear_color
float _clear_depth

Detailed Description

This is just an interface definition for a rectangular region of the screen that might or might not need to be cleared every frame before rendering.

This includes DisplayRegions and GraphicsWindows.

Definition at line 41 of file clearableRegion.h.


Member Enumeration Documentation

enum ClearableRegion::Flags [private]
 

Enumeration values:
F_clear_color_active 
F_clear_depth_active 

Definition at line 66 of file clearableRegion.h.


Constructor & Destructor Documentation

ClearableRegion::ClearableRegion  )  [inline]
 

Definition at line 32 of file clearableRegion.I.

References INLINE.

ClearableRegion::ClearableRegion const ClearableRegion &  copy  )  [inline]
 

Definition at line 48 of file clearableRegion.I.

References _clear_color, _clear_depth, _flags, and INLINE.


Member Function Documentation

void ClearableRegion::copy_clear_settings const ClearableRegion &  copy  )  [inline]
 

A convenience function that does the same thing as the assignment operator; this is just syntactically a little nicer (and a little clearer) to call from a derived class.

Definition at line 85 of file clearableRegion.I.

References _flags, and F_clear_color_active.

const Colorf & ClearableRegion::get_clear_color  )  const [inline]
 

Returns the current clear color value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

Definition at line 211 of file clearableRegion.I.

bool ClearableRegion::get_clear_color_active  )  const [inline]
 

Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

See set_clear_color_active().

Definition at line 127 of file clearableRegion.I.

References _flags, and F_clear_depth_active.

float ClearableRegion::get_clear_depth  )  const [inline]
 

Returns the current clear depth value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

Definition at line 253 of file clearableRegion.I.

bool ClearableRegion::get_clear_depth_active  )  const [inline]
 

Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.

See set_clear_depth_active().

Definition at line 169 of file clearableRegion.I.

References _clear_depth.

bool ClearableRegion::is_any_clear_active  )  const [inline]
 

Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.

Definition at line 272 of file clearableRegion.I.

Referenced by GraphicsWindow::get_mouse_data().

void ClearableRegion::operator= const ClearableRegion &  copy  )  [inline]
 

Definition at line 64 of file clearableRegion.I.

References INLINE.

void ClearableRegion::set_clear_color const Colorf color  )  [inline]
 

Sets the clear color to the indicated value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

Definition at line 190 of file clearableRegion.I.

References _flags, and INLINE.

void ClearableRegion::set_clear_color_active bool  clear_color_active  )  [inline]
 

Toggles the flag that indicates whether the color buffer should be cleared every frame.

If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone.

Definition at line 106 of file clearableRegion.I.

References _flags, F_clear_depth_active, and INLINE.

void ClearableRegion::set_clear_depth float  depth  )  [inline]
 

Sets the clear depth to the indicated value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

Definition at line 232 of file clearableRegion.I.

void ClearableRegion::set_clear_depth_active bool  clear_depth_active  )  [inline]
 

Toggles the flag that indicates whether the depth buffer should be cleared every frame.

If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone.

Definition at line 148 of file clearableRegion.I.

References _clear_color, Colorf, and INLINE.


Member Data Documentation

Colorf ClearableRegion::_clear_color [private]
 

Definition at line 72 of file clearableRegion.h.

Referenced by ClearableRegion(), and set_clear_depth_active().

float ClearableRegion::_clear_depth [private]
 

Definition at line 73 of file clearableRegion.h.

Referenced by ClearableRegion(), and get_clear_depth_active().

int ClearableRegion::_flags [private]
 

Definition at line 70 of file clearableRegion.h.

Referenced by ClearableRegion(), copy_clear_settings(), get_clear_color_active(), set_clear_color(), and set_clear_color_active().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:48:21 2003 for Panda by doxygen1.3