Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6781 in orxonox.OLD for branches/network/src/lib/graphics


Ignore:
Timestamp:
Jan 26, 2006, 7:15:22 PM (19 years ago)
Author:
patrick
Message:

network: billboard compiles again

Location:
branches/network/src/lib/graphics/render2D
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/graphics/render2D/billboard.cc

    r6779 r6781  
    6262
    6363  this->setLayer(E2D_LAYER_TOP);
    64   this->setRotationSpeed(5);
    6564  this->setSize(GraphicsEngine::getInstance()->getResolutionX()/10.0, GraphicsEngine::getInstance()->getResolutionY()/10.0);
    6665
     
    6867  this->material = new Material;
    6968  this->setTexture("pictures/error_texture.png");
    70   this->bBillboarding = false;
    7169}
    7270
     
    8583      .describe("the Speed with which the Billboard should rotate");
    8684
    87   LoadParam(root, "billboarding", this, Billboard, toggleBillboard)
    88       .describe("sets the Billboard to always look in the direction of the Player");
     85
    8986}
    9087
     
    126123void Billboard::tick(float dt)
    127124{
    128   // let the crosshair rotate
    129   //this->shiftDir2D(dt * rotationSpeed);
    130 
    131 
    132125  float z = 0.0f;
    133126  glReadPixels ((int)this->getAbsCoor2D().x,
     
    138131                 GL_FLOAT,
    139132                 &z);
    140 
    141133
    142134  GLdouble objX=.0, objY=.0, objZ=.0;
     
    150142               &objY,
    151143               &objZ );
    152 
    153   //this->setAbsCoor(objX, objY, objZ);
    154144}
    155145
    156146
    157147/**
    158  * draws the crosshair
     148 * draws the billboard
    159149 */
    160150void Billboard::draw() const
  • branches/network/src/lib/graphics/render2D/billboard.h

    r6779 r6781  
    44 */
    55
    6 #ifndef _IMAGE_ENTITY_H
    7 #define _IMAGE_ENTITY_H
     6#ifndef _BILLBOARD_H
     7#define _BILLBOARD_H
    88
    99#include "p_node.h"
     
    1414
    1515
    16 // FORWARD DECLARATION
     16
    1717class Model;
    1818class Material;
     
    2020
    2121//! A class that enables the
    22 class Billboard : public PNode, public Element2D {
     22class Billboard :  public Element2D
     23{
    2324
    2425  public:
     
    3839    virtual void draw() const;
    3940
     41
    4042  private:
    41     Material*        material;             //!< a material for the Aim.
     43    Material*        material;             //!< a material for the Billboard
    4244    float            rotationSpeed;        //!< Speed of the Rotation.
    43     bool             bBillboarding;        //!< true if billboarding is on
     45
     46    PNode*           source;               //!< the source attached to it
     47
    4448};
    4549
    46 #endif /* _IMAGE_ENTITY_H */
     50#endif /* _BILLBOARD_H */
Note: See TracChangeset for help on using the changeset viewer.