Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
om::graphics::base::RenderableFlags Class Reference

A class that encapsulates the different boolean flags that a renderable object can have. More...

#include <omGraphicsRenderableFlags.h>

Public Types

enum  Flag {
  VISIBLE = (1 << 0), SHADOWS = (1 << 1), CULLABLE = (1 << 2), LIGHT = (1 << 3),
  DEFAULT = VISIBLE | SHADOWS | CULLABLE, UNDEFINED = 0
}
 An enum that specifies the different renderable flags. More...
 

Public Member Functions

 RenderableFlags ()
 Create a new renderable flags object with no flags set. More...
 
 RenderableFlags (Flag flag)
 Create a new renderable flags object with the specified flag value initially set. More...
 
 RenderableFlags (UInt32 newFlags)
 Create a new renderable flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this renderable flags object to an integer value. More...
 
Bool isSet (Flag flag) const
 Return whether or not the specified flag value is set for this flags object. More...
 
void set (Flag flag, Bool newIsSet)
 Set whether or not the specified flag value is set for this flags object. More...
 

Static Public Member Functions

static String toString (Flag flag)
 Convert the specified flag to human-readable string representation. More...
 

Detailed Description

A class that encapsulates the different boolean flags that a renderable object can have.

These flags provide boolean information about a certain renderable. Flags are indicated by setting a single bit of a 32-bit unsigned integer to 1.

Enum values for the different flags are defined as members of the class. Typically, the user would bitwise-OR the flag enum values together to produce a final set of set flags.

Member Enumeration Documentation

An enum that specifies the different renderable flags.

Enumerator
VISIBLE 

A flag indicating that a renderable should be drawn.

SHADOWS 

A flag indicating whether or not a renderable can cast shadows or be used in shadow rendering.

CULLABLE 

A flag indicating whether or not a renderable can be culled from view based on its bounding volume.

LIGHT 

A flag indicating whether or not a renderable emits light.

DEFAULT 

The default flags to use for a renderable.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::graphics::base::RenderableFlags::RenderableFlags ( )
inline

Create a new renderable flags object with no flags set.

om::graphics::base::RenderableFlags::RenderableFlags ( Flag  flag)
inline

Create a new renderable flags object with the specified flag value initially set.

om::graphics::base::RenderableFlags::RenderableFlags ( UInt32  newFlags)
inline

Create a new renderable flags object with the specified initial combined flags value.

Member Function Documentation

om::graphics::base::RenderableFlags::operator UInt32 ( ) const
inline

Convert this renderable flags object to an integer value.

This operator is provided so that the RenderableFlags shape can be used as an integer value for bitwise logical operations.

Bool om::graphics::base::RenderableFlags::isSet ( Flag  flag) const
inline

Return whether or not the specified flag value is set for this flags object.

void om::graphics::base::RenderableFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

Set whether or not the specified flag value is set for this flags object.

static String om::graphics::base::RenderableFlags::toString ( Flag  flag)
static

Convert the specified flag to human-readable string representation.


The documentation for this class was generated from the following file: