CARLA
Public Member Functions | Public Attributes | Friends | List of all members
carla::geom::Vector3D Class Reference

#include <Vector3D.h>

+ Inheritance diagram for carla::geom::Vector3D:
+ Collaboration diagram for carla::geom::Vector3D:

Public Member Functions

float Length () const
 
Vector3D MakeSafeUnitVector (const float epsilon) const
 
Vector3D MakeUnitVector () const
 
template<typename MSGPACK_OBJECT >
void msgpack_object (MSGPACK_OBJECT *o, clmdep_msgpack::zone &sneaky_variable_that_shadows_z) const
 
template<typename Packer >
void msgpack_pack (Packer &pk) const
 
void msgpack_unpack (clmdep_msgpack::object const &o)
 
bool operator!= (const Vector3D &rhs) const
 
Vector3Doperator*= (float rhs)
 
Vector3Doperator+= (const Vector3D &rhs)
 
Vector3Doperator-= (const Vector3D &rhs)
 
Vector3Doperator/= (float rhs)
 
bool operator== (const Vector3D &rhs) const
 
float SquaredLength () const
 
 Vector3D ()=default
 
 Vector3D (float ix, float iy, float iz)
 

Public Attributes

float x = 0.0f
 
float y = 0.0f
 
float z = 0.0f
 

Friends

Vector3D operator* (Vector3D lhs, float rhs)
 
Vector3D operator* (float lhs, Vector3D rhs)
 
Vector3D operator+ (Vector3D lhs, const Vector3D &rhs)
 
Vector3D operator- (Vector3D lhs, const Vector3D &rhs)
 
Vector3D operator/ (Vector3D lhs, float rhs)
 
Vector3D operator/ (float lhs, Vector3D rhs)
 

Detailed Description

Definition at line 17 of file geom/Vector3D.h.

Constructor & Destructor Documentation

◆ Vector3D() [1/2]

carla::geom::Vector3D::Vector3D ( )
default

Referenced by MakeSafeUnitVector(), MakeUnitVector(), and operator!=().

+ Here is the caller graph for this function:

◆ Vector3D() [2/2]

carla::geom::Vector3D::Vector3D ( float  ix,
float  iy,
float  iz 
)
inline

Definition at line 36 of file geom/Vector3D.h.

Member Function Documentation

◆ Length()

float carla::geom::Vector3D::Length ( ) const
inline

Definition at line 49 of file geom/Vector3D.h.

References SquaredLength().

Referenced by ARayCastLidar::ComputeDetection(), ARayCastLidar::ComputeIntensity(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::geom::Math::GetVectorAngle(), MakeSafeUnitVector(), MakeUnitVector(), FShapeVisitor::operator()(), carla::traffic_manager::MotionPlanStage::Update(), and carla::traffic_manager::LocalizationStage::Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeSafeUnitVector()

Vector3D carla::geom::Vector3D::MakeSafeUnitVector ( const float  epsilon) const
inline

Definition at line 60 of file geom/Vector3D.h.

References Length(), and Vector3D().

Referenced by carla::traffic_manager::DeviationCrossProduct(), carla::traffic_manager::DeviationDotProduct(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::traffic_manager::CollisionStage::GetGeodesicBoundary(), carla::traffic_manager::CollisionStage::NegotiateCollision(), and carla::client::detail::Client::SpawnActorWithParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeUnitVector()

Vector3D carla::geom::Vector3D::MakeUnitVector ( ) const
inline

Definition at line 53 of file geom/Vector3D.h.

References DEVELOPMENT_ASSERT, Length(), and Vector3D().

Referenced by ARayCastLidar::PostprocessDetection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ msgpack_object()

template<typename MSGPACK_OBJECT >
void carla::geom::Vector3D::msgpack_object ( MSGPACK_OBJECT *  o,
clmdep_msgpack::zone &  sneaky_variable_that_shadows_z 
) const
inline

Definition at line 184 of file geom/Vector3D.h.

◆ msgpack_pack()

template<typename Packer >
void carla::geom::Vector3D::msgpack_pack ( Packer &  pk) const
inline
Todo:
The following is copy-pasted from MSGPACK_DEFINE_ARRAY.

This is a workaround for an issue in msgpack library. The MSGPACK_DEFINE_ARRAY macro is shadowing our z variable. https://github.com/msgpack/msgpack-c/issues/709

Definition at line 175 of file geom/Vector3D.h.

◆ msgpack_unpack()

void carla::geom::Vector3D::msgpack_unpack ( clmdep_msgpack::object const &  o)
inline

Definition at line 179 of file geom/Vector3D.h.

◆ operator!=()

bool carla::geom::Vector3D::operator!= ( const Vector3D rhs) const
inline

Definition at line 136 of file geom/Vector3D.h.

References Vector3D(), x, and y.

+ Here is the call graph for this function:

◆ operator*=()

Vector3D& carla::geom::Vector3D::operator*= ( float  rhs)
inline

Definition at line 94 of file geom/Vector3D.h.

◆ operator+=()

Vector3D& carla::geom::Vector3D::operator+= ( const Vector3D rhs)
inline

Definition at line 70 of file geom/Vector3D.h.

References x, y, and z.

◆ operator-=()

Vector3D& carla::geom::Vector3D::operator-= ( const Vector3D rhs)
inline

Definition at line 82 of file geom/Vector3D.h.

References x, y, and z.

◆ operator/=()

Vector3D& carla::geom::Vector3D::operator/= ( float  rhs)
inline

Definition at line 111 of file geom/Vector3D.h.

◆ operator==()

bool carla::geom::Vector3D::operator== ( const Vector3D rhs) const
inline

Definition at line 132 of file geom/Vector3D.h.

References x, y, and z.

◆ SquaredLength()

float carla::geom::Vector3D::SquaredLength ( ) const
inline

Definition at line 45 of file geom/Vector3D.h.

References z.

Referenced by Length(), carla::traffic_manager::MotionPlanStage::SafeAfterJunction(), carla::nav::WalkerManager::Update(), carla::traffic_manager::LocalizationStage::Update(), carla::nav::Navigation::UpdateCrowd(), and carla::traffic_manager::ALSM::UpdateIdleTime().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator* [1/2]

Vector3D operator* ( Vector3D  lhs,
float  rhs 
)
friend

Definition at line 101 of file geom/Vector3D.h.

◆ operator* [2/2]

Vector3D operator* ( float  lhs,
Vector3D  rhs 
)
friend

Definition at line 106 of file geom/Vector3D.h.

◆ operator+

Vector3D operator+ ( Vector3D  lhs,
const Vector3D rhs 
)
friend

Definition at line 77 of file geom/Vector3D.h.

◆ operator-

Vector3D operator- ( Vector3D  lhs,
const Vector3D rhs 
)
friend

Definition at line 89 of file geom/Vector3D.h.

◆ operator/ [1/2]

Vector3D operator/ ( Vector3D  lhs,
float  rhs 
)
friend

Definition at line 118 of file geom/Vector3D.h.

◆ operator/ [2/2]

Vector3D operator/ ( float  lhs,
Vector3D  rhs 
)
friend

Definition at line 123 of file geom/Vector3D.h.

Member Data Documentation

◆ x

float carla::geom::Vector3D::x = 0.0f

Definition at line 24 of file geom/Vector3D.h.

Referenced by carla::road::Map::AddElementToRtree(), carla::nav::Navigation::AddOrUpdateVehicle(), carla::nav::Navigation::AddWalker(), carla::rss::RssCheck::AppendRoutingTarget(), carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::road::element::LaneCrossingCalculator::Calculate(), carla::geom::BoundingBox::Contains(), carla::traffic_manager::DeviationCrossProduct(), carla::traffic_manager::DeviationDotProduct(), carla::geom::Math::DistanceArcToPoint(), carla::geom::Math::DistanceSquared(), carla::geom::Math::DistanceSquared2D(), carla::road::element::GeometrySpiral::DistanceTo(), carla::geom::Math::Dot(), carla::geom::Math::Dot2D(), carla::nav::Navigation::GetAgentRoute(), carla::road::Map::GetAllCrosswalkZones(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::road::Map::GetClosestWaypointOnRoad(), carla::traffic_manager::CollisionStage::GetGeodesicBoundary(), carla::rss::RssCheck::GetGreenTrafficLightsOnRoute(), carla::geom::Transform::GetInverseMatrix(), carla::geom::Transform::GetMatrix(), carla::nav::Navigation::GetPath(), carla::nav::Navigation::GetRandomLocation(), carla::rss::RssCheck::GetRoutingTargets(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerTransform(), carla::traffic_manager::InMemoryMap::GetWaypoint(), carla::client::WalkerAIController::GoToLocation(), carla::nav::Navigation::HasVehicleNear(), carla::geom::Rotation::InverseRotateVector(), carla::traffic_manager::CollisionStage::NegotiateCollision(), carla::geom::Location::operator!=(), operator!=(), carla::nav::WalkerEventVisitor::operator()(), FShapeVisitor::operator()(), operator+=(), operator-=(), carla::geom::operator<<(), carla::rpc::WheelPhysicsControl::operator==(), operator==(), carla::sensor::data::detail::PackedWalkerControl::PackedWalkerControl(), carla::road::element::GeometryLine::PosFromDist(), carla::road::element::GeometrySpiral::PosFromDist(), carla::road::element::GeometryPoly3::PosFromDist(), carla::road::element::GeometryParamPoly3::PosFromDist(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Math::RotatePointOnOrigin2D(), carla::geom::Rotation::RotateVector(), carla::traffic_manager::SimpleWaypoint::SetLeftWaypoint(), carla::traffic_manager::SimpleWaypoint::SetRightWaypoint(), carla::traffic_manager::InMemoryMap::SetUp(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), TEST(), carla::geom::GeoLocation::Transform(), carla::nav::WalkerManager::Update(), carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), carla::traffic_manager::ALSM::UpdateUnregisteredActorsData(), carla::client::detail::WalkerNavigation::UpdateVehiclesInCrowd(), carla::sensor::data::LidarDetection::WriteDetection(), and carla::sensor::data::LidarData::WritePointSync().

◆ y

float carla::geom::Vector3D::y = 0.0f

Definition at line 26 of file geom/Vector3D.h.

Referenced by carla::road::Map::AddElementToRtree(), carla::nav::Navigation::AddOrUpdateVehicle(), carla::nav::Navigation::AddWalker(), carla::rss::RssCheck::AppendRoutingTarget(), carla::road::element::DirectedPoint::ApplyLateralOffset(), carla::road::element::LaneCrossingCalculator::Calculate(), carla::road::MapBuilder::ComputeSignalTransform(), carla::road::Lane::ComputeTransform(), carla::geom::BoundingBox::Contains(), carla::traffic_manager::DeviationCrossProduct(), carla::traffic_manager::DeviationDotProduct(), carla::geom::Math::DistanceArcToPoint(), carla::geom::Math::DistanceSquared(), carla::geom::Math::DistanceSquared2D(), carla::road::element::GeometrySpiral::DistanceTo(), carla::geom::Math::Dot(), carla::geom::Math::Dot2D(), carla::nav::Navigation::GetAgentRoute(), carla::traffic_manager::CollisionStage::GetBoundary(), carla::road::Map::GetClosestWaypointOnRoad(), carla::road::Lane::GetCornerPositions(), carla::traffic_manager::CollisionStage::GetGeodesicBoundary(), carla::geom::Transform::GetInverseMatrix(), carla::geom::Transform::GetMatrix(), carla::nav::Navigation::GetPath(), carla::nav::Navigation::GetRandomLocation(), carla::rss::RssCheck::GetRoutingTargets(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerTransform(), carla::traffic_manager::InMemoryMap::GetWaypoint(), carla::client::WalkerAIController::GoToLocation(), carla::nav::Navigation::HasVehicleNear(), carla::geom::Rotation::InverseRotateVector(), carla::geom::Location::operator!=(), operator!=(), carla::nav::WalkerEventVisitor::operator()(), FShapeVisitor::operator()(), operator+=(), operator-=(), carla::geom::operator<<(), carla::rpc::WheelPhysicsControl::operator==(), operator==(), carla::sensor::data::detail::PackedWalkerControl::PackedWalkerControl(), carla::road::element::GeometryLine::PosFromDist(), carla::road::element::GeometrySpiral::PosFromDist(), carla::road::element::GeometryPoly3::PosFromDist(), carla::road::element::GeometryParamPoly3::PosFromDist(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Math::RotatePointOnOrigin2D(), carla::geom::Rotation::RotateVector(), carla::traffic_manager::SimpleWaypoint::SetLeftWaypoint(), carla::traffic_manager::SimpleWaypoint::SetRightWaypoint(), carla::traffic_manager::InMemoryMap::SetUp(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), TEST(), carla::geom::GeoLocation::Transform(), carla::nav::WalkerManager::Update(), carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), carla::traffic_manager::ALSM::UpdateUnregisteredActorsData(), carla::client::detail::WalkerNavigation::UpdateVehiclesInCrowd(), carla::sensor::data::LidarDetection::WriteDetection(), and carla::sensor::data::LidarData::WritePointSync().

◆ z

float carla::geom::Vector3D::z = 0.0f

Definition at line 28 of file geom/Vector3D.h.

Referenced by carla::road::Map::AddElementToRtree(), carla::nav::Navigation::AddOrUpdateVehicle(), carla::nav::Navigation::AddWalker(), carla::road::MapBuilder::ComputeSignalTransform(), carla::geom::BoundingBox::Contains(), carla::traffic_manager::DeviationDotProduct(), carla::geom::Math::DistanceSquared(), carla::geom::Math::Dot(), carla::nav::Navigation::GetAgentRoute(), carla::road::Map::GetClosestWaypointOnRoad(), carla::road::Lane::GetCornerPositions(), carla::road::Road::GetDirectedPointIn(), carla::geom::Transform::GetInverseMatrix(), carla::geom::Transform::GetMatrix(), carla::nav::Navigation::GetPath(), carla::nav::Navigation::GetRandomLocation(), carla::rss::RssCheck::GetRoutingTargets(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerTransform(), carla::traffic_manager::InMemoryMap::GetWaypoint(), carla::client::WalkerAIController::GoToLocation(), carla::nav::Navigation::HasVehicleNear(), carla::geom::Rotation::InverseRotateVector(), carla::geom::MeshFactory::MergeAndSmooth(), carla::geom::Location::operator!=(), carla::nav::WalkerEventVisitor::operator()(), FShapeVisitor::operator()(), operator+=(), operator-=(), carla::geom::operator<<(), carla::rpc::WheelPhysicsControl::operator==(), operator==(), carla::sensor::data::detail::PackedWalkerControl::PackedWalkerControl(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Rotation::RotateVector(), carla::traffic_manager::InMemoryMap::SetUp(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), SquaredLength(), TEST(), carla::geom::GeoLocation::Transform(), carla::nav::WalkerManager::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::UpdateRegisteredActorsData(), carla::traffic_manager::ALSM::UpdateUnregisteredActorsData(), carla::client::detail::WalkerNavigation::UpdateVehiclesInCrowd(), carla::sensor::data::LidarDetection::WriteDetection(), and carla::sensor::data::LidarData::WritePointSync().


The documentation for this class was generated from the following file: