|
Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
|
Geometric sphere. More...
#include <sphere.hpp>
Public Member Functions | |
| Sphere (double r) | |
| Make a new sphere at \((0, 0, 0)\). More... | |
| Sphere (const vector &pos, double r) | |
| Make a new sphere. More... | |
| double | ray () const |
| The ray of the sphere. | |
| void | setRay (double r) |
| Set the ray of the sphere. | |
| vector | normal (const vector &) const |
| Compute a normal of the sphere from a local position. More... | |
| vector | tangent (const vector &) const |
| Compute a tangent of the sphere from a local position. More... | |
| virtual vector | uv (const element &) const |
| UV-map a surface element on the sphere. More... | |
| virtual std::vector< hit > | hits (const euclidian &) const |
| Compute hits between the sphere and an euclidian. More... | |
Public Member Functions inherited from rt::Geometry | |
| Geometry (Entity *parent=0) | |
| Main constructor. More... | |
| Geometry (const vector &pos, Entity *parent=0) | |
| Make a new geometry from its position and parent. More... | |
| Geometry (double x, double y, double z, Entity *parent=0) | |
| Make a new geometry from its position and parent. More... | |
| virtual | ~Geometry ()=0 |
| Destructor. | |
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... | |
Geometric sphere.
| rt::Sphere::Sphere | ( | double | r | ) |
Make a new sphere at \((0, 0, 0)\).
| r |
| rt::Sphere::Sphere | ( | const vector & | pos, |
| double | r | ||
| ) |
Make a new sphere.
| pos | The location of the sphere |
| r | The ray of the sphere |
Compute hits between the sphere and an euclidian.
| e | An euclidian in the global space referential. |
Implements rt::Geometry.
Compute a normal of the sphere from a local position.
Compute a tangent of the sphere from a local position.
UV-map a surface element on the sphere.
Implements rt::Geometry.
1.8.15