Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7807 in orxonox.OLD


Ignore:
Timestamp:
May 24, 2006, 3:21:13 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: renamed fake-billboard to imageplane and created new billboard

Location:
branches/atmospheric_engine/src
Files:
8 edited
2 copied
2 moved

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/defs/class_id.h

    r7679 r7807  
    218218
    219219        CL_IMAGE_ENTITY               =    0x00000513,
    220         CL_BILLBOARD                  =    0x00000514,
     220        CL_IMAGE_PLANE               =    0x00000514,
    221221        CL_MODEL_ENTITY               =    0x00000515,
    222222        CL_TEXT_ELEMENT               =    0x00000516, /// TODO MOVE
     
    281281        CL_GRAPHICS_EFFECT            =    0x00a01000,
    282282
     283  CL_BILLBOARD                   =    0x00000a01,
    283284        CL_SUN_EFFECT                 =    0x00a02000,
    284285        CL_WEATHER_EFFECT             =    0x00a04000,
  • branches/atmospheric_engine/src/lib/graphics/Makefile.am

    r7679 r7807  
    1010                           render2D/render_2d.cc \
    1111                           render2D/element_2d.cc \
    12                            render2D/billboard.cc \
     12                           render2D/image_plane.cc \
    1313                           \
    1414                           text_engine/text_engine.cc \
     
    3535                 render2D/render_2d.h \
    3636                 render2D/element_2d.h \
    37                  render2D/billboard.h \
     37                 render2D/image_plane.h \
    3838                 \
    3939                 text_engine/text_engine.h \
  • branches/atmospheric_engine/src/lib/graphics/effects/lense_flare.cc

    r7316 r7807  
    2828#include "state.h"
    2929
    30 #include "render2D/billboard.h"
     30#include "render2D/image_plane.h"
    3131
    3232#include "light.h"
     
    8080LenseFlare::~LenseFlare()
    8181{
    82   std::vector<Billboard*>::iterator it;
     82  std::vector<ImagePlane*>::iterator it;
    8383  for( it = flares.begin(); it != flares.end(); it++)
    8484    delete (*it);
     
    155155  }
    156156
    157   Billboard* bb = new Billboard(NULL);
     157  ImagePlane* bb = new ImagePlane(NULL);
    158158  bb->setTexture(textureName);
    159159  bb->setSize(50, 50);
    160160  this->flares.push_back(bb);
    161   PRINTF(4)("Added a Lenseflare Billboard with texture %s\n", textureName.c_str());
     161  PRINTF(4)("Added a Lenseflare ImagePlane with texture %s\n", textureName.c_str());
    162162
    163163  // the first flare belongs to the light source
     
    178178  float dist = this->frustumPlane.distancePoint(this->lightSource->getAbsCoor());
    179179  PRINTF(0)("dist: %f\n", dist);
    180   std::vector<Billboard*>::const_iterator it;
     180  std::vector<ImagePlane*>::const_iterator it;
    181181    for(it = flares.begin(); it != flares.end(); it++)
    182182      (*it)->setVisibility(visibility);
     
    220220
    221221  // now calculate the new coordinates of the billboards
    222   std::vector<Billboard*>::iterator it;
     222  std::vector<ImagePlane*>::iterator it;
    223223  int i;
    224224  for( it = flares.begin(), i = 0; it != flares.end(); it++, i++)
  • branches/atmospheric_engine/src/lib/graphics/effects/lense_flare.h

    r7316 r7807  
    2020class TiXmlElement;
    2121class Light;
    22 class Billboard;
     22class ImagePlane;
    2323
    2424//! A class that handles LenseFlares. The LenseFlareManager operates on this.
     
    5050    float                    isVisible;          //!< Checks visibility
    5151    Light*                   lightSource;        //!< reference to the sun (or primary light source)
    52     std::vector<Billboard*>  flares;             //!< the flares array
     52    std::vector<ImagePlane*>  flares;             //!< the flares array
    5353
    5454    Vector2D                 flareVector;        //!< the axis to draw the flares on
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc

    r7699 r7807  
    1515#include "lightening_effect.h"
    1616
     17#include "state.h"
    1718#include "util/loading/load_param.h"
    1819#include "util/loading/factory.h"
    19 #include "render2D/billboard.h"
     20#include "render2D/image_plane.h"
    2021
    2122#include "glincl.h"
     
    3132 
    3233 
    33   lightening = new Billboard(NULL);
    34   lightening->setTexture("pictures/lense_flare/lens2.png");
     34  lightening = new ImagePlane(NULL);
     35  lightening->setTexture("maps/lightning_bolt.png");
    3536  lightening->setSize(50, 50);
    36   lightening->setAbsCoor2D(0,0);
     37  lightening->setAbsCoor2D(10,10);
    3738  lightening->setVisibility(true);
     39 
    3840 
    3941        this->init();
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.h

    r7699 r7807  
    1515
    1616
    17 class Billboard;
     17class ImagePlane;
    1818
    1919class LighteningEffect : public WeatherEffect
     
    3333
    3434        private:
    35     Billboard* lightening;
     35    ImagePlane* lightening;
    3636
    3737};
  • branches/atmospheric_engine/src/lib/graphics/render2D/image_plane.cc

    r7799 r7807  
    1515#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
    1616
    17 #include "billboard.h"
     17#include "image_plane.h"
    1818
    1919#include "util/loading/load_param.h"
     
    3030
    3131
    32 CREATE_FACTORY(Billboard, CL_IMAGE_ENTITY);
     32CREATE_FACTORY(ImagePlane, CL_IMAGE_ENTITY);
    3333
    3434
     
    3636 * standart constructor
    3737 */
    38 Billboard::Billboard (const TiXmlElement* root)
     38ImagePlane::ImagePlane (const TiXmlElement* root)
    3939{
    4040  this->init();
     
    4646
    4747/**
    48  * destroys a Billboard
     48 * destroys a ImagePlane
    4949 */
    50 Billboard::~Billboard ()
     50ImagePlane::~ImagePlane ()
    5151{
    5252  if (this->material)
     
    5656
    5757/**
    58  * initializes the Billboard
     58 * initializes the ImagePlane
    5959 */
    60 void Billboard::init()
     60void ImagePlane::init()
    6161{
    62   this->setClassID(CL_BILLBOARD, "Billboard");
    63   this->setName("Billboard");
     62  this->setClassID(CL_IMAGE_PLANE, "ImagePlane");
     63  this->setName("ImagePlane");
    6464
    6565  this->setLayer(E2D_LAYER_TOP);
     
    7676 * @param root TiXmlElement object
    7777 */
    78 void Billboard::loadParams(const TiXmlElement* root)
     78void ImagePlane::loadParams(const TiXmlElement* root)
    7979{
    8080  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
    81       .describe("the texture-file to load onto the Billboard");
     81      .describe("the texture-file to load onto the ImagePlane");
    8282
    83   LoadParam(root, "size", this, Billboard, setSize)
    84       .describe("the size of the Billboard in Pixels");
     83  LoadParam(root, "size", this, ImagePlane, setSize)
     84      .describe("the size of the ImagePlane in Pixels");
    8585}
    8686
    8787
    8888/**
    89  * sets the size of the Billboard.
     89 * sets the size of the ImagePlane.
    9090 * @param size the size in pixels
    9191 */
    92 void Billboard::setSize(float sizeX, float sizeY)
     92void ImagePlane::setSize(float sizeX, float sizeY)
    9393{
    9494  this->setSize2D(sizeX, sizeY);
     
    100100 * @param textureFile The texture-file to load onto the crosshair
    101101 */
    102 void Billboard::setTexture(const std::string& textureFile)
     102void ImagePlane::setTexture(const std::string& textureFile)
    103103{
    104104  this->material->setDiffuseMap(textureFile);
     
    107107
    108108/**
    109  * attaches this billboard to a parent
     109 * attaches this image_plane to a parent
    110110 * @param pNode node to attach to
    111111 */
    112 void Billboard::attachTo(PNode* pNode)
     112void ImagePlane::attachTo(PNode* pNode)
    113113{
    114114  this->source->setParent(pNode);
     
    117117
    118118/**
    119  * ticks the Billboard
     119 * ticks the ImagePlane
    120120 * @param dt the time to ticks
    121121 */
    122 void Billboard::tick(float dt)
     122void ImagePlane::tick(float dt)
    123123{
    124124  float z = 0.0f;
     
    145145
    146146/**
    147  * draws the billboard
     147 * draws the image_plane
    148148 */
    149 void Billboard::draw() const
     149void ImagePlane::draw() const
    150150{
    151151  if( !this->isVisible())
  • branches/atmospheric_engine/src/lib/graphics/render2D/image_plane.h

    r7799 r7807  
    11/*!
    2  * @file billboard.h
    3  *  Definition of a billboard
     2 * @file image_plane.h
     3 *  Definition of a image_plane
    44 */
    55
    6 #ifndef _BILLBOARD_H
    7 #define _BILLBOARD_H
     6#ifndef _IMAGE_PLANE_H
     7#define _IMAGE_PLANE_H
    88
    99
     
    1414
    1515
    16 class Model;
    1716class Material;
    1817class TiXmlElement;
    1918
    2019//! A class that enables the
    21 class Billboard :  public Element2D
     20class ImagePlane :  public Element2D
    2221{
    2322
    2423  public:
    25     Billboard(const TiXmlElement* root = NULL);
    26     virtual ~Billboard();
     24    ImagePlane(const TiXmlElement* root = NULL);
     25    virtual ~ImagePlane();
    2726
    2827    void init();
     
    3837
    3938  private:
    40     Material*        material;             //!< a material for the Billboard
     39    Material*        material;             //!< a material for the ImagePlane
    4140    float            rotationSpeed;        //!< Speed of the Rotation.
    4241
     
    4544};
    4645
    47 #endif /* _BILLBOARD_H */
     46#endif /* _IMAGE_PLANE_H */
  • branches/atmospheric_engine/src/util/multiplayer_team_deathmatch.cc

    r7221 r7807  
    2020#include "util/loading/factory.h"
    2121
    22 #include "render2D/billboard.h"
     22#include "render2D/image_plane.h"
    2323#include "state.h"
    2424#include "class_list.h"
     
    5353  this->timeout = 0.0f;
    5454
    55   this->deathScreen = new Billboard();
     55  this->deathScreen = new ImagePlane();
    5656  this->deathScreen->setSize(State::getResX()/4.0, State::getResY()/4.0);
    5757  this->deathScreen->setAbsCoor2D(State::getResX()/2.0f, State::getResY()/2.0f);
  • branches/atmospheric_engine/src/util/multiplayer_team_deathmatch.h

    r7221 r7807  
    1616class ObjectManager;
    1717class Player;
    18 class Billboard;
     18class ImagePlane;
    1919
    2020
     
    5252    int                teamBKills;                 //!< kills of team B
    5353
    54     Billboard*         deathScreen;                //!< the death screen
     54    ImagePlane*         deathScreen;                //!< the death screen
    5555};
    5656
  • branches/atmospheric_engine/src/world_entities/effects/billboard.h

    r7799 r7807  
    22 * @file lightning_bolt.h
    33 * @brief a LightningBolt Projectile
    4  *  Der Effekt soll folgendermaßen funktionieren:
    5  * -> Ein Partikel mit einer Blitz-Textur soll sehr schnell erscheinen,
    6  * -> während er an Intensität zunimmt soll die Beleuchtung der gerenderten Szene entsprechend zunehmen.
    7  * -> Je mehr Blitze zum gleichen Zeitpunkt sichtbar sind, desto heller soll die Beleuchtung werden, das heißt die Helligkeitszunahme pro Blitz soll Additiv sein.
    8  * -> Ein Partikel soll ebenfalls sehr schnell wieder verblassen, dabei soll die Beleuchtung entsprechend der vorhergehenden Zunahme wieder abnehmen (Additiv)
    94 */
    105
Note: See TracChangeset for help on using the changeset viewer.