Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8435 in orxonox.OLD for branches/gui/src/lib/util


Ignore:
Timestamp:
Jun 15, 2006, 1:16:13 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fade to colors
now the gui can be looked at :)
at least a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/util/color.h

    r8431 r8435  
    3838
    3939  void setColor(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
     40  void setColor(const Color& c) { r() = c.r();  g()= c.g(); b() = c.b(); a() = c.a(); };
    4041
     42  inline float dist(const Color& c) const { return (sqrt((r()-c.r())*(r()-c.r()) + (g()-c.g())*(g()-c.g()) + (b()-c.b())*(b()-c.b()) + (a()-c.a())*(a()-c.a()))); }
    4143  /// Maths
    4244  inline const Color& operator+=(const Color& c) { r()+=c.r(); g()+=c.g(); b()+=c.b(); a()+=c.a(); return *this; };
Note: See TracChangeset for help on using the changeset viewer.