/*
 * Copyright (C) 2017 Open Source Robotics Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
*/

syntax = "proto3";
package gz.msgs;
option java_package = "com.gz.msgs";
option java_outer_classname = "LightProtos";

/// \ingroup gz.msgs
/// \interface Light
/// \brief Message for a light

import "gz/msgs/header.proto";
import "gz/msgs/pose.proto";
import "gz/msgs/vector3d.proto";
import "gz/msgs/color.proto";

message Light
{
  /// \brief Optional header data
  Header header                 = 1;

  string name                   = 2;
  enum LightType
  {
    POINT       = 0;
    SPOT        = 1;
    DIRECTIONAL = 2;
  }
  LightType type                = 3;

  Pose pose                     = 4;
  Color diffuse                 = 5;
  Color specular                = 6;
  float attenuation_constant    = 7;
  float attenuation_linear      = 8;
  float attenuation_quadratic   = 9;
  Vector3d direction            = 10;
  float range                   = 11;
  bool cast_shadows             = 12;
  float spot_inner_angle        = 13;
  float spot_outer_angle        = 14;
  float spot_falloff            = 15;

  /// \brief Unique id of the light
  uint32 id                     = 16;

  /// \brief Unique id of light's parent
  uint32 parent_id              = 17;

  /// \brief light intensity
  float intensity               = 18;

  /// \brief is the light on or off
  /// true is off, otherwise is on
  bool is_light_off             = 19;

  /// \brief Set if the visual of the light
  /// is visible, true is visible,
  /// otherwise is invisible
  bool visualize_visual     = 20;
}
