a 3d vector More...
#include "vector.h"
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. | |
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 Functions | |
(Note that these are not member functions.) | |
ns3::Ptr< const ns3::AttributeAccessor > | MakeVectorAccessor (T1 a1) |
ns3::Ptr< const ns3::AttributeAccessor > | MakeVectorAccessor (T1 a1, T2 a2) |
Ptr< const AttributeChecker > | MakeVectorChecker () |
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 50 of file vector.cc.
References NS_LOG_FUNCTION.
ns3::Vector3D::Vector3D | ( | ) |
double ns3::Vector3D::GetLength | ( | ) | const |
double ns3::Vector3D::GetLengthSquared | ( | ) | const |
|
related |
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
The get functor method should have a signature like
where T is the class and U is the type of the return value.
The set method should have one of these signatures:
where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor
of this function.) In the case of a setter returning bool, the return value should be true
if the value could be set successfully.
V | [explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function, as "Make<V>Accessor" |
T1 | [deduced] The type of the class data member, or the type of the class get functor or set method. |
[in] | a1 | The address of the data member, or the get or set method. |
|
related |
Create an AttributeAccessor using a pair of get functor and set methods from a class.
The get functor method should have a signature like
where T is the class and U is the type of the return value.
The set method should have one of these signatures:
where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor
of this function.) In the case of a setter returning bool, the return value should be true if the value could be set successfully.
In practice the setter and getter arguments can appear in either order, but setter first is preferred.
V | [explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function as "Make<V>Accessor" |
T1 | [deduced] The type of the class data member, or the type of the class get functor or set method. |
T2 | [deduced] The type of the getter class functor method. |
[in] | a2 | The address of the class method to set the attribute. |
[in] | a1 | The address of the data member, or the get or set method. |
|
related |
Definition at line 44 of file vector.cc.
References ns3::MakeVector3DChecker(), and NS_LOG_FUNCTION_NOARGS.
|
friend |
|
friend |
|
related |
|
related |
double ns3::Vector3D::x |
x coordinate of vector
Definition at line 59 of file vector.h.
Referenced by 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(), and showPosition().
double ns3::Vector3D::y |
y coordinate of vector
Definition at line 60 of file vector.h.
Referenced by 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(), and showPosition().
double ns3::Vector3D::z |
z coordinate of vector
Definition at line 61 of file vector.h.
Referenced by GetLength(), GetLengthSquared(), and showPosition().