R2Rect

An R2Rect represents a closed axis-aligned rectangle in the (x,y) plane.

This class is intended to be copied by value as desired. It uses the default copy constructor and assignment operator, however it is not a "plain old datatype" (POD) because it has virtual functions.

Constructors

this
this(R2Point lo, R2Point hi)
Undocumented in source.
this
this(R1Interval x, R1Interval y)
Undocumented in source.

Members

Functions

InteriorIntersects
bool InteriorIntersects(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
Project
R2Point Project(R2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
addPoint
void addPoint(R2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
addRect
void addRect(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
approxEquals
bool approxEquals(R2Rect other, double max_error)
Undocumented in source. Be warned that the author may not have intended to support it.
contains
bool contains(R2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
contains
bool contains(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
expanded
R2Rect expanded(R2Point margin)
Undocumented in source. Be warned that the author may not have intended to support it.
expanded
R2Rect expanded(double margin)
Undocumented in source. Be warned that the author may not have intended to support it.
getCenter
R2Point getCenter()
Undocumented in source. Be warned that the author may not have intended to support it.
getSize
R2Point getSize()
Undocumented in source. Be warned that the author may not have intended to support it.
getVertex
R2Point getVertex(int k)
Undocumented in source. Be warned that the author may not have intended to support it.
getVertex
R2Point getVertex(int i, int j)
Undocumented in source. Be warned that the author may not have intended to support it.
interiorContains
bool interiorContains(R2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
interiorContains
bool interiorContains(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
intersection
R2Rect intersection(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
intersects
bool intersects(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
inout(R1Interval) opIndex(size_t i)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(R1Interval value, size_t i)
Undocumented in source.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
unite
R2Rect unite(R2Rect other)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

hi
R2Point hi [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
lo
R2Point lo [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
x
R1Interval x [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
y
R1Interval y [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

empty
R2Rect empty()
Undocumented in source. Be warned that the author may not have intended to support it.
fromCenterSize
R2Rect fromCenterSize(R2Point center, R2Point size)
Undocumented in source. Be warned that the author may not have intended to support it.
fromPoint
R2Rect fromPoint(R2Point p)
Undocumented in source. Be warned that the author may not have intended to support it.
fromPointPair
R2Rect fromPointPair(R2Point p1, R2Point p2)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta