7 #ifndef _MGSPOTLIGHT_HH_
8 #define _MGSPOTLIGHT_HH_
10 #include "mgGL/PointLight.h"
38 float ambientIntensity,
42 const float attenuation[3],
65 void setDirection(
const MGVector& direction);
67 for(
int i=0; i<3; i++) m_direction[i]=direction[i];
74 void getDirection(
MGVector& direction);
76 for(
int i=0; i<3; i++) direction[i]=m_direction[i];
98 std::string
whoami()
const{
return "SpotLight";};
106 std::ostream&
out(std::ostream&)
const;
123 float m_direction[3];
131 #endif // _MGSPOTLIGHT_HH_
float getCutOffAngle()
Definition: SpotLight.h:88
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
float getExponent()
Definition: SpotLight.h:85
virtual void ReadMembers(MGIfstream &buf)
Read all member data.
MGPointLight is a point light source that radiates equally in all directions.
Definition: PointLight.h:24
void setDirection(float v0, float v1, float v2)
Definition: SpotLight.h:69
MGPointLight & operator=(const MGGel &gel2)
virtual ~MGPointLight();
void getDirection(float direction[3])
Definition: SpotLight.h:75
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
bool operator<(const MGPointLight &gel2) const
comparison
virtual void WriteMembers(MGOfstream &buf) const
Write all member data.
void setExponent(float exponent)
Definition: SpotLight.h:84
A directional light source.
Definition: SpotLight.h:22
Vector of a general n space dimension.
Definition: Vector.h:26
std::string whoami() const
Definition: SpotLight.h:98
Definition: SpotLight.h:29
virtual std::ostream & out(std::ostream &) const
Output virtual function.
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
Represent a positional data.
Definition: Position.h:28
void setCutOffAngle(float cutOffAngle)
Definition: SpotLight.h:87
virtual MGPointLight * clone() const
Generate a newed clone object.
void getDirection(float &v0, float &v1, float &v2)
Definition: SpotLight.h:78
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
void setDirection(const float direction[3])
Definition: SpotLight.h:66
virtual void transform(const MGVector &v)
Transform the gel by the argument.
long identify_type() const
Return This object's typeID.
Definition: SpotLight.h:96
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30