ros2_interfaces_rolling/ros_gz_interfaces/msg/
light.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct Light {
5    pub header: crate::std_msgs::msg::Header,
6    pub name: ::std::string::String,
7    #[serde(rename = "type")]    pub type_: u8,
8    pub pose: crate::geometry_msgs::msg::Pose,
9    pub diffuse: crate::std_msgs::msg::ColorRGBA,
10    pub specular: crate::std_msgs::msg::ColorRGBA,
11    pub attenuation_constant: f32,
12    pub attenuation_linear: f32,
13    pub attenuation_quadratic: f32,
14    pub direction: crate::geometry_msgs::msg::Vector3,
15    pub range: f32,
16    pub cast_shadows: bool,
17    pub spot_inner_angle: f32,
18    pub spot_outer_angle: f32,
19    pub spot_falloff: f32,
20    pub id: u32,
21    pub parent_id: u32,
22    pub intensity: f32,
23}
24
25impl Light {
26    pub const POINT: u8 = 0;
27    pub const SPOT: u8 = 1;
28    pub const DIRECTIONAL: u8 = 2;
29}
30
31impl Default for Light {
32    fn default() -> Self {
33        Light {
34            header: crate::std_msgs::msg::Header::default(),
35            name: ::std::string::String::new(),
36            type_: 0,
37            pose: crate::geometry_msgs::msg::Pose::default(),
38            diffuse: crate::std_msgs::msg::ColorRGBA::default(),
39            specular: crate::std_msgs::msg::ColorRGBA::default(),
40            attenuation_constant: 0.0,
41            attenuation_linear: 0.0,
42            attenuation_quadratic: 0.0,
43            direction: crate::geometry_msgs::msg::Vector3::default(),
44            range: 0.0,
45            cast_shadows: false,
46            spot_inner_angle: 0.0,
47            spot_outer_angle: 0.0,
48            spot_falloff: 0.0,
49            id: 0,
50            parent_id: 0,
51            intensity: 0.0,
52        }
53    }
54}
55
56impl ros2_client::Message for Light {}