MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::UI::UnifiedVec2 Class Reference

This class represents a point in 2D space using UnifiedDim's. More...

#include <unifieddim.h>

+ Collaboration diagram for Mezzanine::UI::UnifiedVec2:

Public Member Functions

 UnifiedVec2 ()
 Class constructor.
 
 UnifiedVec2 (const UnifiedDim &x, const UnifiedDim &y)
 UnifiedDim constructor. More...
 
 UnifiedVec2 (const Real &Xrel, const Real &Yrel, const Real &Xabs, const Real &Yabs)
 Real constructor. More...
 
 UnifiedVec2 (const UnifiedVec2 &Other)
 Copy constructor. More...
 
 ~UnifiedVec2 ()
 Class destructor.
 
Vector2 CalculateActualDimensions (const Vector2 &Actual) const
 Calculates the actual values when a Vector2 with actual dimensions has this unified vector2 applied to it. More...
 
bool operator!= (const UnifiedVec2 &Other) const
 Inequality comparison operator. More...
 
UnifiedVec2 operator* (const UnifiedVec2 &Other) const
 Multiplication operator. More...
 
UnifiedVec2 operator* (const UnifiedDim &Other) const
 Multiplication with UnifiedDim operator. More...
 
UnifiedVec2 operator* (const Real &Other)
 Multiplication with Real operator. More...
 
UnifiedVec2operator*= (const UnifiedVec2 &Other)
 Multiplication assignment operator. More...
 
UnifiedVec2operator*= (const UnifiedDim &Other)
 Multiplication assignment with UnifiedDim operator. More...
 
UnifiedVec2operator*= (const Real &Other)
 Multiplication assignment with Real operator. More...
 
UnifiedVec2 operator+ (const UnifiedVec2 &Other) const
 Addition operator. More...
 
UnifiedVec2 operator+ (const UnifiedDim &Other) const
 Addition with UnifiedDim operator. More...
 
UnifiedVec2operator+= (const UnifiedVec2 &Other)
 Addition assignment operator. More...
 
UnifiedVec2operator+= (const UnifiedDim &Other)
 Addition assignment with UnifiedDim operator. More...
 
UnifiedVec2 operator- (const UnifiedVec2 &Other) const
 Subtraction operator. More...
 
UnifiedVec2 operator- (const UnifiedDim &Other) const
 Subtraction with UnifiedDim operator. More...
 
UnifiedVec2operator-= (const UnifiedVec2 &Other)
 Subtraction assignment operator. More...
 
UnifiedVec2operator-= (const UnifiedDim &Other)
 Subtraction assignment with UnifiedDim operator. More...
 
UnifiedVec2 operator/ (const UnifiedVec2 &Other) const
 Division operator. More...
 
UnifiedVec2 operator/ (const UnifiedDim &Other) const
 Division with UnifiedDim operator. More...
 
UnifiedVec2 operator/ (const Real &Other)
 Division with Real operator. More...
 
UnifiedVec2operator/= (const UnifiedVec2 &Other)
 Division assignment operator. More...
 
UnifiedVec2operator/= (const UnifiedDim &Other)
 Division assignment with UnifiedDim operator. More...
 
UnifiedVec2operator/= (const Real &Other)
 Division assignment with Real operator. More...
 
UnifiedVec2operator= (const UnifiedVec2 &Other)
 Assignment operator. More...
 
bool operator== (const UnifiedVec2 &Other) const
 Equality comparison operator. More...
 
void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
void SetIdentity ()
 Sets all members of this unified vector to zero.
 
void SetValues (const UnifiedDim &x, const UnifiedDim &y)
 Sets all data members of this unified vector explicitly. More...
 
void SetValues (const Real &Xrel, const Real &Yrel, const Real &Xabs, const Real &Yabs)
 Sets all data members of this unified vector explicitly. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Public Attributes

UnifiedDim X
 The dimension on the X plane.
 
UnifiedDim Y
 The dimension on the Y plane.
 

Detailed Description

This class represents a point in 2D space using UnifiedDim's.

Definition at line 302 of file unifieddim.h.

Constructor & Destructor Documentation

Mezzanine::UI::UnifiedVec2::UnifiedVec2 ( const UnifiedDim x,
const UnifiedDim y 
)
inline

UnifiedDim constructor.

Parameters
xThe dimension on the X plane.
yThe dimension on the Y plane.

Definition at line 325 of file unifieddim.h.

Mezzanine::UI::UnifiedVec2::UnifiedVec2 ( const Real Xrel,
const Real Yrel,
const Real Xabs,
const Real Yabs 
)
inline

Real constructor.

Parameters
XrelThe relative portion of the X dimension.
YrelThe relative portion of the Y dimension.
XabsThe absolute portion of the X dimension.
Yabsthe absolute portion of the Y dimension.

Definition at line 332 of file unifieddim.h.

Mezzanine::UI::UnifiedVec2::UnifiedVec2 ( const UnifiedVec2 Other)
inline

Copy constructor.

Parameters
OtherThe other UnifiedVec2 to copy from.

Definition at line 339 of file unifieddim.h.

Member Function Documentation

Vector2 Mezzanine::UI::UnifiedVec2::CalculateActualDimensions ( const Vector2 Actual) const
inline

Calculates the actual values when a Vector2 with actual dimensions has this unified vector2 applied to it.

Parameters
ActualA Vector2 containing the actual(pixel) dimensions to use as a base for the calculation.
Returns
Returns a Vector2 containing the result dimensions in actual (pixel) units.

Definition at line 375 of file unifieddim.h.

static String Mezzanine::UI::UnifiedVec2::GetSerializableName ( )
inlinestatic

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 640 of file unifieddim.h.

bool Mezzanine::UI::UnifiedVec2::operator!= ( const UnifiedVec2 Other) const
inline

Inequality comparison operator.

Parameters
OtherThe other UnifiedVec2 to compare to.
Returns
Returns true if these UnifiedVec2's are not equal, false otherwise.

Definition at line 571 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator* ( const UnifiedVec2 Other) const
inline

Multiplication operator.

Parameters
OtherThe other UnifiedVec2 to multiply by.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 401 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator* ( const UnifiedDim Other) const
inline

Multiplication with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 471 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator* ( const Real Other)
inline

Multiplication with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 527 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator*= ( const UnifiedVec2 Other)
inline

Multiplication assignment operator.

Parameters
OtherThe other UnifiedVec2 to multiply by.
Returns
Returns a reference to this.

Definition at line 435 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator*= ( const UnifiedDim Other)
inline

Multiplication assignment with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a reference to this.

Definition at line 505 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator*= ( const Real Other)
inline

Multiplication assignment with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a reference to this.

Definition at line 542 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator+ ( const UnifiedVec2 Other) const
inline

Addition operator.

Parameters
OtherThe other UnifiedVec2 to add to this.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 387 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator+ ( const UnifiedDim Other) const
inline

Addition with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 457 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator+= ( const UnifiedVec2 Other)
inline

Addition assignment operator.

Parameters
OtherThe other UnifiedVec2 to add to this.
Returns
Returns a reference to this.

Definition at line 417 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator+= ( const UnifiedDim Other)
inline

Addition assignment with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a reference to this.

Definition at line 487 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator- ( const UnifiedVec2 Other) const
inline

Subtraction operator.

Parameters
OtherThe other UnifiedVec2 to subtract from this.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 394 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator- ( const UnifiedDim Other) const
inline

Subtraction with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 464 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator-= ( const UnifiedVec2 Other)
inline

Subtraction assignment operator.

Parameters
OtherThe other UnifiedVec2 to subtract from this.
Returns
Returns a reference to this.

Definition at line 426 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator-= ( const UnifiedDim Other)
inline

Subtraction assignment with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a reference to this.

Definition at line 496 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator/ ( const UnifiedVec2 Other) const
inline

Division operator.

Parameters
OtherThe other UnifiedVec2 to divide by.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 408 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator/ ( const UnifiedDim Other) const
inline

Division with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 478 of file unifieddim.h.

UnifiedVec2 Mezzanine::UI::UnifiedVec2::operator/ ( const Real Other)
inline

Division with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a new UnifiedVec2 that is the result of this operation.

Definition at line 534 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator/= ( const UnifiedVec2 Other)
inline

Division assignment operator.

Parameters
OtherThe other UnifiedVec2 to divide by.
Returns
Returns a reference to this.

Definition at line 444 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator/= ( const UnifiedDim Other)
inline

Division assignment with UnifiedDim operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a reference to this.

Definition at line 514 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator/= ( const Real Other)
inline

Division assignment with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a reference to this.

Definition at line 551 of file unifieddim.h.

UnifiedVec2& Mezzanine::UI::UnifiedVec2::operator= ( const UnifiedVec2 Other)
inline

Assignment operator.

Parameters
OtherThe other UnifiedVec2 to be assign values from.
Returns
Returns a reference to this.

Definition at line 582 of file unifieddim.h.

bool Mezzanine::UI::UnifiedVec2::operator== ( const UnifiedVec2 Other) const
inline

Equality comparison operator.

Parameters
OtherThe other UnifiedVec2 to compare to.
Returns
Returns true if these UnifiedVec2's are equal, false otherwise.

Definition at line 564 of file unifieddim.h.

void Mezzanine::UI::UnifiedVec2::ProtoDeSerialize ( const XML::Node SelfRoot)
inline

Take the data stored in an XML Node and overwrite this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Definition at line 611 of file unifieddim.h.

void Mezzanine::UI::UnifiedVec2::ProtoSerialize ( XML::Node ParentNode) const
inline

Convert this class to an XML::Node ready for serialization.

Parameters
ParentNodeThe point in the XML hierarchy that all this renderable should be appended to.

Definition at line 594 of file unifieddim.h.

void Mezzanine::UI::UnifiedVec2::SetValues ( const UnifiedDim x,
const UnifiedDim y 
)
inline

Sets all data members of this unified vector explicitly.

Parameters
xThe dimension on the X plane.
yThe dimension on the Y plane.

Definition at line 350 of file unifieddim.h.

void Mezzanine::UI::UnifiedVec2::SetValues ( const Real Xrel,
const Real Yrel,
const Real Xabs,
const Real Yabs 
)
inline

Sets all data members of this unified vector explicitly.

Parameters
XrelThe relative portion of the X dimension.
YrelThe relative portion of the Y dimension.
XabsThe absolute portion of the X dimension.
Yabsthe absolute portion of the Y dimension.

Definition at line 360 of file unifieddim.h.


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