Changeset 6781 in orxonox.OLD for branches/network/src/lib/graphics/render2D
- Timestamp:
- Jan 26, 2006, 7:15:22 PM (19 years ago)
- Location:
- branches/network/src/lib/graphics/render2D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/graphics/render2D/billboard.cc
r6779 r6781 62 62 63 63 this->setLayer(E2D_LAYER_TOP); 64 this->setRotationSpeed(5);65 64 this->setSize(GraphicsEngine::getInstance()->getResolutionX()/10.0, GraphicsEngine::getInstance()->getResolutionY()/10.0); 66 65 … … 68 67 this->material = new Material; 69 68 this->setTexture("pictures/error_texture.png"); 70 this->bBillboarding = false;71 69 } 72 70 … … 85 83 .describe("the Speed with which the Billboard should rotate"); 86 84 87 LoadParam(root, "billboarding", this, Billboard, toggleBillboard) 88 .describe("sets the Billboard to always look in the direction of the Player"); 85 89 86 } 90 87 … … 126 123 void Billboard::tick(float dt) 127 124 { 128 // let the crosshair rotate129 //this->shiftDir2D(dt * rotationSpeed);130 131 132 125 float z = 0.0f; 133 126 glReadPixels ((int)this->getAbsCoor2D().x, … … 138 131 GL_FLOAT, 139 132 &z); 140 141 133 142 134 GLdouble objX=.0, objY=.0, objZ=.0; … … 150 142 &objY, 151 143 &objZ ); 152 153 //this->setAbsCoor(objX, objY, objZ);154 144 } 155 145 156 146 157 147 /** 158 * draws the crosshair148 * draws the billboard 159 149 */ 160 150 void Billboard::draw() const -
branches/network/src/lib/graphics/render2D/billboard.h
r6779 r6781 4 4 */ 5 5 6 #ifndef _ IMAGE_ENTITY_H7 #define _ IMAGE_ENTITY_H6 #ifndef _BILLBOARD_H 7 #define _BILLBOARD_H 8 8 9 9 #include "p_node.h" … … 14 14 15 15 16 // FORWARD DECLARATION 16 17 17 class Model; 18 18 class Material; … … 20 20 21 21 //! A class that enables the 22 class Billboard : public PNode, public Element2D { 22 class Billboard : public Element2D 23 { 23 24 24 25 public: … … 38 39 virtual void draw() const; 39 40 41 40 42 private: 41 Material* material; //!< a material for the Aim.43 Material* material; //!< a material for the Billboard 42 44 float rotationSpeed; //!< Speed of the Rotation. 43 bool bBillboarding; //!< true if billboarding is on 45 46 PNode* source; //!< the source attached to it 47 44 48 }; 45 49 46 #endif /* _ IMAGE_ENTITY_H */50 #endif /* _BILLBOARD_H */
Note: See TracChangeset
for help on using the changeset viewer.