Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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  
    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 */
Note: See TracChangeset for help on using the changeset viewer.