|
Jpp - the software that should make you happy
|
Data structure for vector in two dimensions. More...
#include <JVector2D.hh>
Public Member Functions | |
| JVector2D () | |
| Default constructor. More... | |
| JVector2D (const double x, const double y) | |
| Constructor. More... | |
| double | getX () const |
| Get x position. More... | |
| double | getY () const |
| Get y position. More... | |
| JVector2D & | negate () |
| Negate vector. More... | |
| JVector2D & | add (const JVector2D &vector) |
| Add vector. More... | |
| JVector2D & | sub (const JVector2D &vector) |
| Subtract vector. More... | |
| JVector2D & | mul (const double factor) |
| Scale vector. More... | |
| JVector2D & | div (const double factor) |
| Scale vector. More... | |
| JVector2D & | transform (const JMatrix2D &T) |
| Transform. More... | |
| bool | equals (const JVector2D &vector, const double precision=std::numeric_limits< double >::min()) const |
| Check equality. More... | |
| double | getLengthSquared () const |
| Get length squared. More... | |
| double | getLength () const |
| Get length. More... | |
| double | getDistanceSquared (const JVector2D &point) const |
| Get squared of distance to point. More... | |
| double | getDistance (const JVector2D &point) const |
| Get distance to point. More... | |
| double | getDot (const JVector2D &point) const |
| Get dot product. More... | |
| double | getPerpDot (const JVector2D &point) const |
| Get perpendicular dot product. More... | |
| JFirst_t & | mul (const JSecond_t &object) |
| Multiply with object. More... | |
Protected Attributes | |
| double | __x |
| double | __y |
Data structure for vector in two dimensions.
This class implements the JMATH::JMath interface.
Definition at line 32 of file JVector2D.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Subtract vector.
| vector | vector |
Definition at line 115 of file JVector2D.hh.
|
inline |
Scale vector.
| factor | multiplication factor |
Definition at line 130 of file JVector2D.hh.
|
inline |
Scale vector.
| factor | division factor |
Definition at line 145 of file JVector2D.hh.
|
inline |
Check equality.
| vector | vector |
| precision | precision |
Definition at line 175 of file JVector2D.hh.
|
inline |
|
inline |
Get length.
Definition at line 199 of file JVector2D.hh.
|
inline |
Get squared of distance to point.
| point | point |
Definition at line 211 of file JVector2D.hh.
|
inline |
Get distance to point.
| point | point |
Definition at line 223 of file JVector2D.hh.
|
inline |
Get dot product.
| point | vector |
Definition at line 235 of file JVector2D.hh.
|
inline |
Get perpendicular dot product.
| point | vector |
Definition at line 249 of file JVector2D.hh.
|
inlineinherited |
Multiply with object.
| object | object |
Definition at line 357 of file JMath.hh.
|
protected |
Definition at line 257 of file JVector2D.hh.
|
protected |
Definition at line 258 of file JVector2D.hh.
1.8.5