kalzium
Avogadro::Color Class Reference
#include <avogadro/color.h>
List of all members.
Detailed Description
- Author:
- Benoit Jacob
- Author:
- Geoff Hutchison Color in OpenGL float red, green, blue, alpha format.
This class represents a color in OpenGL float red, green, blue, alpha format.
Definition at line 47 of file src/color.h.
Constructor & Destructor Documentation
| Avogadro::Color::Color |
( |
|
) |
|
| Avogadro::Color::~Color |
( |
|
) |
[virtual] |
| Avogadro::Color::Color |
( |
GLfloat |
red, |
|
|
GLfloat |
green, |
|
|
GLfloat |
blue, |
|
|
GLfloat |
alpha = 1.0 | |
|
) |
| | |
This constructor sets the four components of the color individually.
Each one ranges from 0.0 (lowest intensity) to 1.0 (highest intensity). For the alpha component, 0.0 means totally transparent and 1.0 (the default) means totally opaque.
Definition at line 49 of file color.cpp.
| Avogadro::Color::Color |
( |
const Primitive * |
p |
) |
|
Set the color based on the supplied Primitive.
If NULL is passed do nothing.
- Parameters:
-
| Primitive | the color is derived from this primitive. |
Definition at line 53 of file color.cpp.
Member Function Documentation
| float Avogadro::Color::alpha |
( |
|
) |
[inline] |
- Returns:
- the alpha component of the color.
Definition at line 145 of file src/color.h.
| virtual void Avogadro::Color::apply |
( |
|
) |
[inline, virtual] |
Sets this color to be the one used by OpenGL for rendering when lighting is disabled.
Definition at line 105 of file src/color.h.
| void Avogadro::Color::applyAsFlatMaterials |
( |
|
) |
[virtual] |
Applies an OpenGL material more appropriate for flat surfaces.
Definition at line 116 of file color.cpp.
| void Avogadro::Color::applyAsMaterials |
( |
|
) |
[virtual] |
Applies nice OpenGL materials using this color as the diffuse color while using different shades for the ambient and specular colors.
This is only useful if lighting is enabled.
Definition at line 94 of file color.cpp.
| float Avogadro::Color::blue |
( |
|
) |
[inline] |
- Returns:
- the blue component of the color.
Definition at line 141 of file src/color.h.
| QColor Avogadro::Color::color |
( |
|
) |
[inline] |
| float Avogadro::Color::green |
( |
|
) |
[inline] |
- Returns:
- the green component of the color.
Definition at line 137 of file src/color.h.
| QString Avogadro::Color::name |
( |
|
) |
const [virtual] |
- Returns:
- the name of this instance of the class.
Definition at line 131 of file color.cpp.
| Color & Avogadro::Color::operator= |
( |
const QColor & |
other |
) |
|
Set the color based on the supplied QColor.
- Parameters:
-
Definition at line 58 of file color.cpp.
| float Avogadro::Color::red |
( |
|
) |
[inline] |
- Returns:
- the red component of the color.
Definition at line 133 of file src/color.h.
| void Avogadro::Color::set |
( |
const Primitive * |
|
) |
[virtual] |
| void Avogadro::Color::set |
( |
GLfloat |
red, |
|
|
GLfloat |
green, |
|
|
GLfloat |
blue, |
|
|
GLfloat |
alpha = 1.0 | |
|
) |
| | [virtual] |
Set the four components of the color individually.
Each one ranges from 0.0 (lowest intensity) to 1.0 (highest intensity). For the alpha component, 0.0 means totally transparent and 1.0 (the default) means totally opaque.
Definition at line 68 of file color.cpp.
| void Avogadro::Color::setAlpha |
( |
double |
alpha |
) |
[virtual] |
Set the alpha component of the color, 0.0 means totally transparent and 1.0 means totally opaque.
Definition at line 89 of file color.cpp.
| void Avogadro::Color::setName |
( |
const QString & |
name |
) |
[virtual] |
Set the name of this instance of the class.
Definition at line 126 of file color.cpp.
| virtual QWidget* Avogadro::Color::settingsWidget |
( |
|
) |
[inline, virtual] |
- Returns:
- the widget for controlling settings for this color map or NULL if none exists.
Definition at line 163 of file src/color.h.
| void Avogadro::Color::setToSelectionColor |
( |
|
) |
[virtual] |
Set the color to the selection color By default, the selection color is (0.3, 0.6, 1.0, 0.7) which is a light transparent blue.
Definition at line 76 of file color.cpp.
| virtual QString Avogadro::Color::type |
( |
|
) |
const [inline, virtual] |
Member Data Documentation
The d-pointer used to preserve binary compatibility.
Definition at line 192 of file src/color.h.
The alpha component of the color ranging from 0 to 1.
Definition at line 182 of file src/color.h.
The blue component of the color ranging from 0 to 1.
Definition at line 182 of file src/color.h.
The green component of the color ranging from 0 to 1.
Definition at line 182 of file src/color.h.
The name of the class instance.
Definition at line 187 of file src/color.h.
The red component of the color ranging from 0 to 1.
Definition at line 182 of file src/color.h.
The documentation for this class was generated from the following files: