Spare a reinterpret_cast in Color::apply()
svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglhelperclasses.cpp; revision=596670
m_alpha = 1.0;
}
-Color& Color::operator=( const Color& other )
-{
- m_red = other.m_red;
- m_green = other.m_green;
- m_blue = other.m_blue;
- m_alpha = other.m_alpha;
-
- return *this;
-}
-
void Color::applyAsMaterials()
{
GLfloat ambientColor [] = { m_red / 2, m_green / 2, m_blue / 2,
* the atom should be rendered. */
Color( const OpenBabel::OBAtom *atom );
- Color& operator=( const Color& other );
-
/**
* Sets this color to be the one used by OpenGL for rendering
* when lighting is disabled. */
inline void apply()
{
- glColor4fv( reinterpret_cast<GLfloat *>( this ) );
+ glColor4fv( &m_red );
}
/**