INET Framework for OMNeT++/OMNEST
inet::Coord Class Reference

Class for storing 3D coordinates. More...

#include <Coord.h>

Inheritance diagram for inet::Coord:
inet::PolyhedronPoint

Static Public Attributes

static const Coord NIL = Coord(NaN, NaN, NaN)
 Constant with all values set to 0. More...
 
static const Coord ZERO = Coord(0.0, 0.0, 0.0)
 
static const Coord ONE = Coord(1.0, 1.0, 1.0)
 
static const Coord X_AXIS = Coord(1.0, 0.0, 0.0)
 
static const Coord Y_AXIS = Coord(0.0, 1.0, 0.0)
 
static const Coord Z_AXIS = Coord(0.0, 0.0, 1.0)
 

x, y and z coordinate of the position.

double x
 
double y
 
double z
 
void copy (const Coord &other)
 
 Coord ()
 Default constructor. More...
 
 Coord (double x, double y, double z=0.0)
 Initializes a coordinate. More...
 
 Coord (const Coord &other)
 Initializes coordinate from other coordinate. More...
 
Coord xyz () const
 
Coord getXyz () const
 
Coord yzx ()
 
Coord getYzx () const
 
Coord zxy ()
 
Coord getZxy () const
 
double getX () const
 
void setX (double x)
 
double getY () const
 
void setY (double y)
 
double getZ () const
 
void setZ (double z)
 
std::string str () const
 Returns a string with the value of the coordinate. More...
 
Coord operator- () const
 Returns the negated vector. More...
 
Coordoperator*= (double f)
 Multiplies this coordinate vector by a real number. More...
 
Coordoperator/= (double f)
 Divides this coordinate vector by a real number. More...
 
Coordoperator+= (const Coord &a)
 Adds coordinate vector 'a' to this. More...
 
double operator* (const Coord &v) const
 Dot product. More...
 
Coord operator% (const Coord &v) const
 Cross product. More...
 
Coordoperator= (const Coord &other)
 Assigns coordinate vector 'other' to this. More...
 
Coordoperator-= (const Coord &a)
 Subtracts coordinate vector 'a' from this. More...
 
Coord clamp (double l, double u)
 
Coord getClamped (double l, double u) const
 
Coord sign ()
 
Coord getSign () const
 
Coord abs ()
 
Coord getAbs () const
 
Coord step (const Coord &a)
 
Coord getStep (const Coord &a) const
 
Coord divideElementwise (const Coord &a)
 
Coord getDividedElementwise (const Coord &a) const
 
Coord multiplyElementwise (const Coord &a)
 
Coord getMultipliedElementwise (const Coord &a) const
 
double distance (const Coord &a) const
 Returns the distance to Coord 'a'. More...
 
double sqrdist (const Coord &a) const
 Returns distance^2 to Coord 'a' (omits calling square root). More...
 
double sqrTorusDist (const Coord &b, const Coord &size) const
 Returns the squared distance on a torus of this to Coord 'b' (omits calling square root). More...
 
double squareLength () const
 Returns the square of the length of this Coords position vector. More...
 
double length () const
 Returns the length of this Coords position vector. More...
 
Coord normalize ()
 Updates the length of this position vector to be 1. More...
 
Coord getNormalized () const
 
bool isInBoundary (const Coord &lowerBound, const Coord &upperBound) const
 Checks if this coordinate is inside a specified rectangle. More...
 
bool isNil () const
 
bool isUnspecified () const
 Returns true if this coordinate is unspecified. More...
 
Coord min (const Coord &a) const
 Returns the minimal coordinates. More...
 
Coord max (const Coord &a) const
 Returns the maximal coordinates. More...
 
double angle (const Coord &a)
 Returns the angle between the two vectors. More...
 
Coord operator+ (const Coord &a, const Coord &b)
 Adds two coordinate vectors. More...
 
Coord operator- (const Coord &a, const Coord &b)
 Subtracts two coordinate vectors. More...
 
Coord operator* (const Coord &a, double f)
 Multiplies a coordinate vector by a real number. More...
 
Coord operator/ (const Coord &a, double f)
 Divides a coordinate vector by a real number. More...
 
bool operator== (const Coord &a, const Coord &b)
 Tests whether two coordinate vectors are equal. More...
 
bool operator!= (const Coord &a, const Coord &b)
 Tests whether two coordinate vectors are not equal. More...
 
static Coord parse (const char *text)
 

Detailed Description

Class for storing 3D coordinates.

Some comparison and basic arithmetic operators are implemented.

Constructor & Destructor Documentation

◆ Coord() [1/3]

inet::Coord::Coord ( )
inline

Default constructor.

46 : x(0.0), y(0.0), z(0.0) {}

◆ Coord() [2/3]

inet::Coord::Coord ( double  x,
double  y,
double  z = 0.0 
)
inline

Initializes a coordinate.

49 : x(x), y(y), z(z) {}

◆ Coord() [3/3]

inet::Coord::Coord ( const Coord other)
inline

Initializes coordinate from other coordinate.

52 { copy(other); }

Member Function Documentation

◆ abs()

Coord inet::Coord::abs ( )
inline
204  {
205  x = std::abs(x);
206  y = std::abs(y);
207  z = std::abs(z);
208  return *this;
209  }

Referenced by getAbs().

◆ angle()

double inet::Coord::angle ( const Coord a)
inline

Returns the angle between the two vectors.

324  {
325  return acos(*this * a / length() / a.length());
326  }

◆ clamp()

Coord inet::Coord::clamp ( double  l,
double  u 
)
inline
182  {
183  x = math::clamp(x, l, u);
184  y = math::clamp(y, l, u);
185  z = math::clamp(z, l, u);
186  return *this;
187  }

Referenced by getClamped().

◆ copy()

void inet::Coord::copy ( const Coord other)
inlineprivate
42 { x = other.x; y = other.y; z = other.z; }

◆ distance()

◆ divideElementwise()

Coord inet::Coord::divideElementwise ( const Coord a)
inline
226  {
227  x /= a.x;
228  y /= a.y;
229  z /= a.z;
230  return *this;
231  }

Referenced by getDividedElementwise().

◆ getAbs()

Coord inet::Coord::getAbs ( ) const
inline
211  {
212  return Coord(*this).abs();
213  }

◆ getClamped()

Coord inet::Coord::getClamped ( double  l,
double  u 
) const
inline
189  {
190  return Coord(*this).clamp(l, u);
191  }

◆ getDividedElementwise()

Coord inet::Coord::getDividedElementwise ( const Coord a) const
inline
233  {
234  return Coord(*this).divideElementwise(a);
235  }

Referenced by inet::Cuboid::computeIntersection().

◆ getMultipliedElementwise()

Coord inet::Coord::getMultipliedElementwise ( const Coord a) const
inline
244  {
245  return Coord(*this).multiplyElementwise(a);
246  }

Referenced by inet::Cuboid::computeIntersection().

◆ getNormalized()

Coord inet::Coord::getNormalized ( ) const
inline
282 { return Coord(*this).normalize(); }

◆ getSign()

Coord inet::Coord::getSign ( ) const
inline
200  {
201  return Coord(*this).sign();
202  }

Referenced by inet::Cuboid::computeIntersection().

◆ getStep()

Coord inet::Coord::getStep ( const Coord a) const
inline
222  {
223  return Coord(*this).step(a);
224  }

Referenced by inet::Cuboid::computeIntersection().

◆ getX()

double inet::Coord::getX ( ) const
inline
63 { return x; }

◆ getXyz()

Coord inet::Coord::getXyz ( ) const
inline
55 { return Coord(*this).xyz(); }

◆ getY()

double inet::Coord::getY ( ) const
inline
66 { return y; }

◆ getYzx()

Coord inet::Coord::getYzx ( ) const
inline
58 { return Coord(*this).yzx(); }

Referenced by inet::Cuboid::computeIntersection().

◆ getZ()

double inet::Coord::getZ ( ) const
inline
69 { return z; }

◆ getZxy()

Coord inet::Coord::getZxy ( ) const
inline
61 { return Coord(*this).zxy(); }

Referenced by inet::Cuboid::computeIntersection().

◆ isInBoundary()

bool inet::Coord::isInBoundary ( const Coord lowerBound,
const Coord upperBound 
) const
inline

Checks if this coordinate is inside a specified rectangle.

Parameters
lowerBoundThe upper bound of the rectangle.
upperBoundThe lower bound of the rectangle.
290  {
291  return lowerBound.x <= x && x <= upperBound.x &&
292  lowerBound.y <= y && y <= upperBound.y &&
293  lowerBound.z <= z && z <= upperBound.z;
294  }

Referenced by inet::PostureTransition::findAreaType(), and inet::MoBanCoordinator::isInsideWorld().

◆ isNil()

bool inet::Coord::isNil ( ) const
inline
296  {
297  return this == &NIL;
298  }

◆ isUnspecified()

bool inet::Coord::isUnspecified ( ) const
inline

Returns true if this coordinate is unspecified.

303  {
304  return std::isnan(x) && std::isnan(y) && std::isnan(z);
305  }

Referenced by inet::physicallayer::DielectricObstacleLoss::computeObjectLoss(), inet::SuperpositioningMobility::getCurrentAngularPosition(), inet::Plane::isUnspecified(), and inet::LineSegment::isUnspecified().

◆ length()

◆ max()

Coord inet::Coord::max ( const Coord a) const
inline

Returns the maximal coordinates.

317  {
318  return Coord(x > a.x ? x : a.x, y > a.y ? y : a.y, z > a.z ? z : a.z);
319  }

Referenced by inet::Box::computeBoundingBox(), and inet::physicallayer::MediumLimitCache::computeMaxConstreaintArea().

◆ min()

Coord inet::Coord::min ( const Coord a) const
inline

Returns the minimal coordinates.

310  {
311  return Coord(x < a.x ? x : a.x, y < a.y ? y : a.y, z < a.z ? z : a.z);
312  }

Referenced by inet::Box::computeBoundingBox(), and inet::physicallayer::MediumLimitCache::computeMinConstraintArea().

◆ multiplyElementwise()

Coord inet::Coord::multiplyElementwise ( const Coord a)
inline
237  {
238  x *= a.x;
239  y *= a.y;
240  z *= a.z;
241  return *this;
242  }

Referenced by getMultipliedElementwise().

◆ normalize()

◆ operator%()

Coord inet::Coord::operator% ( const Coord v) const
inline

Cross product.

138  {
139  return Coord(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x);
140  }

◆ operator*()

double inet::Coord::operator* ( const Coord v) const
inline

Dot product.

131  {
132  return x * v.x + y * v.y + z * v.z;
133  }

◆ operator*=()

Coord& inet::Coord::operator*= ( double  f)
inline

Multiplies this coordinate vector by a real number.

101  {
102  x *= f;
103  y *= f;
104  z *= f;
105  return *this;
106  }

◆ operator+=()

Coord& inet::Coord::operator+= ( const Coord a)
inline

Adds coordinate vector 'a' to this.

121  {
122  x += a.x;
123  y += a.y;
124  z += a.z;
125  return *this;
126  }

◆ operator-()

Coord inet::Coord::operator- ( ) const
inline

Returns the negated vector.

76 { return Coord(-x, -y, -z); }

◆ operator-=()

Coord& inet::Coord::operator-= ( const Coord a)
inline

Subtracts coordinate vector 'a' from this.

157  {
158  x -= a.x;
159  y -= a.y;
160  z -= a.z;
161  return *this;
162  }

◆ operator/=()

Coord& inet::Coord::operator/= ( double  f)
inline

Divides this coordinate vector by a real number.

111  {
112  x /= f;
113  y /= f;
114  z /= f;
115  return *this;
116  }

◆ operator=()

Coord& inet::Coord::operator= ( const Coord other)
inline

Assigns coordinate vector 'other' to this.

This operator can change the dimension of the coordinate.

147  {
148  if (this == &other)
149  return *this;
150  copy(other);
151  return *this;
152  }

◆ parse()

static Coord inet::Coord::parse ( const char *  text)
inlinestatic
328  {
329  if (!strcmp(text, "x") || !strcmp(text, "+x"))
330  return Coord::X_AXIS;
331  else if (!strcmp(text, "-x"))
332  return -Coord::X_AXIS;
333  else if (!strcmp(text, "y") || !strcmp(text, "+y"))
334  return Coord::Y_AXIS;
335  else if (!strcmp(text, "-y"))
336  return -Coord::Y_AXIS;
337  else if (!strcmp(text, "z") || !strcmp(text, "+z"))
338  return Coord::Z_AXIS;
339  else if (!strcmp(text, "-z"))
340  return -Coord::Z_AXIS;
341  else {
342  cStringTokenizer tokenizer(text);
343  double x = atof(tokenizer.nextToken());
344  double y = atof(tokenizer.nextToken());
345  double z = atof(tokenizer.nextToken());
346  return Coord(x, y, z);
347  }
348  }

Referenced by inet::physicallayer::AxiallySymmetricAntenna::AntennaGain::AntennaGain(), and inet::physicallayer::DipoleAntenna::AntennaGain::AntennaGain().

◆ setX()

void inet::Coord::setX ( double  x)
inline
64 { this->x = x; }

◆ setY()

void inet::Coord::setY ( double  y)
inline
67 { this->y = y; }

◆ setZ()

void inet::Coord::setZ ( double  z)
inline
70 { this->z = z; }

◆ sign()

Coord inet::Coord::sign ( )
inline
193  {
194  x = math::sign(x);
195  y = math::sign(y);
196  z = math::sign(z);
197  return *this;
198  }

Referenced by getSign().

◆ sqrdist()

double inet::Coord::sqrdist ( const Coord a) const
inline

Returns distance^2 to Coord 'a' (omits calling square root).

258  {
259  return Coord(*this - a).squareLength();
260  }

Referenced by inet::QuadTree::strictRangeQuery(), and inet::physicallayer::NeighborListNeighborCache::updateNeighborList().

◆ sqrTorusDist()

double inet::Coord::sqrTorusDist ( const Coord b,
const Coord size 
) const

Returns the squared distance on a torus of this to Coord 'b' (omits calling square root).

42 {
43  double xDist = dist(x, b.x, size.x);
44  double yDist = dist(y, b.y, size.y);
45  double zDist = dist(z, b.z, size.z);
46  return xDist * xDist + yDist * yDist + zDist * zDist;
47 }

◆ squareLength()

double inet::Coord::squareLength ( ) const
inline

Returns the square of the length of this Coords position vector.

270 { return x * x + y * y + z * z; }

Referenced by sqrdist().

◆ step()

Coord inet::Coord::step ( const Coord a)
inline
215  {
216  x = math::step(x, a.x);
217  y = math::step(y, a.y);
218  z = math::step(z, a.z);
219  return *this;
220  }

Referenced by getStep().

◆ str()

std::string inet::Coord::str ( ) const
inline

Returns a string with the value of the coordinate.

357 {
358  std::stringstream os;
359  os << *this;
360  return os.str();
361 }

Referenced by inet::PostureTransition::getMatrix(), and inet::MobilityBase::DirectiveResolver::resolveDirective().

◆ xyz()

Coord inet::Coord::xyz ( ) const
inline
54 { return *this; }

Referenced by getXyz().

◆ yzx()

Coord inet::Coord::yzx ( )
inline
57 { auto tmp = x; x = y; y = z; z = tmp; return *this; }

Referenced by getYzx().

◆ zxy()

Coord inet::Coord::zxy ( )
inline
60 { auto tmp = z; z = y; y = x; x = tmp; return *this; }

Referenced by getZxy().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const Coord a,
const Coord b 
)
friend

Tests whether two coordinate vectors are not equal.

Negation of the operator==.

180 { return !(a == b); }

◆ operator*

Coord operator* ( const Coord a,
double  f 
)
friend

Multiplies a coordinate vector by a real number.

89  {
90  return Coord(a).operator*=(f);
91  }

◆ operator+

Coord operator+ ( const Coord a,
const Coord b 
)
friend

Adds two coordinate vectors.

79  {
80  return Coord(a).operator+=(b);
81  }

◆ operator-

Coord operator- ( const Coord a,
const Coord b 
)
friend

Subtracts two coordinate vectors.

84  {
85  return Coord(a).operator-=(b);
86  }

◆ operator/

Coord operator/ ( const Coord a,
double  f 
)
friend

Divides a coordinate vector by a real number.

94  {
95  return Coord(a).operator/=(f);
96  }

◆ operator==

bool operator== ( const Coord a,
const Coord b 
)
friend

Tests whether two coordinate vectors are equal.

Because coordinates are of type double, this is done through the math::close function.

170  {
171  // FIXME this implementation is not transitive
172  return math::close(a.x, b.x) && math::close(a.y, b.y) && math::close(a.z, b.z);
173  }

Member Data Documentation

◆ NIL

◆ ONE

const Coord inet::Coord::ONE = Coord(1.0, 1.0, 1.0)
static

◆ x

double inet::Coord::x

Referenced by inet::MobilityBase::checkPosition(), inet::BvhTree::computeBoundingBox(), inet::SpatialGrid::computeBoundingVoxels(), inet::CanvasProjection::computeCanvasPoint(), inet::SpatialGrid::computeConstraintAreaSideLengths(), inet::SimpleGeographicCoordinateSystem::computeGeographicCoordinate(), inet::physicalenvironment::FlatGround::computeGroundProjection(), inet::Cuboid::computeIntersection(), inet::Gpsr::computeIntersectionInsideLineSegments(), inet::BonnMotionMobility::computeMaxSpeed(), inet::SpatialGrid::computeNumberOfVoxels(), inet::Cuboid::computeVisibleFaces(), inet::Quaternion::conjugated(), inet::SpatialGrid::coordToMatrixIndices(), copy(), inet::osg::createAnnulusVertices(), inet::osg::createArrowheadGeometry(), inet::osg::createAutoTransform(), inet::osg::createCircleVertices(), inet::osg::createLineGeometry(), inet::osg::createPolygonGeometry(), inet::osg::createPositionAttitudeTransform(), inet::osg::createText(), divideElementwise(), inet::QuadTree::doesIntersectWithQuadrant(), inet::TurtleMobility::executeStatement(), inet::visualizer::MobilityOsgVisualizer::extendMovementTrail(), inet::AnsimMobility::extractDataFrom(), inet::Gpsr::findPerimeterRoutingNextHop(), inet::StaticLinearMobility::finish(), inet::FacingMobility::getCurrentAngularPosition(), inet::SuperpositioningMobility::getCurrentAngularPosition(), inet::Polygon::getEdgeOutwardNormalVector(), inet::Polygon::getNormalVector(), inet::MobilityBase::getRandomPosition(), inet::Quaternion::getRotationAxisAndAngle(), inet::TurtleMobility::getValue(), inet::Gpsr::getVectorAngle(), inet::AttachedMobility::initialize(), inet::physicalenvironment::GridObjectCache::initialize(), inet::RectangleMobility::initialize(), inet::physicallayer::GridNeighborCache::initialize(), inet::physicalenvironment::PhysicalEnvironment::initialize(), inet::MobilityBase::initialize(), inet::QuadTree::insert(), inet::SpatialGrid::insertObject(), isInBoundary(), inet::QuadTree::isInRectangleRange(), inet::Cuboid::isInsideX(), inet::MobilityBase::isOutside(), inet::SpatialGrid::LineSegmentIterator::LineSegmentIterator(), max(), min(), inet::RectangleMobility::move(), inet::CircleMobility::move(), inet::QuadTree::move(), multiplyElementwise(), operator%(), inet::BvhTree::AxisComparator::operator()(), inet::Quaternion::operator*(), operator*(), inet::Quaternion::operator*=(), operator+=(), operator-=(), inet::operator<<(), inet::MovingMobilityBase::orient(), inet::physicalenvironment::PhysicalEnvironment::parseObjects(), inet::physicalenvironment::PhysicalEnvironment::parseShapes(), inet::visualizer::SceneCanvasVisualizer::parseViewAngle(), inet::PolyhedronPoint::PolyhedronPoint(), inet::GaussMarkovMobility::preventBorderHugging(), inet::Quaternion::Quaternion(), inet::MobilityBase::raiseErrorIfOutside(), inet::MoBanCoordinator::readConfigurationFile(), inet::VehicleMobility::readWaypointsFromFile(), inet::MobilityBase::reflectIfOutside(), inet::visualizer::PhysicalEnvironmentOsgVisualizer::refreshDisplay(), inet::visualizer::PathCanvasVisualizerBase::refreshDisplay(), inet::visualizer::TreeCanvasVisualizerBase::refreshDisplay(), inet::MoBanLocal::refreshDisplay(), inet::QuadTree::remove(), inet::RotationMatrix::rotateVector(), inet::RotationMatrix::rotateVectorInverse(), inet::Quaternion::rotationFromTo(), inet::RotationMatrix::RotationMatrix(), inet::QuadTree::setBoundary(), inet::StaticConcentricMobility::setInitialPosition(), inet::StaticGridMobility::setInitialPosition(), inet::BonnMotionMobility::setInitialPosition(), inet::StaticLinearMobility::setInitialPosition(), inet::TractorMobility::setInitialPosition(), inet::Ns2MotionMobility::setInitialPosition(), inet::MobilityBase::setInitialPosition(), inet::BonnMotionMobility::setTargetPosition(), inet::TractorMobility::setTargetPosition(), inet::Ns2MotionMobility::setTargetPosition(), inet::MoBanCoordinator::setTargetPosition(), sqrTorusDist(), step(), inet::Quaternion::toEulerAngles(), inet::osg::toVec3d(), inet::QuadTree::whichQuadrant(), and inet::MobilityBase::wrapIfOutside().

◆ X_AXIS

◆ y

double inet::Coord::y

Referenced by inet::MobilityBase::checkPosition(), inet::BvhTree::computeBoundingBox(), inet::SpatialGrid::computeBoundingVoxels(), inet::CanvasProjection::computeCanvasPoint(), inet::SpatialGrid::computeConstraintAreaSideLengths(), inet::SimpleGeographicCoordinateSystem::computeGeographicCoordinate(), inet::physicalenvironment::FlatGround::computeGroundProjection(), inet::Cuboid::computeIntersection(), inet::Gpsr::computeIntersectionInsideLineSegments(), inet::BonnMotionMobility::computeMaxSpeed(), inet::SpatialGrid::computeNumberOfVoxels(), inet::Cuboid::computeVisibleFaces(), inet::Quaternion::conjugated(), inet::SpatialGrid::coordToMatrixIndices(), copy(), inet::osg::createAnnulusVertices(), inet::osg::createArrowheadGeometry(), inet::osg::createAutoTransform(), inet::osg::createCircleVertices(), inet::osg::createLineGeometry(), inet::osg::createPolygonGeometry(), inet::osg::createPositionAttitudeTransform(), inet::osg::createText(), divideElementwise(), inet::QuadTree::doesIntersectWithQuadrant(), inet::TurtleMobility::executeStatement(), inet::visualizer::MobilityOsgVisualizer::extendMovementTrail(), inet::AnsimMobility::extractDataFrom(), inet::StaticLinearMobility::finish(), inet::FacingMobility::getCurrentAngularPosition(), inet::SuperpositioningMobility::getCurrentAngularPosition(), inet::Polygon::getEdgeOutwardNormalVector(), inet::Polygon::getNormalVector(), inet::MobilityBase::getRandomPosition(), inet::Quaternion::getRotationAxisAndAngle(), inet::TurtleMobility::getValue(), inet::Gpsr::getVectorAngle(), inet::AttachedMobility::initialize(), inet::physicalenvironment::GridObjectCache::initialize(), inet::RectangleMobility::initialize(), inet::physicallayer::GridNeighborCache::initialize(), inet::physicalenvironment::PhysicalEnvironment::initialize(), inet::MobilityBase::initialize(), inet::QuadTree::insert(), inet::SpatialGrid::insertObject(), isInBoundary(), inet::QuadTree::isInRectangleRange(), inet::Cuboid::isInsideY(), inet::MobilityBase::isOutside(), inet::SpatialGrid::LineSegmentIterator::LineSegmentIterator(), max(), min(), inet::RectangleMobility::move(), inet::CircleMobility::move(), inet::QuadTree::move(), multiplyElementwise(), operator%(), inet::BvhTree::AxisComparator::operator()(), inet::Quaternion::operator*(), operator*(), inet::Quaternion::operator*=(), operator+=(), operator-=(), inet::operator<<(), inet::MovingMobilityBase::orient(), inet::physicalenvironment::PhysicalEnvironment::parseObjects(), inet::physicalenvironment::PhysicalEnvironment::parseShapes(), inet::visualizer::SceneCanvasVisualizer::parseViewAngle(), inet::PolyhedronPoint::PolyhedronPoint(), inet::GaussMarkovMobility::preventBorderHugging(), inet::Quaternion::Quaternion(), inet::MobilityBase::raiseErrorIfOutside(), inet::MoBanCoordinator::readConfigurationFile(), inet::VehicleMobility::readWaypointsFromFile(), inet::MobilityBase::reflectIfOutside(), inet::visualizer::PhysicalEnvironmentOsgVisualizer::refreshDisplay(), inet::visualizer::TreeCanvasVisualizerBase::refreshDisplay(), inet::visualizer::PathCanvasVisualizerBase::refreshDisplay(), inet::MoBanLocal::refreshDisplay(), inet::QuadTree::remove(), inet::RotationMatrix::rotateVector(), inet::RotationMatrix::rotateVectorInverse(), inet::Quaternion::rotationFromTo(), inet::RotationMatrix::RotationMatrix(), inet::QuadTree::setBoundary(), inet::StaticConcentricMobility::setInitialPosition(), inet::StaticGridMobility::setInitialPosition(), inet::StaticLinearMobility::setInitialPosition(), inet::BonnMotionMobility::setInitialPosition(), inet::TractorMobility::setInitialPosition(), inet::Ns2MotionMobility::setInitialPosition(), inet::MobilityBase::setInitialPosition(), inet::BonnMotionMobility::setTargetPosition(), inet::TractorMobility::setTargetPosition(), inet::Ns2MotionMobility::setTargetPosition(), inet::MoBanCoordinator::setTargetPosition(), sqrTorusDist(), step(), inet::Quaternion::toEulerAngles(), inet::osg::toVec3d(), inet::QuadTree::whichQuadrant(), and inet::MobilityBase::wrapIfOutside().

◆ Y_AXIS

◆ z

double inet::Coord::z

Referenced by inet::MobilityBase::checkPosition(), inet::BvhTree::computeBoundingBox(), inet::SpatialGrid::computeBoundingVoxels(), inet::CanvasProjection::computeCanvasPoint(), inet::SpatialGrid::computeConstraintAreaSideLengths(), inet::SimpleGeographicCoordinateSystem::computeGeographicCoordinate(), inet::Cuboid::computeIntersection(), inet::BonnMotionMobility::computeMaxSpeed(), inet::SpatialGrid::computeNumberOfVoxels(), inet::physicallayer::TwoRayInterference::computeTwoRayInterference(), inet::Cuboid::computeVisibleFaces(), inet::Quaternion::conjugated(), inet::SpatialGrid::coordToMatrixIndices(), copy(), inet::osg::createAnnulusVertices(), inet::osg::createArrowheadGeometry(), inet::osg::createAutoTransform(), inet::osg::createCircleVertices(), inet::osg::createLineGeometry(), inet::osg::createPolygonGeometry(), inet::osg::createPositionAttitudeTransform(), inet::osg::createText(), divideElementwise(), inet::TurtleMobility::executeStatement(), inet::visualizer::MobilityOsgVisualizer::extendMovementTrail(), inet::Prism::genereateFaces(), inet::FacingMobility::getCurrentAngularPosition(), inet::SuperpositioningMobility::getCurrentAngularPosition(), inet::Polygon::getEdgeOutwardNormalVector(), inet::Polygon::getNormalVector(), inet::MobilityBase::getRandomPosition(), inet::Quaternion::getRotationAxisAndAngle(), inet::TurtleMobility::getValue(), inet::AttachedMobility::initialize(), inet::physicalenvironment::GridObjectCache::initialize(), inet::physicallayer::GridNeighborCache::initialize(), inet::physicalenvironment::PhysicalEnvironment::initialize(), inet::MobilityBase::initialize(), inet::QuadTree::insert(), inet::SpatialGrid::insertObject(), isInBoundary(), inet::Cuboid::isInsideZ(), inet::MobilityBase::isOutside(), inet::SpatialGrid::LineSegmentIterator::LineSegmentIterator(), max(), min(), inet::CircleMobility::move(), inet::QuadTree::move(), multiplyElementwise(), operator%(), inet::visualizer::PhysicalEnvironmentCanvasVisualizer::ObjectPositionComparator::operator()(), inet::BvhTree::AxisComparator::operator()(), inet::Quaternion::operator*(), operator*(), inet::Quaternion::operator*=(), operator+=(), operator-=(), inet::operator<<(), inet::MovingMobilityBase::orient(), inet::physicalenvironment::PhysicalEnvironment::parseObjects(), inet::physicalenvironment::PhysicalEnvironment::parseShapes(), inet::visualizer::SceneCanvasVisualizer::parseViewAngle(), inet::PolyhedronPoint::PolyhedronPoint(), inet::Quaternion::Quaternion(), inet::MobilityBase::raiseErrorIfOutside(), inet::MoBanCoordinator::readConfigurationFile(), inet::VehicleMobility::readWaypointsFromFile(), inet::MobilityBase::reflectIfOutside(), inet::visualizer::PhysicalEnvironmentOsgVisualizer::refreshDisplay(), inet::QuadTree::remove(), inet::RotationMatrix::rotateVector(), inet::RotationMatrix::rotateVectorInverse(), inet::Quaternion::rotationFromTo(), inet::RotationMatrix::RotationMatrix(), inet::MoBanCoordinator::selectDestination(), inet::StaticConcentricMobility::setInitialPosition(), inet::StaticGridMobility::setInitialPosition(), inet::StaticLinearMobility::setInitialPosition(), inet::MobilityBase::setInitialPosition(), inet::BonnMotionMobility::setTargetPosition(), inet::MoBanCoordinator::setTargetPosition(), sqrTorusDist(), step(), inet::Quaternion::toEulerAngles(), inet::osg::toVec3d(), inet::MobilityBase::updateDisplayStringFromMobilityState(), inet::QuadTree::whichQuadrant(), and inet::MobilityBase::wrapIfOutside().

◆ Z_AXIS

◆ ZERO


The documentation for this class was generated from the following files:
inet::Coord::Coord
Coord()
Default constructor.
Definition: Coord.h:46
inet::Coord::x
double x
Definition: Coord.h:36
inet::units::sqrt
value< Value, pow< Unit, 1, 2 > > sqrt(const value< Value, Unit > &a)
Definition: Units.h:272
inet::math::clamp
double clamp(double v, double l, double u)
Definition: INETMath.h:133
inet::math::step
double step(double a, double b)
Definition: INETMath.h:131
inet::Coord::Z_AXIS
static const Coord Z_AXIS
Definition: Coord.h:31
inet::Coord::squareLength
double squareLength() const
Returns the square of the length of this Coords position vector.
Definition: Coord.h:270
inet::Coord::z
double z
Definition: Coord.h:38
inet::math::sign
int sign(double v)
Returns 1 if the parameter is greater than zero, -1 if less than zero, 0 otherwise.
Definition: INETMath.h:138
inet::Coord::X_AXIS
static const Coord X_AXIS
Definition: Coord.h:29
inet::math::close
bool close(double one, double two)
Tests whether two doubles are close enough to be declared equal.
Definition: INETMath.h:123
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
inet::Coord::NIL
static const Coord NIL
Constant with all values set to 0.
Definition: Coord.h:26
inet::Coord::length
double length() const
Returns the length of this Coords position vector.
Definition: Coord.h:275
inet::Coord::y
double y
Definition: Coord.h:37
inet::Coord::Y_AXIS
static const Coord Y_AXIS
Definition: Coord.h:30
inet::Coord::copy
void copy(const Coord &other)
Definition: Coord.h:42