Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8947 in orxonox.OLD for branches/mountain_lake/src/lib/graphics


Ignore:
Timestamp:
Jun 30, 2006, 11:03:53 AM (19 years ago)
Author:
hdavid
Message:

branches/mountain_lake: cloud effect is scriptable

Location:
branches/mountain_lake/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/lib/graphics/effects/cloud_effect.cc

    r8946 r8947  
    2727#include "shell_command.h"
    2828#include "t_animation.h"
     29#include "script_class.h"
    2930
    3031#include "parser/tinyxml/tinyxml.h"
     
    4849SHELL_COMMAND(skyColor, CloudEffect, shellSkyColor);
    4950SHELL_COMMAND(cloudColor, CloudEffect, shellCloudColor);
     51
     52
     53CREATE_SCRIPTABLE_CLASS(CloudEffect, CL_CLOUD_EFFECT,
     54                        addMethod("shellSkyColor", ExecutorLua4<CloudEffect,float,float,float,float>(&CloudEffect::shellSkyColor))
     55                      ->addMethod("shellCloudColor", ExecutorLua4<CloudEffect,float,float,float,float>(&CloudEffect::shellCloudColor))
     56                       );
     57
    5058
    5159CREATE_FACTORY(CloudEffect, CL_CLOUD_EFFECT);
  • branches/mountain_lake/src/lib/graphics/effects/cloud_effect.h

    r8911 r8947  
    5050    virtual void deactivate();
    5151
    52     inline void activateCloud() {
     52    void activateCloud() {
    5353        this->activate();
    5454    }
    55 
    56     inline void deactivateCloud() {
     55    void deactivateCloud() {
    5756        this->deactivate();
    5857    }
    5958
    60     inline void setCloudOption(const std::string& option) {
     59    void setCloudOption(const std::string& option) {
    6160        if (option == "activate")
    6261            this->cloudActivate = true;
    6362    }
    6463
    65     inline void setAnimationSpeed(float speed) {
     64    void setAnimationSpeed(float speed) {
    6665        this->animationSpeed = speed;
    6766    }
    6867
    69     inline void setCloudScale(float scale) {
     68    void setCloudScale(float scale) {
    7069        this->scale = scale;
    7170    }
    7271
    73     inline void setCloudColor(float colorX, float colorY, float colorZ) {
     72    void setCloudColor(float colorX, float colorY, float colorZ) {
    7473        this->cloudColor = Vector(colorX, colorY, colorZ);
    7574    }
    7675
    77     inline void setSkyColor(float colorX, float colorY, float colorZ) {
     76    void setSkyColor(float colorX, float colorY, float colorZ) {
    7877        this->skyColor = Vector(colorX, colorY, colorZ);
    7978    }
    8079
    81     inline void setPlanetRadius(float planetRadius) {
     80    void setPlanetRadius(float planetRadius) {
    8281        this->planetRadius = planetRadius;
    8382    }
    8483
    85     inline void setAtmosphericRadius(float atmosphericRadius) {
     84    void setAtmosphericRadius(float atmosphericRadius) {
    8685        this->atmosphericRadius = atmosphericRadius;
    8786    }
    8887
    89     inline void setDivisions(int divs) {
     88    void setDivisions(int divs) {
    9089        this->divs = divs;
    9190    }
Note: See TracChangeset for help on using the changeset viewer.