Spinning Topp Logo BlackTopp Studios
inc
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 Real &x, const Real &y)
 Real constructor. More...
 
 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...
 
Boole 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...
 
Boole 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 306 of file unifieddim.h.

Constructor & Destructor Documentation

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

Real constructor.

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

Definition at line 329 of file unifieddim.h.

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 334 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 341 of file unifieddim.h.

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

Copy constructor.

Parameters
OtherThe other UnifiedVec2 to copy from.

Definition at line 348 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 384 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 649 of file unifieddim.h.

Boole 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 580 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 410 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 480 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 536 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 444 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 514 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 551 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 396 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 466 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 426 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 496 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 403 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 473 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 435 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 505 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 417 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 487 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 543 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 453 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 523 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 560 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 591 of file unifieddim.h.

Boole 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 573 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 620 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 603 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 359 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 369 of file unifieddim.h.


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