Changeset 7807 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/render2D
- Timestamp:
- May 24, 2006, 3:21:13 PM (19 years ago)
- Location:
- branches/atmospheric_engine/src/lib/graphics/render2D
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/render2D/image_plane.cc
r7799 r7807 15 15 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON 16 16 17 #include " billboard.h"17 #include "image_plane.h" 18 18 19 19 #include "util/loading/load_param.h" … … 30 30 31 31 32 CREATE_FACTORY( Billboard, CL_IMAGE_ENTITY);32 CREATE_FACTORY(ImagePlane, CL_IMAGE_ENTITY); 33 33 34 34 … … 36 36 * standart constructor 37 37 */ 38 Billboard::Billboard(const TiXmlElement* root)38 ImagePlane::ImagePlane (const TiXmlElement* root) 39 39 { 40 40 this->init(); … … 46 46 47 47 /** 48 * destroys a Billboard48 * destroys a ImagePlane 49 49 */ 50 Billboard::~Billboard()50 ImagePlane::~ImagePlane () 51 51 { 52 52 if (this->material) … … 56 56 57 57 /** 58 * initializes the Billboard58 * initializes the ImagePlane 59 59 */ 60 void Billboard::init()60 void ImagePlane::init() 61 61 { 62 this->setClassID(CL_ BILLBOARD, "Billboard");63 this->setName(" Billboard");62 this->setClassID(CL_IMAGE_PLANE, "ImagePlane"); 63 this->setName("ImagePlane"); 64 64 65 65 this->setLayer(E2D_LAYER_TOP); … … 76 76 * @param root TiXmlElement object 77 77 */ 78 void Billboard::loadParams(const TiXmlElement* root)78 void ImagePlane::loadParams(const TiXmlElement* root) 79 79 { 80 80 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"); 82 82 83 LoadParam(root, "size", this, Billboard, setSize)84 .describe("the size of the Billboardin Pixels");83 LoadParam(root, "size", this, ImagePlane, setSize) 84 .describe("the size of the ImagePlane in Pixels"); 85 85 } 86 86 87 87 88 88 /** 89 * sets the size of the Billboard.89 * sets the size of the ImagePlane. 90 90 * @param size the size in pixels 91 91 */ 92 void Billboard::setSize(float sizeX, float sizeY)92 void ImagePlane::setSize(float sizeX, float sizeY) 93 93 { 94 94 this->setSize2D(sizeX, sizeY); … … 100 100 * @param textureFile The texture-file to load onto the crosshair 101 101 */ 102 void Billboard::setTexture(const std::string& textureFile)102 void ImagePlane::setTexture(const std::string& textureFile) 103 103 { 104 104 this->material->setDiffuseMap(textureFile); … … 107 107 108 108 /** 109 * attaches this billboardto a parent109 * attaches this image_plane to a parent 110 110 * @param pNode node to attach to 111 111 */ 112 void Billboard::attachTo(PNode* pNode)112 void ImagePlane::attachTo(PNode* pNode) 113 113 { 114 114 this->source->setParent(pNode); … … 117 117 118 118 /** 119 * ticks the Billboard119 * ticks the ImagePlane 120 120 * @param dt the time to ticks 121 121 */ 122 void Billboard::tick(float dt)122 void ImagePlane::tick(float dt) 123 123 { 124 124 float z = 0.0f; … … 145 145 146 146 /** 147 * draws the billboard147 * draws the image_plane 148 148 */ 149 void Billboard::draw() const149 void ImagePlane::draw() const 150 150 { 151 151 if( !this->isVisible()) -
branches/atmospheric_engine/src/lib/graphics/render2D/image_plane.h
r7799 r7807 1 1 /*! 2 * @file billboard.h3 * Definition of a billboard2 * @file image_plane.h 3 * Definition of a image_plane 4 4 */ 5 5 6 #ifndef _ BILLBOARD_H7 #define _ BILLBOARD_H6 #ifndef _IMAGE_PLANE_H 7 #define _IMAGE_PLANE_H 8 8 9 9 … … 14 14 15 15 16 class Model;17 16 class Material; 18 17 class TiXmlElement; 19 18 20 19 //! A class that enables the 21 class Billboard: public Element2D20 class ImagePlane : public Element2D 22 21 { 23 22 24 23 public: 25 Billboard(const TiXmlElement* root = NULL);26 virtual ~ Billboard();24 ImagePlane(const TiXmlElement* root = NULL); 25 virtual ~ImagePlane(); 27 26 28 27 void init(); … … 38 37 39 38 private: 40 Material* material; //!< a material for the Billboard39 Material* material; //!< a material for the ImagePlane 41 40 float rotationSpeed; //!< Speed of the Rotation. 42 41 … … 45 44 }; 46 45 47 #endif /* _ BILLBOARD_H */46 #endif /* _IMAGE_PLANE_H */
Note: See TracChangeset
for help on using the changeset viewer.