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

#include <Vector3DInt.h>

+ Collaboration diagram for carla::geom::Vector3DInt:

Public Member Functions

double Length () 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 Vector3DInt &rhs) const
 
Vector3DIntoperator*= (int32_t rhs)
 
Vector3DIntoperator+= (const Vector3DInt &rhs)
 
Vector3DIntoperator-= (const Vector3DInt &rhs)
 
Vector3DIntoperator/= (int32_t rhs)
 
bool operator== (const Vector3DInt &rhs) const
 
int64_t SquaredLength () const
 
 Vector3DInt ()=default
 
 Vector3DInt (int32_t ix, int32_t iy, int32_t iz)
 

Public Attributes

int32_t x = 0
 
int32_t y = 0
 
int32_t z = 0
 

Friends

Vector3DInt operator* (Vector3DInt lhs, int32_t rhs)
 
Vector3DInt operator* (int32_t lhs, Vector3DInt rhs)
 
Vector3DInt operator+ (Vector3DInt lhs, const Vector3DInt &rhs)
 
Vector3DInt operator- (Vector3DInt lhs, const Vector3DInt &rhs)
 
Vector3DInt operator/ (Vector3DInt lhs, int32_t rhs)
 
Vector3DInt operator/ (int32_t lhs, Vector3DInt rhs)
 

Detailed Description

Definition at line 17 of file Vector3DInt.h.

Constructor & Destructor Documentation

◆ Vector3DInt() [1/2]

carla::geom::Vector3DInt::Vector3DInt ( )
default

Referenced by operator!=().

+ Here is the caller graph for this function:

◆ Vector3DInt() [2/2]

carla::geom::Vector3DInt::Vector3DInt ( int32_t  ix,
int32_t  iy,
int32_t  iz 
)
inline

Definition at line 36 of file Vector3DInt.h.

Member Function Documentation

◆ Length()

double carla::geom::Vector3DInt::Length ( ) const
inline

Definition at line 49 of file Vector3DInt.h.

References SquaredLength().

+ Here is the call graph for this function:

◆ msgpack_object()

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

Definition at line 168 of file Vector3DInt.h.

◆ msgpack_pack()

template<typename Packer >
void carla::geom::Vector3DInt::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 159 of file Vector3DInt.h.

◆ msgpack_unpack()

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

Definition at line 163 of file Vector3DInt.h.

◆ operator!=()

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

Definition at line 123 of file Vector3DInt.h.

References Vector3DInt(), x, and y.

+ Here is the call graph for this function:

◆ operator*=()

Vector3DInt& carla::geom::Vector3DInt::operator*= ( int32_t  rhs)
inline

Definition at line 81 of file Vector3DInt.h.

◆ operator+=()

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

Definition at line 57 of file Vector3DInt.h.

References x, y, and z.

◆ operator-=()

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

Definition at line 69 of file Vector3DInt.h.

References x, y, and z.

◆ operator/=()

Vector3DInt& carla::geom::Vector3DInt::operator/= ( int32_t  rhs)
inline

Definition at line 98 of file Vector3DInt.h.

◆ operator==()

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

Definition at line 119 of file Vector3DInt.h.

References x, y, and z.

◆ SquaredLength()

int64_t carla::geom::Vector3DInt::SquaredLength ( ) const
inline

Definition at line 45 of file Vector3DInt.h.

References z.

Referenced by Length().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator* [1/2]

Vector3DInt operator* ( Vector3DInt  lhs,
int32_t  rhs 
)
friend

Definition at line 88 of file Vector3DInt.h.

◆ operator* [2/2]

Vector3DInt operator* ( int32_t  lhs,
Vector3DInt  rhs 
)
friend

Definition at line 93 of file Vector3DInt.h.

◆ operator+

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

Definition at line 64 of file Vector3DInt.h.

◆ operator-

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

Definition at line 76 of file Vector3DInt.h.

◆ operator/ [1/2]

Vector3DInt operator/ ( Vector3DInt  lhs,
int32_t  rhs 
)
friend

Definition at line 105 of file Vector3DInt.h.

◆ operator/ [2/2]

Vector3DInt operator/ ( int32_t  lhs,
Vector3DInt  rhs 
)
friend

Definition at line 110 of file Vector3DInt.h.

Member Data Documentation

◆ x

int32_t carla::geom::Vector3DInt::x = 0

Definition at line 24 of file Vector3DInt.h.

Referenced by operator!=(), operator+=(), operator-=(), and operator==().

◆ y

int32_t carla::geom::Vector3DInt::y = 0

Definition at line 26 of file Vector3DInt.h.

Referenced by operator!=(), operator+=(), operator-=(), and operator==().

◆ z

int32_t carla::geom::Vector3DInt::z = 0

Definition at line 28 of file Vector3DInt.h.

Referenced by operator+=(), operator-=(), operator==(), and SquaredLength().


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