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

Vector3D Abs () const
 
float Length () const
 
float Length2D () 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-= (const float f)
 
Vector3Doperator/= (float rhs)
 
bool operator== (const Vector3D &rhs) const
 
float SquaredLength () const
 
float SquaredLength2D () 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 Abs(), 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

◆ Abs()

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

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

References Vector3D().

+ Here is the call graph for this function:

◆ Length()

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

◆ Length2D()

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

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

References SquaredLength2D().

+ Here is the call graph for this function:

◆ MakeSafeUnitVector()

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

Definition at line 72 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(), carla::client::detail::Client::SpawnActorWithParent(), and carla::traffic_manager::MotionPlanStage::Update().

+ 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 65 of file geom/Vector3D.h.

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

Referenced by carla::road::Map::GetTreesTransform(), ARayCastLidar::PostprocessDetection(), and carla::road::Map::SDFToMesh().

+ 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 203 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 194 of file geom/Vector3D.h.

◆ msgpack_unpack()

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

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

◆ operator!=()

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

Definition at line 155 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 113 of file geom/Vector3D.h.

◆ 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-=() [1/2]

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

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

References x, y, and z.

◆ operator-=() [2/2]

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

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

◆ operator/=()

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

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

◆ operator==()

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

Definition at line 151 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:

◆ SquaredLength2D()

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

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

References y.

Referenced by Length2D().

+ 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 120 of file geom/Vector3D.h.

◆ operator* [2/2]

Vector3D operator* ( float  lhs,
Vector3D  rhs 
)
friend

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

◆ operator+

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

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

◆ operator-

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

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

◆ operator/ [1/2]

Vector3D operator/ ( Vector3D  lhs,
float  rhs 
)
friend

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

◆ operator/ [2/2]

Vector3D operator/ ( float  lhs,
Vector3D  rhs 
)
friend

Definition at line 142 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::traffic_manager::LocalizationStage::ComputeActionBuffer(), carla::traffic_manager::LocalizationStage::ComputeNextAction(), carla::geom::BoundingBox::Contains(), carla::geom::Math::Cross(), 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::road::Map::FilterJunctionsByPosition(), carla::road::Map::FilterRoadsByPosition(), 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::BoundingBox::GetLocalVerticesNoRotation(), carla::geom::Transform::GetMatrix(), carla::nav::Navigation::GetPath(), carla::nav::Navigation::GetRandomLocation(), carla::rss::RssCheck::GetRoutingTargets(), carla::client::TrafficLight::GetStopWaypoints(), carla::traffic_manager::MotionPlanStage::GetThreePointCircleRadius(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerTransform(), carla::traffic_manager::InMemoryMap::GetWaypoint(), carla::traffic_manager::InMemoryMap::GetWaypointsInDelta(), 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(), carla::ros2::ROS2::ProcessDataFromCollisionSensor(), carla::ros2::ROS2::ProcessDataFromIMU(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Math::RotatePointOnOrigin2D(), carla::geom::Rotation::RotateVector(), carla::road::Map::SDFToMesh(), carla::traffic_manager::SimpleWaypoint::SetLeftWaypoint(), carla::traffic_manager::SimpleWaypoint::SetRightWaypoint(), carla::traffic_manager::InMemoryMap::SetUpSpatialTree(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), carla::geom::Simplification::Simplificate(), TEST(), carla::geom::GeoLocation::Transform(), ULoadAssetMaterialsCommandlet::ULoadAssetMaterialsCommandlet(), carla::nav::WalkerManager::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::UpdateData(), 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::traffic_manager::LocalizationStage::ComputeActionBuffer(), carla::traffic_manager::LocalizationStage::ComputeNextAction(), carla::road::MapBuilder::ComputeSignalTransform(), carla::road::Lane::ComputeTransform(), carla::geom::BoundingBox::Contains(), carla::geom::Math::Cross(), 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::road::Map::FilterJunctionsByPosition(), carla::road::Map::FilterRoadsByPosition(), carla::geom::MeshFactory::GenerateLaneMarksForCenterLine(), 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::BoundingBox::GetLocalVerticesNoRotation(), carla::geom::Transform::GetMatrix(), carla::nav::Navigation::GetPath(), carla::nav::Navigation::GetRandomLocation(), carla::rss::RssCheck::GetRoutingTargets(), carla::traffic_manager::MotionPlanStage::GetThreePointCircleRadius(), carla::nav::Navigation::GetWalkerPosition(), carla::nav::Navigation::GetWalkerTransform(), carla::traffic_manager::InMemoryMap::GetWaypoint(), carla::traffic_manager::InMemoryMap::GetWaypointsInDelta(), 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(), carla::ros2::ROS2::ProcessDataFromCollisionSensor(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Math::RotatePointOnOrigin2D(), carla::geom::Rotation::RotateVector(), carla::road::Map::SDFToMesh(), carla::traffic_manager::SimpleWaypoint::SetLeftWaypoint(), carla::traffic_manager::SimpleWaypoint::SetRightWaypoint(), carla::traffic_manager::InMemoryMap::SetUpSpatialTree(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), carla::geom::Simplification::Simplificate(), SquaredLength2D(), TEST(), carla::geom::GeoLocation::Transform(), ULoadAssetMaterialsCommandlet::ULoadAssetMaterialsCommandlet(), carla::nav::WalkerManager::Update(), carla::traffic_manager::ALSM::UpdateData(), 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::geom::Math::Cross(), 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::BoundingBox::GetLocalVerticesNoRotation(), 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::traffic_manager::InMemoryMap::GetWaypointsInDelta(), 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(), carla::ros2::ROS2::ProcessDataFromCollisionSensor(), CarlaRecorderQuery::QueryInfo(), carla::client::Rotate(), carla::geom::Rotation::RotateVector(), carla::road::Map::SDFToMesh(), carla::traffic_manager::InMemoryMap::SetUpSpatialTree(), carla::nav::Navigation::SetWalkerDirectTargetIndex(), carla::nav::Navigation::SetWalkerLookAt(), carla::geom::Simplification::Simplificate(), SquaredLength(), TEST(), carla::geom::GeoLocation::Transform(), ULoadAssetMaterialsCommandlet::ULoadAssetMaterialsCommandlet(), carla::nav::WalkerManager::Update(), carla::traffic_manager::MotionPlanStage::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::UpdateData(), 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: