INFO804 Introduction à l'informatique graphique
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rt::Light Struct Referenceabstract

Lights are used to give lights in a scene. More...

#include <Light.h>

Inheritance diagram for rt::Light:
rt::PointLight

Public Member Functions

 Light ()
 Default constructor. Nothing to do.
 
virtual ~Light ()
 Virtual destructor since object contains virtual methods.
 
virtual void init (Viewer &)=0
 
virtual void light (Viewer &)=0
 
virtual void draw (Viewer &)=0
 
virtual Vector3 direction (const Vector3 &) const =0
 
virtual Color color (const Vector3 &) const =0
 

Detailed Description

Lights are used to give lights in a scene.

Definition at line 17 of file Light.h.

Constructor & Destructor Documentation

◆ Light()

rt::Light::Light ( )
inline

Default constructor. Nothing to do.

Definition at line 20 of file Light.h.

20{}

◆ ~Light()

virtual rt::Light::~Light ( )
inlinevirtual

Virtual destructor since object contains virtual methods.

Definition at line 23 of file Light.h.

23{}

Member Function Documentation

◆ color()

virtual Color rt::Light::color ( const Vector3 ) const
pure virtual
Returns
the color of this light viewed from the given point p.

Implemented in rt::PointLight.

◆ direction()

virtual Vector3 rt::Light::direction ( const Vector3 ) const
pure virtual

Given the point p, returns the normalized direction to this light.

Implemented in rt::PointLight.

◆ draw()

virtual void rt::Light::draw ( Viewer )
pure virtual

This method is called by Scene::draw() at each frame to redisplay objects in the OpenGL window.

Implemented in rt::PointLight.

◆ init()

virtual void rt::Light::init ( Viewer )
pure virtual

This method is called by Scene::init() at the beginning of the display in the OpenGL window.

Implemented in rt::PointLight.

◆ light()

virtual void rt::Light::light ( Viewer )
pure virtual

This method is called by Scene::light() at each frame to set the lights in the OpenGL window.

Implemented in rt::PointLight.


The documentation for this struct was generated from the following file: