|
Jpp
|
Data structure for vector in three dimensions. More...
#include <JVector3D.hh>
Public Member Functions | |
| JVector3D () | |
| Default constructor. More... | |
| JVector3D (const double x, const double y, const double z) | |
| Constructor. More... | |
| JVector3D (const JVector2D &vector, const double z) | |
| Constructor. More... | |
| operator JVector2D () const | |
| Type conversion operator. More... | |
| double | getX () const |
| Get x position. More... | |
| double | getY () const |
| Get y position. More... | |
| double | getZ () const |
| Get z position. More... | |
| JVector3D & | negate () |
| Negate vector. More... | |
| JVector3D & | add (const JVector3D &vector) |
| Add vector. More... | |
| JVector3D & | sub (const JVector3D &vector) |
| Subtract vector. More... | |
| JVector3D & | mul (const double factor) |
| Scale vector. More... | |
| JVector3D & | div (const double factor) |
| Scale vector. More... | |
| JVector3D & | transform (const JMatrix3D &T) |
| Transform. More... | |
| bool | equals (const JVector3D &vector) const |
| Check equality. More... | |
| double | getLengthSquared () const |
| Get length squared. More... | |
| double | getLength () const |
| Get length. More... | |
| double | getDistanceSquared (const JVector3D &pos) const |
| Get squared of distance to point. More... | |
| double | getDistance (const JVector3D &pos) const |
| Get distance to point. More... | |
| double | getDot (const JVector3D &vector) const |
| Get dot product. More... | |
| JVector3D & | cross (const JVector3D &first, const JVector3D &second) |
| Get cross product. More... | |
| JVector3D & | mul (const JNullType &object) |
| Multiply with object. More... | |
Protected Attributes | |
| double | __x |
| double | __y |
| double | __z |
Data structure for vector in three dimensions.
This class implements the JMATH::JMath interface.
Definition at line 32 of file JVector3D.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Subtract vector.
| vector | vector |
Definition at line 156 of file JVector3D.hh.
|
inline |
Scale vector.
| factor | multiplication factor |
Definition at line 172 of file JVector3D.hh.
|
inline |
Scale vector.
| factor | division factor |
Definition at line 188 of file JVector3D.hh.
|
inline |
Check equality.
| vector | vector |
Definition at line 218 of file JVector3D.hh.
|
inline |
|
inline |
Get length.
Definition at line 242 of file JVector3D.hh.
|
inline |
Get squared of distance to point.
| pos | position |
Definition at line 254 of file JVector3D.hh.
|
inline |
Get distance to point.
| pos | position |
Definition at line 266 of file JVector3D.hh.
|
inline |
Get dot product.
| vector | vector |
Definition at line 278 of file JVector3D.hh.
|
inline |
Get cross product.
Note that this vector should not overlap with the first or second vector,
| first | first vector |
| second | second vector |
Definition at line 295 of file JVector3D.hh.
|
inlineinherited |
Multiply with object.
| object | object |
Definition at line 273 of file JMath.hh.
|
protected |
Definition at line 306 of file JVector3D.hh.
|
protected |
Definition at line 307 of file JVector3D.hh.
|
protected |
Definition at line 308 of file JVector3D.hh.
1.8.5