|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
82 return std::sqrt (
x *
x +
y *
y +
z *
z);
88 return std::sqrt (
x *
x +
y *
y);
95 return x *
x +
y *
y +
z *
z;
101 return x *
x +
y *
y;
108 return (b - a).GetLength ();
114 return (b - a).GetLength ();
121 return (b - a).GetLengthSquared ();
127 return (b - a).GetLengthSquared ();
132 os << vector.
x <<
":" << vector.
y <<
":" << vector.
z;
138 is >> vector.
x >> c1 >> vector.
y >> c2 >> vector.
z;
142 is.setstate (std::ios_base::failbit);
148 return std::tie (a.
x, a.
y, a.
z) <
149 std::tie (b.
x, b.
y, b.
z);
153 return std::tie (a.
x, a.
y, a.
z) <=
154 std::tie (b.
x, b.
y, b.
z);
158 return std::tie (a.
x, a.
y, a.
z) >
159 std::tie (b.
x, b.
y, b.
z);
163 return std::tie (a.
x, a.
y, a.
z) >=
164 std::tie (b.
x, b.
y, b.
z);
168 return std::tie (a.
x, a.
y, a.
z) ==
169 std::tie (b.
x, b.
y, b.
z);
187 os << vector.
x <<
":" << vector.
y;
193 is >> vector.
x >> c1 >> vector.
y;
196 is.setstate (std::ios_base::failbit);
202 return std::tie (a.
x, a.
y) <
207 return std::tie (a.
x, a.
y) <=
212 return std::tie (a.
x, a.
y) >
217 return std::tie (a.
x, a.
y) >=
222 return std::tie (a.
x, a.
y) ==
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< const AttributeChecker > MakeVector3DChecker(void)
double GetLengthSquared() const
Compute the squared length of the vector.
int64x64_t operator+(const int64x64_t &lhs)
Unary plus operator.
double GetLength() const
Compute the length (magnitude) of the vector.
NS_FATAL_x macro definitions.
Vector3D()
Create vector (0.0, 0.0, 0.0)
double y
y coordinate of vector
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeVectorChecker(void)
bool operator<(const EventId &a, const EventId &b)
bool operator>=(const int64x64_t &lhs, const int64x64_t &rhs)
Greater or equal operator.
int64x64_t operator-(const int64x64_t &lhs)
Unary negation operator (change sign operator).
double x
x coordinate of vector
double GetLength() const
Compute the length (magnitude) of the vector.
Smart pointer class similar to boost::intrusive_ptr.
bool operator<=(const int64x64_t &lhs, const int64x64_t &rhs)
Less or equal operator.
double CalculateDistanceSquared(const Vector3D &a, const Vector3D &b)
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
double CalculateDistance(const Vector3D &a, const Vector3D &b)
double GetLengthSquared() const
Compute the squared length of the vector.
double z
z coordinate of vector
bool operator==(const EventId &a, const EventId &b)
double y
y coordinate of vector
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
ns3::Vector, ns3::Vector2D and ns3::Vector3D declarations.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
bool operator>(const int64x64_t &lhs, const int64x64_t &rhs)
Greater operator.
std::ostream & operator<<(std::ostream &os, const Angles &a)
double x
x coordinate of vector
Vector2D()
Constructor: (0.0, 0.0)
std::istream & operator>>(std::istream &is, Angles &a)