5#ifndef __IRR_DIMENSION2D_H_INCLUDED__
6#define __IRR_DIMENSION2D_H_INCLUDED__
55 return ! (*
this ==
other);
62 return !(*
this ==
other);
Axis aligned bounding box in 3d dimensional space.
Specifies a 2 dimensional size.
dimension2d< T > getOptimalSize(bool requirePowerOfTwo=true, bool requireSquare=false, bool larger=true, u32 maxValue=0) const
Get the optimal size according to some properties.
T Width
Width of the dimension.
dimension2d< T > operator/(const T &scale) const
Divide width and height by scalar.
bool operator!=(const vector2d< T > &other) const
dimension2d< T > & operator/=(const T &scale)
Divide width and height by scalar.
T getArea() const
Get area.
dimension2d(const dimension2d< U > &other)
Use this constructor only where you are sure that the conversion is valid.
dimension2d< T > operator+(const dimension2d< T > &other) const
Add two dimensions.
dimension2d< T > & set(const T &width, const T &height)
Set to new values.
bool operator!=(const dimension2d< T > &other) const
Inequality operator.
T Height
Height of the dimension.
dimension2d(const T &width, const T &height)
Constructor with width and height.
dimension2d< T > getInterpolated(const dimension2d< T > &other, f32 d) const
Get the interpolated dimension.
dimension2d< T > & operator-=(const dimension2d< T > &other)
Subtract a dimension from this one.
dimension2d< T > & operator=(const dimension2d< U > &other)
dimension2d< T > & operator+=(const dimension2d< T > &other)
Add another dimension to this one.
bool operator==(const dimension2d< T > &other) const
Equality operator.
dimension2d< T > operator-(const dimension2d< T > &other) const
Subtract one dimension from another.
dimension2d< T > operator*(const T &scale) const
Multiply width and height by scalar.
dimension2d()
Default constructor for empty dimension.
dimension2d< T > & operator*=(const T &scale)
Multiply width and height by scalar.
bool equals(const f64 a, const f64 b, const f64 tolerance=ROUNDING_ERROR_f64)
returns if a equals b, taking possible rounding errors into account
dimension2d< s32 > dimension2di
Typedef for an integer dimension.
dimension2d< u32 > dimension2du
Typedef for an unsigned integer dimension.
dimension2d< f32 > dimension2df
Typedef for an f32 dimension.
Everything in the Irrlicht Engine can be found in this namespace.
float f32
32 bit floating point variable.
unsigned int u32
32 bit unsigned variable.