Support Forum       G3D Web Page     
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
G3D::WrapMode Class Reference


Describes the behavior of G3D::Texture, G3D::Map2D, G3D::Image3, etc. More...

Public Types

enum  Value {
  CLAMP,
  TILE,
  ZERO,
  IGNORE,
  ERROR
}
 Don't use this enum; use WrapMode instances instead. More...
 

Public Member Functions

 WrapMode (const G3D::String &x)
 
 WrapMode (char v)
 
 WrapMode (int v)
 
 WrapMode (const G3D::Any &a)
 
 WrapMode ()
 
 WrapMode (const Value v)
 
void deserialize (G3D::BinaryInput &b)
 
unsigned int hashCode () const
 
 operator int () const
 
bool operator!= (const WrapMode ::Value other) const
 
bool operator!= (const WrapMode other) const
 
WrapMode operator+ (const int x) const
 
WrapModeoperator++ ()
 
WrapModeoperator+= (const int x)
 
WrapMode operator- (const int x) const
 
WrapModeoperator-- ()
 
WrapModeoperator-= (const int x)
 
bool operator< (const WrapMode other) const
 
bool operator< (const Value other) const
 
bool operator<= (const Value other) const
 
bool operator<= (const WrapMode other) const
 
WrapModeoperator= (const G3D::Any &a)
 
bool operator== (const WrapMode ::Value other) const
 
bool operator== (const WrapMode other) const
 
bool operator> (const WrapMode other) const
 
bool operator> (const Value other) const
 
bool operator>= (const WrapMode other) const
 
bool operator>= (const Value other) const
 
void serialize (G3D::BinaryOutput &b) const
 
G3D::Any toAny () const
 
const char * toString () const
 

Static Public Member Functions

static const char * classname ()
 
static int count ()
 
static Value nthValue (int n)
 
static const char * toString (int i, Value &v)
 

Public Attributes

enum G3D::WrapMode::Value value
 

Detailed Description


Describes the behavior of G3D::Texture, G3D::Map2D, G3D::Image3, etc.

when accessing an out-of-bounds pixel. Not all classes support all modes.

Refer to these as scoped enums, e.g., WrapMode m = WrapMode::CLAMP;.

WrapMode::IGNORE silently discards attempts to write to out of bounds locations and returns an undefined value for reading from out of bounds locations.

WrapMode::ERROR generates an error when the pixel indices are out of bounds

WrapMode::CLAMP makes out of bounds pixels equal to the last in-range pixel along that dimension.

WrapMode::TILE computes out of bounds pixels modulo the dimension

WrapMode::ZERO treats out of bounds values as the zero value, which varies in definition according to the class used. For example, with a G3D::Texture, ZERO = Color4(0,0,0,0).

Uses the "Intelligent Enum" design pattern http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4001/

Member Enumeration Documentation

◆ Value

Don't use this enum; use WrapMode instances instead.

Enumerator
CLAMP 
TILE 
ZERO 
IGNORE 
ERROR 

Constructor & Destructor Documentation

◆ WrapMode() [1/6]

G3D::WrapMode::WrapMode ( const G3D::String x)
inlineexplicit

◆ WrapMode() [2/6]

G3D::WrapMode::WrapMode ( const G3D::Any a)
inlineexplicit

◆ WrapMode() [3/6]

G3D::WrapMode::WrapMode ( char  v)
inlineexplicit

◆ WrapMode() [4/6]

G3D::WrapMode::WrapMode ( )
inline

◆ WrapMode() [5/6]

G3D::WrapMode::WrapMode ( const Value  v)
inline

◆ WrapMode() [6/6]

G3D::WrapMode::WrapMode ( int  v)
inlineexplicit

Member Function Documentation

◆ classname()

static const char* G3D::WrapMode::classname ( )
inlinestatic

◆ count()

static int G3D::WrapMode::count ( )
inlinestatic

◆ deserialize()

void G3D::WrapMode::deserialize ( G3D::BinaryInput b)
inline

◆ hashCode()

unsigned int G3D::WrapMode::hashCode ( ) const
inline

◆ nthValue()

static Value G3D::WrapMode::nthValue ( int  n)
inlinestatic

◆ operator int()

G3D::WrapMode::operator int ( ) const
inline

◆ operator!=() [1/2]

bool G3D::WrapMode::operator!= ( const WrapMode  other) const
inline

◆ operator!=() [2/2]

bool G3D::WrapMode::operator!= ( const WrapMode ::Value  other) const
inline

◆ operator+()

WrapMode G3D::WrapMode::operator+ ( const int  x) const
inline

◆ operator++()

WrapMode& G3D::WrapMode::operator++ ( )
inline

◆ operator+=()

WrapMode& G3D::WrapMode::operator+= ( const int  x)
inline

◆ operator-()

WrapMode G3D::WrapMode::operator- ( const int  x) const
inline

◆ operator--()

WrapMode& G3D::WrapMode::operator-- ( )
inline

◆ operator-=()

WrapMode& G3D::WrapMode::operator-= ( const int  x)
inline

◆ operator<() [1/2]

bool G3D::WrapMode::operator< ( const Value  other) const
inline

◆ operator<() [2/2]

bool G3D::WrapMode::operator< ( const WrapMode  other) const
inline

◆ operator<=() [1/2]

bool G3D::WrapMode::operator<= ( const WrapMode  other) const
inline

◆ operator<=() [2/2]

bool G3D::WrapMode::operator<= ( const Value  other) const
inline

◆ operator=()

WrapMode& G3D::WrapMode::operator= ( const G3D::Any a)
inline

◆ operator==() [1/2]

bool G3D::WrapMode::operator== ( const WrapMode ::Value  other) const
inline

◆ operator==() [2/2]

bool G3D::WrapMode::operator== ( const WrapMode  other) const
inline

◆ operator>() [1/2]

bool G3D::WrapMode::operator> ( const WrapMode  other) const
inline

◆ operator>() [2/2]

bool G3D::WrapMode::operator> ( const Value  other) const
inline

◆ operator>=() [1/2]

bool G3D::WrapMode::operator>= ( const WrapMode  other) const
inline

◆ operator>=() [2/2]

bool G3D::WrapMode::operator>= ( const Value  other) const
inline

◆ serialize()

void G3D::WrapMode::serialize ( G3D::BinaryOutput b) const
inline

◆ toAny()

G3D::Any G3D::WrapMode::toAny ( ) const
inline

◆ toString() [1/2]

static const char* G3D::WrapMode::toString ( int  i,
Value v 
)
inlinestatic

◆ toString() [2/2]

const char* G3D::WrapMode::toString ( ) const
inline

Member Data Documentation

◆ value

enum G3D::WrapMode::Value G3D::WrapMode::value

documentation generated on Wed Nov 24 2021 08:02:02 using doxygen 1.8.15