Radium Engine  1.5.20
Loading...
Searching...
No Matches
LightData.cpp
1#include <Core/Asset/LightData.hpp>
2
3namespace Ra {
4namespace Core {
5namespace Asset {
6
8LightData::LightData( const std::string& name, const LightType& type ) :
9 AssetData( name ), m_frame( Eigen::Matrix<Scalar, 4, 4>::Identity() ), m_type( type ) {}
10
12 AssetData( data ), m_frame( data.m_frame ), m_type( data.m_type ), m_color( data.m_color ) {
13
14 switch ( m_type ) {
15 case POINT_LIGHT:
16 m_pointlight = data.m_pointlight;
17 break;
18 case SPOT_LIGHT:
19 m_spotlight = data.m_spotlight;
20 break;
21 case DIRECTIONAL_LIGHT:
22 m_dirlight = data.m_dirlight;
23 break;
24 case AREA_LIGHT:
25 m_arealight = data.m_arealight;
26 break;
27 default:
28 break;
29 }
30}
31
34
35} // namespace Asset
36} // namespace Core
37} // namespace Ra
LightData(const std::string &name="", const LightType &type=UNKNOWN)
CONSTRUCTOR.
Definition LightData.cpp:8
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3