adding directional light actor
This commit is contained in:
@@ -4,12 +4,18 @@ target_sources(Engine
|
||||
Actor.h
|
||||
CameraActor.cpp
|
||||
CameraActor.h
|
||||
DirectionalLightActor.cpp
|
||||
DirectionalLightActor.h
|
||||
Entity.cpp
|
||||
Entity.h)
|
||||
Entity.h
|
||||
PointLightActor.cpp
|
||||
PointLightActor.h)
|
||||
|
||||
target_sources(Engine
|
||||
PUBLIC FILE_SET HEADERS
|
||||
FILES
|
||||
Actor.h
|
||||
CameraActor.h
|
||||
Entity.h)
|
||||
DirectionalLightActor.h
|
||||
Entity.h
|
||||
PointLightActor.h)
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "DirectionalLightActor.h"
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
DirectionalLightActor::DirectionalLightActor(PScene scene)
|
||||
: Actor(scene)
|
||||
{
|
||||
attachComponent<Component::DirectionalLight>();
|
||||
}
|
||||
|
||||
DirectionalLightActor::~DirectionalLightActor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Component::DirectionalLight& DirectionalLightActor::getDirectionalLightComponent()
|
||||
{
|
||||
return accessComponent<Component::DirectionalLight>();
|
||||
}
|
||||
|
||||
const Component::DirectionalLight& DirectionalLightActor::getDirectionalLightComponent() const
|
||||
{
|
||||
return accessComponent<Component::DirectionalLight>();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "Actor.h"
|
||||
#include "Component/DirectionalLight.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
class DirectionalLightActor : public Actor
|
||||
{
|
||||
public:
|
||||
DirectionalLightActor(PScene scene);
|
||||
virtual ~DirectionalLightActor();
|
||||
Component::DirectionalLight& getDirectionalLightComponent();
|
||||
const Component::DirectionalLight& getDirectionalLightComponent() const;
|
||||
private:
|
||||
};
|
||||
DEFINE_REF(DirectionalLightActor)
|
||||
} // namespace Seele
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "PointLightActor.h"
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
PointLightActor::PointLightActor(PScene scene)
|
||||
: Actor(scene)
|
||||
{
|
||||
attachComponent<Component::PointLight>();
|
||||
}
|
||||
|
||||
PointLightActor::~PointLightActor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Component::PointLight& PointLightActor::getPointLightComponent()
|
||||
{
|
||||
return accessComponent<Component::PointLight>();
|
||||
}
|
||||
|
||||
const Component::PointLight& PointLightActor::getPointLightComponent() const
|
||||
{
|
||||
return accessComponent<Component::PointLight>();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "Actor.h"
|
||||
#include "Component/PointLight.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
class PointLightActor : public Actor
|
||||
{
|
||||
public:
|
||||
PointLightActor(PScene scene);
|
||||
virtual ~PointLightActor();
|
||||
Component::PointLight& getPointLightComponent();
|
||||
const Component::PointLight& getPointLightComponent() const;
|
||||
private:
|
||||
};
|
||||
DEFINE_REF(PointLightActor)
|
||||
} // namespace Seele
|
||||
Reference in New Issue
Block a user