7 #ifndef _MGDIRECTIONAL_LIGHT_HH_
8 #define _MGDIRECTIONAL_LIGHT_HH_
10 #include "mgGL/Light.h"
34 float ambientIntensity,
58 void setDirection(
const MGVector& direction);
60 for(
int i=0; i<3; i++) m_direction[i]=direction[i];
68 void getDirection(
MGVector& direction)
const;
70 for(
int i=0; i<3; i++) direction[i]=m_direction[i];
81 std::string
whoami()
const{
return "DirectionalLight";};
89 std::ostream&
out(std::ostream&)
const;
107 float m_direction[3];
112 #endif // _MGDIRECTIONAL_LIGHT_HH_
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
void setDirection(const float direction[3])
Definition: DirectionalLight.h:59
std::string whoami() const
Definition: DirectionalLight.h:81
virtual std::ostream & out(std::ostream &) const
Output virtual function.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
void getDirection(float direction[3]) const
Definition: DirectionalLight.h:69
virtual void WriteMembers(MGOfstream &buf) const
Write all member data.
Vector of a general n space dimension.
Definition: Vector.h:26
MGLight is an abstract base class for light sources.
Definition: Light.h:27
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
virtual void transform(const MGVector &v)
Transform the gel by the argument.
Definition: Gel.h:176
virtual void ReadMembers(MGIfstream &buf)
Read all member data.
long identify_type() const
Return This object's typeID.
Definition: DirectionalLight.h:79
virtual bool operator<(const MGLight &gel2) const
comparison
void getDirection(float &v0, float &v1, float &v2) const
Definition: DirectionalLight.h:72
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
virtual MGLight * clone() const
Generate a newed clone object.
virtual MGLight & operator=(const MGGel &gel2)
virtual ~MGLight();
void setDirection(float v0, float v1, float v2)
Definition: DirectionalLight.h:62
MGDirectionalLight is a directional light source that approximates infinite light sources as the sun...
Definition: DirectionalLight.h:25
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30