Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ASphereLight.h
Go to the documentation of this file.
1#pragma once
2
4#include "SDL/sdl_interface.h"
5
6#include <Common/primitive_type.h>
7
8namespace ph
9{
10
12{
13public:
14 std::shared_ptr<Geometry> getArea(const CookingContext& ctx) const override;
15
16 void setRadius(real radius);
17
18private:
19 real m_radius;
20
21public:
23 {
24 ClassType clazz("sphere-light");
25 clazz.docName("Spherical Light Actor");
26 clazz.description(
27 "This type of light emits energy from a spherical shape.");
28 clazz.baseOn<AAreaLight>();
29
30 TSdlReal<OwnerType> radius("radius", &OwnerType::m_radius);
31 radius.description("The radius of the sphere.");
32 radius.defaultTo(1);
33 radius.required();
34 clazz.addField(radius);
35
36 return clazz;
37 }
38};
39
40}// end namespace ph
Definition AAreaLight.h:14
Definition ASphereLight.h:12
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< ASphereLight >)
Definition ASphereLight.h:22
std::shared_ptr< Geometry > getArea(const CookingContext &ctx) const override
Definition ASphereLight.cpp:9
void setRadius(real radius)
Definition ASphereLight.cpp:16
Information about the world being cooked.
Definition CookingContext.h:24
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
A field class that binds a floating point member variable.
Definition TSdlReal.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6