a 3d vector More...
#include "vector.h"
Collaboration diagram for ns3::Vector3D:Public Member Functions | |
| Vector3D () | |
| Create vector (0.0, 0.0, 0.0) | |
| Vector3D (double _x, double _y, double _z) | |
| double | GetLength () const |
| Compute the length (magnitude) of the vector. | |
| double | GetLengthSquared () const |
| Compute the squared length of the vector. | |
Public Attributes | |
| double | x |
| x coordinate of vector | |
| double | y |
| y coordinate of vector | |
| double | z |
| z coordinate of vector | |
Friends | |
| double | CalculateDistance (const Vector3D &a, const Vector3D &b) |
| Calculate the Cartesian distance between two points. | |
| double | CalculateDistanceSquared (const Vector3D &a, const Vector3D &b) |
| Calculate the squared Cartesian distance between two points. | |
| bool | operator!= (const Vector3D &a, const Vector3D &b) |
| Inequality operator. | |
| double | operator* (const Vector3D &a, const Vector3D &b) |
| Dot product operator. | |
| Vector3D | operator* (const Vector3D &a, double b) |
| Scalar multiplication operator. | |
| Vector3D | operator* (double a, const Vector3D &b) |
| Scalar multiplication operator. | |
| Vector3D | operator+ (const Vector3D &a, const Vector3D &b) |
| Addition operator. | |
| Vector3D | operator- (const Vector3D &a, const Vector3D &b) |
| Subtraction operator. | |
| bool | operator< (const Vector3D &a, const Vector3D &b) |
| Less than comparison operator. | |
| std::ostream & | operator<< (std::ostream &os, const Vector3D &vector) |
| Output streamer. | |
| bool | operator<= (const Vector3D &a, const Vector3D &b) |
| Less than or equal to comparison operator. | |
| bool | operator== (const Vector3D &a, const Vector3D &b) |
| Equality operator. | |
| bool | operator> (const Vector3D &a, const Vector3D &b) |
| Greater than comparison operator. | |
| bool | operator>= (const Vector3D &a, const Vector3D &b) |
| Greater than or equal to comparison operator. | |
| std::istream & | operator>> (std::istream &is, Vector3D &vector) |
| Input streamer. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| typedef Vector3D | Vector |
| Vector alias typedef for compatibility with mobility models. | |
| typedef Vector3DChecker | VectorChecker |
| Vector alias typedef for compatibility with mobility models. | |
| typedef Vector3DValue | VectorValue |
| Vector alias typedef for compatibility with mobility models. | |
| [in] | _x | X coordinate of vector |
| [in] | _y | Y coordinate of vector |
| [in] | _z | Z coordinate of vector |
Create vector (_x, _y, _z)
Definition at line 39 of file vector.cc.
References NS_LOG_FUNCTION, x, y, and z.
Referenced by CalculateDistance, CalculateDistanceSquared, operator!=, operator*, operator*, operator*, operator+, operator-, operator<, operator<<, operator<=, operator==, operator>, operator>=, and operator>>.
Here is the caller graph for this function:| ns3::Vector3D::Vector3D | ( | ) |
| double ns3::Vector3D::GetLength | ( | ) | const |
| double ns3::Vector3D::GetLengthSquared | ( | ) | const |
Calculate the Cartesian distance between two points.
| [in] | a | One point |
| [in] | b | Another point |
Definition at line 98 of file vector.cc.
References Vector3D(), and NS_LOG_FUNCTION.
Calculate the squared Cartesian distance between two points.
| [in] | a | One point |
| [in] | b | Another point |
Definition at line 112 of file vector.cc.
References Vector3D(), and NS_LOG_FUNCTION.
Inequality operator.
| [in] | a | lhs vector. |
| [in] | b | rhs vector. |
true if a is not equal to b. Definition at line 176 of file vector.cc.
References Vector3D().
|
friend |
Output streamer.
Vectors are written as "x:y:z".
| [in,out] | os | The stream. |
| [in] | vector | The vector to stream |
Definition at line 125 of file vector.cc.
References Vector3D().
|
friend |
Input streamer.
Vectors are expected to be in the form "x:y:z".
| [in,out] | is | The stream. |
| [in] | vector | The vector. |
Definition at line 133 of file vector.cc.
References Vector3D().
| double ns3::Vector3D::x |
x coordinate of vector
Definition at line 48 of file vector.h.
Referenced by Vector3D(), Vector3D(), visualizer.svgitem.SvgItem::do_get_property(), visualizer.svgitem.SvgItem::do_set_property(), visualizer.svgitem.SvgItem::do_simple_is_item_at(), visualizer.svgitem.SvgItem::do_simple_paint(), GetLength(), GetLengthSquared(), operator*, operator*, operator*, operator+, operator-, operator<, operator<=, operator==, operator>, operator>=, and showPosition().
| double ns3::Vector3D::y |
y coordinate of vector
Definition at line 49 of file vector.h.
Referenced by Vector3D(), Vector3D(), visualizer.svgitem.SvgItem::do_get_property(), visualizer.svgitem.SvgItem::do_set_property(), visualizer.svgitem.SvgItem::do_simple_is_item_at(), visualizer.svgitem.SvgItem::do_simple_paint(), GetLength(), GetLengthSquared(), operator*, operator*, operator*, operator+, operator-, operator<, operator<=, operator==, operator>, operator>=, and showPosition().
| double ns3::Vector3D::z |
z coordinate of vector
Definition at line 50 of file vector.h.
Referenced by Vector3D(), Vector3D(), GetLength(), GetLengthSquared(), operator*, operator*, operator*, operator+, operator-, operator<, operator<=, operator==, operator>, operator>=, and showPosition().