/*
 * 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 ignition.msgs;
option java_package = "com.ignition.msgs";
option java_outer_classname = "LightProtos";

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

import "ignition/msgs/header.proto";
import "ignition/msgs/pose.proto";
import "ignition/msgs/vector3d.proto";
import "ignition/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;
}
