CARLA
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
carla::sensor::data::CollisionEvent Class Reference

A registered collision. More...

#include <CollisionEvent.h>

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

Public Member Functions

SharedPtr< client::ActorGetActor () const
 Get "self" actor. Actor that measured the collision. More...
 
const geom::Vector3DGetNormalImpulse () const
 Normal impulse result of the collision. More...
 
SharedPtr< client::ActorGetOtherActor () const
 Get the actor to which we collided. More...
 
- Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
double GetTimestamp () const
 Simulation-time when the data was generated. More...
 
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 (size_t frame, double timestamp, const rpc::Transform &sensor_transform)
 
 SensorData (const RawData &data)
 

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

Definition at line 24 of file CollisionEvent.h.

◆ 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.

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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:

Member Data Documentation

◆ _normal_impulse

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

Definition at line 57 of file CollisionEvent.h.

Referenced by GetNormalImpulse().

◆ _other_actor

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

Definition at line 55 of file CollisionEvent.h.

Referenced by GetOtherActor().

◆ _self_actor

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

Definition at line 53 of file CollisionEvent.h.

Referenced by GetActor().

◆ Serializer

Definition at line 26 of file CollisionEvent.h.


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