#include <HxArrowR2.h>
Public Methods | |
| HxArrowR2 () | |
| Constructor. More... | |
| HxArrowR2 (const HxVectorR2 &v) | |
| Construct from vector (origin = (0,0)). More... | |
| HxArrowR2 (const HxPointR2 &p, const HxVectorR2 &v) | |
| Construct from given point and vector. More... | |
| HxArrowR2 (double ox, double oy, double dx, double dy) | |
| Construct from given point and vector. More... | |
| ~HxArrowR2 () | |
| Destructor. More... | |
| HxPointR2 | origin () |
| Get the origin. More... | |
| HxVectorR2 | displace () |
| Get the displacement. More... | |
| STD_OSTREAM & | put (STD_OSTREAM &) const |
| Put the arrow on the given stream. More... | |
An arrow has a position (origin) and a direction (displace). Both have real-value coordinates (R2).
|
|
Constructor.
00060 {
00061 }
|
|
|
Construct from vector (origin = (0,0)).
00064 : _origin(0, 0), _displace(v)
00065 {
00066 }
|
|
||||||||||||
|
Construct from given point and vector.
00069 : _origin(p),
00070 _displace(v)
00071 {
00072 }
|
|
||||||||||||||||||||
|
Construct from given point and vector.
00075 :
00076 _origin(ox, oy), _displace(dx, dy)
00077 {
00078 }
|
|
|
Destructor.
00082 {
00083 }
|
|
|
Get the origin.
00087 {
00088 return _origin;
00089 }
|
|
|
Get the displacement.
00093 {
00094 return _displace;
00095 }
|
|
|
Put the arrow on the given stream.
00099 {
00100 return os << _origin << " " << _displace;
00101 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001