00001 /* 00002 * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc. 00003 * All rights reserved. This program is made available under the terms of the 00004 * Eclipse Public License v1.0 which accompanies this distribution, and is 00005 * available at http://www.eclipse.org/legal/epl-v10.html 00006 * Contributors: 00007 * National Institute of Advanced Industrial Science and Technology (AIST) 00008 */ 00009 #ifndef HRPMODEL_LIGHT_H_INCLUDED 00010 #define HRPMODEL_LIGHT_H_INCLUDED 00011 00012 #include "Link.h" 00013 00014 namespace hrp { 00015 00016 class Light{ 00017 public: 00018 enum LightType { 00019 POINT, 00020 DIRECTIONAL, 00021 SPOT 00022 }; 00023 Light(Link *parent, int lightType, const std::string &name_); 00024 00025 static int nextId; 00026 // common attributes 00027 Link *link; 00028 int type; 00029 std::string name; 00030 Matrix33 localR; 00031 Vector3 localPos; 00032 int id; // unique id in the world 00033 double ambientIntensity, intensity; 00034 Vector3 color; 00035 bool on; 00036 // attributes for point light and spot light 00037 Vector3 attenuation, location; 00038 double radius; 00039 // attribute for directional light and spot light 00040 Vector3 direction; 00041 // attributes for spot light 00042 double beamWidth, cutOffAngle; 00043 }; 00044 }; 00045 00046 #endif