ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Math::Rect2d Class Reference

#include <rect2d.h>

Collaboration diagram for Math::Rect2d:

List of all members.

Public Member Functions

 Rect2d ()
 Rect2d (const Vector2d &topLeft, const Vector2d &bottomRight)
 Rect2d (const Vector2d &topLeft, const Vector2d &topRight, const Vector2d &bottomLeft, const Vector2d &bottomRight)
void rotateAround (const Vector2d &point, const Angle &angle)
void rotateAroundCenter (const Angle &angle)
void moveCenterTo (const Vector2d &pos)
void scale (float amount)
void translate (const Vector2d &vec)
bool intersectsRect (const Rect2d &rect) const
bool intersectsCircle (const Vector2d &center, float radius) const
bool containsPoint (const Vector2d &point) const
Vector2d getCenter () const
Vector2d getTopLeft () const
Vector2d getTopRight () const
Vector2d getBottomLeft () const
Vector2d getBottomRight () const
float getWidth () const
float getHeight () const
Vector2d getIntersection (const Vector2d &start, const Vector2d &direction, Segment2d *edge) const

Public Attributes

Vector2d _topLeft
Vector2d _topRight
Vector2d _bottomLeft
Vector2d _bottomRight

Detailed Description

Definition at line 33 of file rect2d.h.


Constructor & Destructor Documentation

Math::Rect2d::Rect2d (  ) 

Definition at line 30 of file rect2d.cpp.

Math::Rect2d::Rect2d ( const Vector2d topLeft,
const Vector2d bottomRight 
)

Definition at line 34 of file rect2d.cpp.

Math::Rect2d::Rect2d ( const Vector2d topLeft,
const Vector2d topRight,
const Vector2d bottomLeft,
const Vector2d bottomRight 
)

Definition at line 46 of file rect2d.cpp.


Member Function Documentation

bool Math::Rect2d::containsPoint ( const Vector2d point  )  const

Definition at line 140 of file rect2d.cpp.

Vector2d Math::Rect2d::getBottomLeft (  )  const

Definition at line 160 of file rect2d.cpp.

Vector2d Math::Rect2d::getBottomRight (  )  const

Definition at line 164 of file rect2d.cpp.

Vector2d Math::Rect2d::getCenter (  )  const

Definition at line 145 of file rect2d.cpp.

float Math::Rect2d::getHeight (  )  const

Definition at line 175 of file rect2d.cpp.

Vector2d Math::Rect2d::getIntersection ( const Vector2d start,
const Vector2d direction,
Segment2d edge 
) const

Definition at line 182 of file rect2d.cpp.

Vector2d Math::Rect2d::getTopLeft (  )  const

Definition at line 152 of file rect2d.cpp.

Vector2d Math::Rect2d::getTopRight (  )  const

Definition at line 156 of file rect2d.cpp.

float Math::Rect2d::getWidth (  )  const

Definition at line 168 of file rect2d.cpp.

bool Math::Rect2d::intersectsCircle ( const Vector2d center,
float  radius 
) const

Definition at line 95 of file rect2d.cpp.

bool Math::Rect2d::intersectsRect ( const Rect2d rect  )  const

Definition at line 89 of file rect2d.cpp.

void Math::Rect2d::moveCenterTo ( const Vector2d pos  ) 

Definition at line 65 of file rect2d.cpp.

void Math::Rect2d::rotateAround ( const Vector2d point,
const Angle angle 
)

Definition at line 53 of file rect2d.cpp.

void Math::Rect2d::rotateAroundCenter ( const Angle angle  ) 

Definition at line 60 of file rect2d.cpp.

void Math::Rect2d::scale ( float  amount  ) 

Definition at line 70 of file rect2d.cpp.

void Math::Rect2d::translate ( const Vector2d vec  ) 

Definition at line 82 of file rect2d.cpp.


Member Data Documentation

Definition at line 61 of file rect2d.h.

Definition at line 62 of file rect2d.h.

Definition at line 59 of file rect2d.h.

Definition at line 60 of file rect2d.h.


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


Generated on Sat Jan 19 2019 05:07:11 for ResidualVM by doxygen 1.7.1
curved edge   curved edge