Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents the location of the origin of a GUI rectangle coordinate system. More...
#include <omGraphicsGUIOrigin.h>
Public Types | |
enum | XOrigin { X_MIN = 1, X_CENTER = 2, X_MAX = 4, LEFT = X_MIN, HORIZONTAL_CENTER = X_CENTER, RIGHT = X_MAX } |
An enum that specifies the different types of horizontal coordinate origins. More... | |
enum | YOrigin { Y_MIN = 1, Y_CENTER = 2, Y_MAX = 4, BOTTOM = Y_MIN, VERTICAL_CENTER = Y_CENTER, TOP = Y_MAX } |
An enum that specifies the different types of vertical coordinate origins. More... | |
enum | ZOrigin { Z_MIN = 1, Z_CENTER = 2, Z_MAX = 4, BACK = Z_MIN, DEPTH_CENTER = Z_CENTER, FRONT = Z_MAX } |
An enum that specifies the different types of depth coordinate origins. More... | |
Public Member Functions | |
Origin () | |
Create a new default coordinate origin, the bottom-left corner. More... | |
Origin (XOrigin newXOrigin, YOrigin newYOrigin) | |
Create a new coordinate origin using the specified horizontal and vertical origin alignments. More... | |
Origin (XOrigin newXOrigin, YOrigin newYOrigin, ZOrigin newZOrigin) | |
Create a new coordinate origin using the specified horizontal and vertical origin alignments. More... | |
XOrigin | getX () const |
Return an enum value indicating the alignment of the horizontal axis of the coordinate system. More... | |
void | setX (XOrigin newXOrigin) |
Set an enum value indicating the alignment of the horizontal axis of the coordinate system. More... | |
YOrigin | getY () const |
Return an enum value indicating the alignment of the vertical axis of the coordinate system. More... | |
void | setY (YOrigin newYOrigin) |
Set an enum value indicating the alignment of the vertical axis of the coordinate system. More... | |
ZOrigin | getZ () const |
Return an enum value indicating the alignment of the depth axis of the coordinate system. More... | |
void | setZ (ZOrigin newZOrigin) |
Set an enum value indicating the alignment of the depth axis of the coordinate system. More... | |
Bool | operator== (const Origin &other) const |
Return whether or not this coordinate origin object is the same as another. More... | |
Bool | operator!= (const Origin &other) const |
Return whether or not this coordinate origin object is different than another. More... | |
Float | getOffsetX (Float parentSize, Float childSize) const |
Return a scalar indicating the X-origin offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
Float | getOffsetY (Float parentSize, Float childSize) const |
Return a scalar indicating the Y-origin offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
Float | getOffsetZ (Float parentSize, Float childSize) const |
Return a scalar indicating the Z-origin offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
Float | getOffset (Float parentSize, Float childSize, Index axis) const |
Return a scalar indicating the offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
Vector2f | getOffset (const Vector2f &parentSize, const Vector2f &childSize) const |
Return a vector indicating the origin offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
Vector3f | getOffset (const Vector3f &parentSize, const Vector3f &childSize) const |
Return a vector indicating the origin offset from the bottom left (minimum) coordinate of a parent bounding box. More... | |
String | toString () const |
Return a string representation of the origin type. More... | |
operator String () const | |
Convert this origin type into a string representation. More... | |
A class that represents the location of the origin of a GUI rectangle coordinate system.
An enum that specifies the different types of horizontal coordinate origins.
An enum that specifies the different types of vertical coordinate origins.
An enum that specifies the different types of depth coordinate origins.
|
inline |
Create a new default coordinate origin, the bottom-left corner.
Create a new coordinate origin using the specified horizontal and vertical origin alignments.
|
inline |
Create a new coordinate origin using the specified horizontal and vertical origin alignments.
|
inline |
Return an enum value indicating the alignment of the horizontal axis of the coordinate system.
|
inline |
Set an enum value indicating the alignment of the horizontal axis of the coordinate system.
|
inline |
Return an enum value indicating the alignment of the vertical axis of the coordinate system.
|
inline |
Set an enum value indicating the alignment of the vertical axis of the coordinate system.
|
inline |
Return an enum value indicating the alignment of the depth axis of the coordinate system.
|
inline |
Set an enum value indicating the alignment of the depth axis of the coordinate system.
Return whether or not this coordinate origin object is the same as another.
Return whether or not this coordinate origin object is different than another.
Return a scalar indicating the X-origin offset from the bottom left (minimum) coordinate of a parent bounding box.
The scalar indicates, relative to the minimum X-corner of the parent bounding box with the specified X-size, the direction and distance to this origin's position.
Return a scalar indicating the Y-origin offset from the bottom left (minimum) coordinate of a parent bounding box.
The scalar indicates, relative to the minimum Y-corner of the parent bounding box with the specified Y-size, the direction and distance to this origin's position.
Return a scalar indicating the Z-origin offset from the bottom left (minimum) coordinate of a parent bounding box.
The scalar indicates, relative to the minimum Z-corner of the parent bounding box with the specified Z-size, the direction and distance to this origin's position.
Float om::graphics::gui::base::Origin::getOffset | ( | Float | parentSize, |
Float | childSize, | ||
Index | axis | ||
) | const |
Return a scalar indicating the offset from the bottom left (minimum) coordinate of a parent bounding box.
The scalar indicates, relative to the minimum of the parent bounding box along the specified axis index in [0,2], the direction and distance to this origin's position.
Vector2f om::graphics::gui::base::Origin::getOffset | ( | const Vector2f & | parentSize, |
const Vector2f & | childSize | ||
) | const |
Return a vector indicating the origin offset from the bottom left (minimum) coordinate of a parent bounding box.
The 2D vector indicates, relative to the minimum corner of the parent bounding box with the specified 2D size, the direction and distance to this origin's position.
Vector3f om::graphics::gui::base::Origin::getOffset | ( | const Vector3f & | parentSize, |
const Vector3f & | childSize | ||
) | const |
Return a vector indicating the origin offset from the bottom left (minimum) coordinate of a parent bounding box.
The 3D vector indicates, relative to the minimum corner of the parent bounding box with the specified 3D size, the direction and distance to this origin's position.
String om::graphics::gui::base::Origin::toString | ( | ) | const |
Return a string representation of the origin type.
|
inline |
Convert this origin type into a string representation.