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::textures::TextureFlags Class Reference

A class that encapsulates the different flags that a texture can have. More...

#include <omGraphicsTextureFlags.h>

Public Types

enum  Flag { ENABLED = (1 << 0), MIPMAP_GENERATION = (1 << 1), DEFAULT = ENABLED | MIPMAP_GENERATION, UNDEFINED = 0 }
 An enum that specifies the different texture flags. More...
 

Public Member Functions

 TextureFlags ()
 Create a new texture flags object with no flags set. More...
 
 TextureFlags (Flag flag)
 Create a new texture flags object with the specified flag value initially set. More...
 
 TextureFlags (UInt32 newFlags)
 Create a new texture flags object with the specified initial combined flags value. More...
 
 operator UInt32 () const
 Convert this texture 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 flags that a texture can have.

These flags provide boolean information about a texture. 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 texture flags.

Enumerator
ENABLED 

A flag indicating whether or not the texture is enabled.

MIPMAP_GENERATION 

A flag indicating that the texture should automatically generate its own mipmaps from the base map.

DEFAULT 

The default flags to use for a texture.

UNDEFINED 

The flag value when all flags are not set.

Constructor & Destructor Documentation

om::graphics::textures::TextureFlags::TextureFlags ( )
inline

Create a new texture flags object with no flags set.

om::graphics::textures::TextureFlags::TextureFlags ( Flag  flag)
inline

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

om::graphics::textures::TextureFlags::TextureFlags ( UInt32  newFlags)
inline

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

Member Function Documentation

om::graphics::textures::TextureFlags::operator UInt32 ( ) const
inline

Convert this texture flags object to an integer value.

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

Bool om::graphics::textures::TextureFlags::isSet ( Flag  flag) const
inline

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

void om::graphics::textures::TextureFlags::set ( Flag  flag,
Bool  newIsSet 
)
inline

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

static String om::graphics::textures::TextureFlags::toString ( Flag  flag)
static

Convert the specified flag to human-readable string representation.


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