|
Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
|
Omnidirectional light source. More...
#include <omnilight.hpp>
Public Member Functions | |
| OmniLight (const vector &pos, const rt::color &color, double e=1.0, Light::Type type=Light::Quadratic) | |
| Contstruct a new omnidirectional light from its position and color. | |
| virtual double | distance (const vector &from) const |
| Global distance between the light and a position. More... | |
| virtual const rt::photon & | photon (const vector &from) const |
| Get a photon from a global space location. | |
Public Member Functions inherited from rt::Light | |
| Light (const vector &pos, Type type=Quadratic) | |
| Let there be light ! More... | |
| double | energy (double distance) const |
Public Member Functions inherited from rt::Entity | |
| Entity (Entity *parent=0) | |
| Default entity constructor. More... | |
| Entity (const vector &pos, Entity *parent=0) | |
| Make a new entity from its position and parent. More... | |
| Entity (double x, double y, double z, Entity *parent=0) | |
| Make a new entity from its position coordinates and parent. More... | |
| virtual | ~Entity ()=0 |
| Destructor. More... | |
| void | soil () |
| Make an entity dirty. More... | |
| bool | isDirty () const |
| virtual void | update () |
| Update the global matrix of the entity and its children. | |
| const matrix & | globalMatrix () const |
| The global matrix of the entity. More... | |
| const matrix & | invertedGlobalMatrix () const |
| The invert of the global matrix of the entity. More... | |
| vector | globalPosition () const |
| Global position of the entity. More... | |
| const vector & | position () const |
| Entity location. | |
| const vector & | rotation () const |
| Entity rotation. | |
| void | setPosition (const vector &pos) |
| Set the entity position. More... | |
| void | setRotation (const vector &rot) |
| Set the entity rotation. More... | |
| Entity * | parent () const |
| The parent entity. More... | |
| void | setParent (Entity *) |
| Set the parent entity. More... | |
| Scene * | scene () const |
| The scene of the entity. | |
| void | setScene (Scene *) |
| Set the scene of the entity. More... | |
| const std::unordered_set< Entity * > & | children () const |
| Entity children. | |
| void | addChild (Entity *) |
| Add a child. More... | |
| void | removeChild (Entity *) |
| Remove a child. More... | |
| template<class T > | |
| void | queryAll (std::list< const T *> &list) const |
| Get the list of a specific type of entity. More... | |
Protected Attributes | |
| rt::photon | _p |
Additional Inherited Members | |
Public Types inherited from rt::Light | |
| enum | Type { Constant, Sinus, Quadratic } |
Omnidirectional light source.
This class describes a light source that emit photons in all directions.
|
virtual |
Global distance between the light and a position.
| from | a location vector described in global space. |
Implements rt::Light.
1.8.15