2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/event/modeling/light-impl.h>
22 #include <dali/public-api/common/constants.h>
26 const float DEFAULT_FALLOFF_START = 0.0f;
27 const float DEFAULT_FALLOFF_END = 10000.0f;
28 const float DEFAULT_SPOT_CONE = 90.0f;
37 Light::Light(const std::string& name)
40 mFallOff(DEFAULT_FALLOFF_START, DEFAULT_FALLOFF_END),
41 mSpotAngle(DEFAULT_SPOT_CONE, DEFAULT_SPOT_CONE),
42 mAmbientColor(Color::BLACK),
43 mDiffuseColor(Color::WHITE),
44 mSpecularColor(Color::WHITE),
45 mDirection(Vector3::NEGATIVE_ZAXIS)
52 Light::Light(const Light& rhs)
55 mFallOff(rhs.mFallOff),
56 mSpotAngle(rhs.mSpotAngle),
57 mAmbientColor(rhs.mAmbientColor),
58 mDiffuseColor(rhs.mDiffuseColor),
59 mSpecularColor(rhs.mSpecularColor),
60 mDirection(rhs.mDirection)
67 Light& Light::operator=(const Light& rhs)
73 mFallOff = rhs.mFallOff;
74 mSpotAngle = rhs.mSpotAngle;
75 mAmbientColor = rhs.mAmbientColor;
76 mDiffuseColor = rhs.mDiffuseColor;
77 mSpecularColor = rhs.mSpecularColor;
78 mDirection = rhs.mDirection;
88 } // namespace Internal