Developer documentation | Axl-2.5.1

axlLight Class Reference

Class axlLight defines 3D lights. More...

#include <axlLight.h>

Inheritance diagram for axlLight:

Public Slots

void onPositionChanged (axlPoint *position)
 
void setColor (const QColor &color)
 
void setOpacity (const double &opacity)
 
void setShader (const QString &shader)
 

Public Member Functions

 axlLight (QObject *parent=0)
 Constructs a axel light of zero position with parent parent of QObject type. More...
 
 axlLight (double x, double y, double z=0, QObject *parent=0)
 Constructs a axel light of position (x, y, z) with parent parent of QObject type. More...
 
 axlLight (double *position, double *ambiant, double *diffuse, double *specular, double exponent, QObject *parent=0)
 
 axlLight (const axlLight &other)
 Constructs a copy of other. More...
 
 ~axlLight (void)
 Destroys the axel light. More...
 
virtual QString description (void) const
 
double x (void) const
 Returns x-coordinate of this light. More...
 
double y (void) const
 Returns y-coordinate of this light. More...
 
double z (void) const
 Returns z-coordinate of this light. More...
 
double * position (void) const
 Returns position of this light. More...
 
double * ambiant (void) const
 
double * diffuse (void) const
 
double * specular (void) const
 
double exponent (void) const
 
void setPosition (axlPoint *position)
 
void setAmbiant (axlPoint *ambiant)
 
void setDiffuse (axlPoint *diffuse)
 
void setSpecular (axlPoint *specular)
 
void setExponent (double position)
 
const QColor & color (void) const
 
const double & opacity (void) const
 
const QString & shader (void) const
 

Properties

QColor color
 
double opacity
 
QString shader
 

Detailed Description

Class axlLight defines 3D lights.

This class enables to represent and manipulate 3D lights.

Example:

axlLight *A = new axlLight(0.0, 0.0, 0.0);
axlLight *B = new axlLight(1.0, 0.0, 0.0);
double length = axlLight::distance(A, B);
axlLight middle = *(A);
middle += *(B);
middle /= 2.;

Definition at line 33 of file axlLight.h.

Constructor & Destructor Documentation

axlLight::axlLight ( QObject *  parent = 0)

Constructs a axel light of zero position with parent parent of QObject type.

The parent of an object may be viewed as the object's owner. The destructor of a parent object destroys all child objects. Setting parent to 0 constructs a axel light with no parent.

Definition at line 58 of file axlLight.cpp.

axlLight::axlLight ( double  x,
double  y,
double  z = 0,
QObject *  parent = 0 
)

Constructs a axel light of position (x, y, z) with parent parent of QObject type.

The parent of an object may be viewed as the object's owner. The destructor of a parent object destroys all child objects. Setting parent to 0 constructs a axel light with no parent.

Definition at line 87 of file axlLight.cpp.

axlLight::axlLight ( double *  position,
double *  ambiant,
double *  diffuse,
double *  specular,
double  exponent,
QObject *  parent = 0 
)

Definition at line 109 of file axlLight.cpp.

axlLight::axlLight ( const axlLight other)

Constructs a copy of other.

Definition at line 128 of file axlLight.cpp.

axlLight::~axlLight ( void  )

Destroys the axel light.

Definition at line 155 of file axlLight.cpp.

Member Function Documentation

double * axlLight::ambiant ( void  ) const

Definition at line 200 of file axlLight.cpp.

const QColor & axlLight::color ( void  ) const

Definition at line 259 of file axlLight.cpp.

QString axlLight::description ( void  ) const
virtual

Definition at line 334 of file axlLight.cpp.

double * axlLight::diffuse ( void  ) const

Definition at line 205 of file axlLight.cpp.

double axlLight::exponent ( void  ) const

Definition at line 215 of file axlLight.cpp.

void axlLight::onPositionChanged ( axlPoint position)
slot

Definition at line 251 of file axlLight.cpp.

const double & axlLight::opacity ( void  ) const

Definition at line 269 of file axlLight.cpp.

double * axlLight::position ( void  ) const

Returns position of this light.

Definition at line 195 of file axlLight.cpp.

void axlLight::setAmbiant ( axlPoint ambiant)

Definition at line 226 of file axlLight.cpp.

void axlLight::setColor ( const QColor &  color)
slot

Definition at line 264 of file axlLight.cpp.

void axlLight::setDiffuse ( axlPoint diffuse)

Definition at line 232 of file axlLight.cpp.

void axlLight::setExponent ( double  position)

Definition at line 244 of file axlLight.cpp.

void axlLight::setOpacity ( const double &  opacity)
slot

Definition at line 274 of file axlLight.cpp.

void axlLight::setPosition ( axlPoint position)

Definition at line 220 of file axlLight.cpp.

void axlLight::setShader ( const QString &  shader)
slot

Definition at line 285 of file axlLight.cpp.

void axlLight::setSpecular ( axlPoint specular)

Definition at line 238 of file axlLight.cpp.

const QString & axlLight::shader ( void  ) const

Definition at line 279 of file axlLight.cpp.

double * axlLight::specular ( void  ) const

Definition at line 210 of file axlLight.cpp.

double axlLight::x ( void  ) const

Returns x-coordinate of this light.

Definition at line 168 of file axlLight.cpp.

double axlLight::y ( void  ) const

Returns y-coordinate of this light.

Definition at line 177 of file axlLight.cpp.

double axlLight::z ( void  ) const

Returns z-coordinate of this light.

Definition at line 186 of file axlLight.cpp.

Property Documentation

QColor axlLight::color
readwrite

Definition at line 36 of file axlLight.h.

double axlLight::opacity
readwrite

Definition at line 37 of file axlLight.h.

QString axlLight::shader
readwrite

Definition at line 38 of file axlLight.h.


The documentation for this class was generated from the following files: