Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9497 in orxonox.OLD


Ignore:
Timestamp:
Jul 27, 2006, 11:20:28 AM (18 years ago)
Author:
bensch
Message:

coloring for the hovers

Location:
branches/proxy/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/particles/particle_system.cc

    r9406 r9497  
    5555
    5656/**
    57  * standard deconstructor
    58 */
     57 * @brief standard deconstructor
     58 */
    5959ParticleSystem::~ParticleSystem()
    6060{
     
    8484
    8585/**
    86  * loads Parameters from a TiXmlElement
     86 * @brief loads Parameters from a TiXmlElement
    8787 * @param root the XML-element to load from.
    8888 */
     
    241241
    242242/**
     243 * @brief sets a key in the color-animation on a per-particle basis
     244 * @param lifeCycleTime: the time (partilceLifeTime/particleAge) [0-1]
     245 * @param color the Color.
     246 */
     247void ParticleSystem::setColor(float lifeCycleTime, const Color& color)
     248{
     249  this->setColor(lifeCycleTime, color.r(), color.g(), color.b(), color.a());
     250}
     251
     252
     253/**
    243254 * @brief adds an Emitter to this System.
    244255 * @param emitter the Emitter to add.
  • branches/proxy/src/lib/particles/particle_system.h

    r7300 r9497  
    1313#include "vector.h"
    1414#include <list>
     15#include "color.h"
    1516
    1617#include "quick_animation.h"
     
    7172  void setMass(float lifeCycleTime, float mass, float randMass = 0.0);
    7273  void setColor(float lifeCycleTime, float red, float green, float blue, float alpha);
     74  void setColor(float lifeCycleTime, const Color& color);
    7375
    7476  /** @returns the lifespan of the particles */
  • branches/proxy/src/lib/util/color.h

    r8986 r9497  
    4848  inline const Color& operator-=(const Color& c) { r()-=c.r(); g()-=c.g(); b()-=c.b(); a()-=c.a(); return *this; };
    4949  inline Color operator-(const Color& c) const { return Color(r()-c.r(), g()-c.g(), b()-c.b(), a()-c.a()); };
     50  inline const Color& operator*=(float v) { r()*=v, g()*=v, b()*=v, a()*=v; return *this; };
    5051  inline Color operator*(float v) const { return Color(r()*v, g()*v, b()*v, a()*v); };
    5152
  • branches/proxy/src/world_entities/space_ships/turbine_hover.cc

    r9494 r9497  
    233233}
    234234
     235
     236void TurbineHover::setBoostColor(const Color& color)
     237{
     238  this->burstSystem->setColor(0.0, color);
     239  this->burstSystem->setColor(0.2, color * 0.6);
     240  this->burstSystem->setColor(0.5, color * .3 + Color(0.5, 0.5, 0.8, 0.3));
     241  this->burstSystem->setColor(1.0, 0.8, 0.8, 0.8, 0.0);
     242}
     243
    235244void TurbineHover::setPlayDirection(const Quaternion& rot, float speed)
    236245{
  • branches/proxy/src/world_entities/space_ships/turbine_hover.h

    r8490 r9497  
    1010#include "playable.h"
    1111
     12#include "color.h"
     13
    1214// Forward Declaration
    1315class ParticleEmitter;
     
    2022    TurbineHover(const TiXmlElement* root = NULL);
    2123    virtual ~TurbineHover();
     24
     25    void setBoostColor(const Color& color);
    2226
    2327    virtual void loadParams(const TiXmlElement* root);
Note: See TracChangeset for help on using the changeset viewer.