|
Jpp
|
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 |
| 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... | |
| JVector2D & | mul (const JNullType &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 30 of file JVector2D.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Subtract vector.
| vector | vector |
Definition at line 113 of file JVector2D.hh.
|
inline |
Scale vector.
| factor | multiplication factor |
Definition at line 128 of file JVector2D.hh.
|
inline |
Scale vector.
| factor | division factor |
Definition at line 143 of file JVector2D.hh.
|
inline |
Check equality.
| vector | vector |
Definition at line 172 of file JVector2D.hh.
|
inline |
|
inline |
Get length.
Definition at line 195 of file JVector2D.hh.
|
inline |
Get squared of distance to point.
| point | point |
Definition at line 207 of file JVector2D.hh.
|
inline |
Get distance to point.
| point | point |
Definition at line 219 of file JVector2D.hh.
|
inline |
Get dot product.
| point | vector |
Definition at line 231 of file JVector2D.hh.
|
inline |
Get perpendicular dot product.
| point | vector |
Definition at line 245 of file JVector2D.hh.
|
inlineinherited |
Multiply with object.
| object | object |
Definition at line 273 of file JMath.hh.
|
protected |
Definition at line 253 of file JVector2D.hh.
|
protected |
Definition at line 254 of file JVector2D.hh.
1.8.5