5 #ifndef __IRR_DIMENSION2D_H_INCLUDED__ 6 #define __IRR_DIMENSION2D_H_INCLUDED__ 55 return ! (*
this == other);
62 return !(*
this == other);
151 bool requirePowerOfTwo=
true,
152 bool requireSquare=
false,
154 u32 maxValue = 0)
const 158 if (requirePowerOfTwo)
162 if (!larger && i!=1 && i!=(
u32)
Width)
177 if ((larger && (i>j)) || (!larger && (i<j)))
183 if ( maxValue > 0 && i > maxValue)
186 if ( maxValue > 0 && j > maxValue)
198 f32 inv = (1.0f - d);
GLenum GLenum GLenum GLenum GLenum scale
dimension2d< u32 > dimension2du
Typedef for an unsigned integer dimension.
bool operator!=(const vector2d< T > &other) const
dimension2d()
Default constructor for empty dimension.
dimension2d< s32 > dimension2di
Typedef for an integer dimension.
float f32
32 bit floating point variable.
GLint GLint GLsizei width
T getArea() const
Get area.
dimension2d< T > getInterpolated(const dimension2d< T > &other, f32 d) const
Get the interpolated dimension.
dimension2d< T > operator-(const dimension2d< T > &other) const
Subtract one dimension from another.
dimension2d< T > & operator+=(const dimension2d< T > &other)
Add another dimension to this one.
dimension2d< T > & operator/=(const T &scale)
Divide width and height by scalar.
dimension2d< T > operator *(const T &scale) const
Multiply width and height by scalar.
Everything in the Irrlicht Engine can be found in this namespace.
Specifies a 2 dimensional size.
dimension2d< T > operator/(const T &scale) const
Divide width and height by scalar.
bool equals(const T a, const T b, const T tolerance=roundingError< T >())
returns if a equals b, taking possible rounding errors into account
unsigned int u32
32 bit unsigned variable.
dimension2d< T > getOptimalSize(bool requirePowerOfTwo=true, bool requireSquare=false, bool larger=true, u32 maxValue=0) const
Get the optimal size according to some properties.
dimension2d< f32 > dimension2df
Typedef for an f32 dimension.
bool operator==(const dimension2d< T > &other) const
Equality operator.
dimension2d< T > & operator-=(const dimension2d< T > &other)
Subtract a dimension from this one.
T Width
Width of the dimension.
dimension2d< T > & operator *=(const T &scale)
Multiply width and height by scalar.
dimension2d< T > operator+(const dimension2d< T > &other) const
Add two dimensions.
2d vector template class with lots of operators and methods.
dimension2d< T > & operator=(const dimension2d< U > &other)
bool operator!=(const dimension2d< T > &other) const
Inequality operator.
T Height
Height of the dimension.
dimension2d< T > & set(const T &width, const T &height)
Set to new values.
dimension2d(const dimension2d< U > &other)
Use this constructor only where you are sure that the conversion is valid.
GLint GLint GLsizei GLsizei height
dimension2d(const T &width, const T &height)
Constructor with width and height.