a 3d vector More...
#include "vector.h"
Public Member Functions | |
Vector3D (double _x, double _y, double _z) | |
Vector3D () | |
Create vector (0.0, 0.0, 0.0) More... | |
double | GetLength () const |
Compute the length (magnitude) of the vector. More... | |
Public Attributes | |
double | x |
x coordinate of vector More... | |
double | y |
y coordinate of vector More... | |
double | z |
z coordinate of vector More... | |
Friends | |
double | CalculateDistance (const Vector3D &a, const Vector3D &b) |
Calculate the Cartesian distance between two points. More... | |
Vector3D | operator+ (const Vector3D &a, const Vector3D &b) |
Addition operator. More... | |
Vector3D | operator- (const Vector3D &a, const Vector3D &b) |
Subtraction operator. More... | |
bool | operator< (const Vector3D &a, const Vector3D &b) |
Less than comparison operator. More... | |
std::ostream & | operator<< (std::ostream &os, const Vector3D &vector) |
Output streamer. More... | |
std::istream & | operator>> (std::istream &is, Vector3D &vector) |
Input streamer. More... | |
Related Functions | |
(Note that these are not member functions.) | |
ns3::Ptr< const ns3::AttributeAccessor > | MakeVectorAccessor (T1 a1) |
Create an AttributeAccessor for a class data member, or a lone class get functor or set method. More... | |
ns3::Ptr< const ns3::AttributeAccessor > | MakeVectorAccessor (T1 a1, T2 a2) |
Create an AttributeAccessor using a pair of get functor and set methods from a class. More... | |
Ptr< const AttributeChecker > | MakeVectorChecker (void) |
typedef Vector3D | Vector |
typedef Vector3DChecker | VectorChecker |
typedef Vector3DValue | VectorValue |
ns3::Vector3D::Vector3D | ( | double | _x, |
double | _y, | ||
double | _z | ||
) |
[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 48 of file vector.cc.
References NS_LOG_FUNCTION.
ns3::Vector3D::Vector3D | ( | ) |
double ns3::Vector3D::GetLength | ( | ) | 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 |
|
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(), ns3::operator+(), ns3::operator-(), ns3::operator<(), ns3::operator<<(), ns3::operator>>(), 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(), ns3::operator+(), ns3::operator-(), ns3::operator<(), ns3::operator<<(), ns3::operator>>(), and showPosition().
double ns3::Vector3D::z |
z coordinate of vector
Definition at line 61 of file vector.h.
Referenced by GetLength(), ns3::operator+(), ns3::operator-(), ns3::operator<(), ns3::operator<<(), ns3::operator>>(), and showPosition().