CARLA
Loading...
Searching...
No Matches
carla::sensor::data::CollisionEvent Class Reference

A registered collision. More...

#include <CollisionEvent.h>

Inheritance diagram for carla::sensor::data::CollisionEvent:

Public Member Functions

SharedPtr< client::Actor > GetActor () const
 Get "self" actor. Actor that measured the collision.
const geom::Vector3D & GetNormalImpulse () const
 Normal impulse result of the collision.
SharedPtr< client::Actor > GetOtherActor () const
 Get the actor to which we collided.
Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated.
const rpc::Transform & GetSensorTransform () const
 Sensor's transform when the data was generated.
double GetTimestamp () const
 Simulation-time when the data was generated.
virtual ~SensorData ()=default

Protected Types

using Serializer = s11n::CollisionEventSerializer

Protected Member Functions

 CollisionEvent (const RawData &data)
Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 SensorData (const RawData &data)
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)

Protected Attributes

friend Serializer

Private Types

using Super = SensorData

Private Attributes

geom::Vector3D _normal_impulse
client::detail::ActorVariant _other_actor
client::detail::ActorVariant _self_actor

Detailed Description

A registered collision.

Definition at line 20 of file CollisionEvent.h.

Member Typedef Documentation

◆ Serializer

◆ Super

Definition at line 21 of file CollisionEvent.h.

Constructor & Destructor Documentation

◆ CollisionEvent()

carla::sensor::data::CollisionEvent::CollisionEvent ( const RawData & data)
inlineexplicitprotected

Definition at line 28 of file CollisionEvent.h.

References _normal_impulse, _other_actor, and _self_actor.

Member Function Documentation

◆ GetActor()

SharedPtr< client::Actor > carla::sensor::data::CollisionEvent::GetActor ( ) const
inline

Get "self" actor. Actor that measured the collision.

Definition at line 37 of file CollisionEvent.h.

References _self_actor, carla::client::detail::ActorVariant::Get(), and carla::sensor::SensorData::GetEpisode().

◆ GetNormalImpulse()

const geom::Vector3D & carla::sensor::data::CollisionEvent::GetNormalImpulse ( ) const
inline

Normal impulse result of the collision.

Definition at line 47 of file CollisionEvent.h.

References _normal_impulse.

◆ GetOtherActor()

SharedPtr< client::Actor > carla::sensor::data::CollisionEvent::GetOtherActor ( ) const
inline

Get the actor to which we collided.

Definition at line 42 of file CollisionEvent.h.

References _other_actor, carla::client::detail::ActorVariant::Get(), and carla::sensor::SensorData::GetEpisode().

Member Data Documentation

◆ _normal_impulse

geom::Vector3D carla::sensor::data::CollisionEvent::_normal_impulse
private

Definition at line 57 of file CollisionEvent.h.

Referenced by CollisionEvent(), and GetNormalImpulse().

◆ _other_actor

client::detail::ActorVariant carla::sensor::data::CollisionEvent::_other_actor
private

Definition at line 55 of file CollisionEvent.h.

Referenced by CollisionEvent(), and GetOtherActor().

◆ _self_actor

client::detail::ActorVariant carla::sensor::data::CollisionEvent::_self_actor
private

Definition at line 53 of file CollisionEvent.h.

Referenced by CollisionEvent(), and GetActor().

◆ Serializer

Definition at line 26 of file CollisionEvent.h.


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