46 return x *
x +
y *
y +
z *
z;
66 const float length =
Length();
68 const float k = 1.0f / length;
73 const float length =
Length();
74 const float k = (length > std::max(epsilon, 0.0f)) ? (1.0f / length) : 1.0f;
152 return (
x == rhs.
x) && (
y == rhs.
y) && (
z == rhs.
z);
156 return !(*
this == rhs);
163#ifdef LIBCARLA_INCLUDED_FROM_UE4
173 return *
this * 1e-2f;
182 return FVector{
x,
y,
z};
193 template <
typename Packer>
196 clmdep_msgpack::type::make_define_array(
x,
y,
z).msgpack_pack(pk);
200 clmdep_msgpack::type::make_define_array(
x,
y,
z).msgpack_unpack(o);
202 template <
typename MSGPACK_OBJECT>
203 void msgpack_object(MSGPACK_OBJECT* o, clmdep_msgpack::zone& sneaky_variable_that_shadows_z)
const
205 clmdep_msgpack::type::make_define_array(
x,
y,
z).msgpack_object(o, sneaky_variable_that_shadows_z);
#define DEVELOPMENT_ASSERT(pred)
Vector3D & operator*=(float rhs)
float SquaredLength() const
Vector3D MakeUnitVector() const
Vector3D MakeSafeUnitVector(const float epsilon) const
float SquaredLength2D() const
void msgpack_object(MSGPACK_OBJECT *o, clmdep_msgpack::zone &sneaky_variable_that_shadows_z) const
FVector ToFVector() const
Vector3D(const FVector &v)=delete
These 2 methods are explicitly deleted to avoid creating them by other users, unlike locations,...
friend Vector3D operator-(Vector3D lhs, const Vector3D &rhs)
Vector3D & operator+=(const Vector3D &rhs)
friend Vector3D operator/(Vector3D lhs, float rhs)
Vector3D ToCentimeters() const
Return a Vector3D converted from meters to centimeters.
bool operator!=(const Vector3D &rhs) const
Vector3D & operator-=(const float f)
void msgpack_pack(Packer &pk) const
Vector3D & operator/=(float rhs)
bool operator==(const Vector3D &rhs) const
friend Vector3D operator*(Vector3D lhs, float rhs)
Vector3D ToMeters() const
Return a Vector3D converted from centimeters to meters.
void msgpack_unpack(clmdep_msgpack::object const &o)
Vector3D & operator=(const FVector &rhs)=delete
friend Vector3D operator/(float lhs, Vector3D rhs)
Vector3D(float ix, float iy, float iz)
friend Vector3D operator+(Vector3D lhs, const Vector3D &rhs)
friend Vector3D operator*(float lhs, Vector3D rhs)
Vector3D & operator-=(const Vector3D &rhs)
This file contains definitions of common data structures used in traffic manager.