Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2011, 5:40:16 PM (13 years ago)
Author:
dafrick
Message:

Merging spaceboundaries2 branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/graphics/Billboard.cc

    r7492 r8614  
    2323 *      Fabian 'x3n' Landau
    2424 *   Co-authors:
     25 *      Maurus Kaufmann
    2526 *      ...
    2627 *
     
    3031
    3132#include "OgreBillboard.h"
    32 #include "OgreBillboardSet.h"
    3333
    3434#include "core/CoreIncludes.h"
     
    4646
    4747        this->colour_ = ColourValue::White;
    48         //this->rotation_ = 0;
     48        this->rotation_ = 0;
    4949
    5050        this->registerVariables();
     
    6666        XMLPortParam(Billboard, "material", setMaterial, getMaterial, xmlelement, mode);
    6767        XMLPortParam(Billboard, "colour",   setColour,   getColour,   xmlelement, mode).defaultValues(ColourValue::White);
    68         //XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);
     68        XMLPortParam(Billboard, "rotation", setRotation, getRotation, xmlelement, mode).defaultValues(0);
    6969    }
    7070
     
    7373        registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
    7474        registerVariable(this->colour_,   VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
    75         //registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
     75        registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
    7676    }
    7777
     
    8989                     this->attachOgreObject(this->billboard_.getBillboardSet());
    9090                this->billboard_.setVisible(this->isVisible());
    91                 //this->changedRotation();
     91                this->changedRotation();
    9292            }
    9393        }
     
    114114    }
    115115
    116 /*
     116
    117117    void Billboard::changedRotation()
    118118    {
     
    128128        }
    129129    }
    130 */
     130
    131131
    132132    void Billboard::changedVisibility()
     
    136136        this->billboard_.setVisible(this->isVisible());
    137137    }
     138   
     139    void Billboard::setBillboardType(Ogre::BillboardType bbt)
     140    {
     141        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
     142        if( bSet != NULL )
     143        {
     144            bSet->setBillboardType(bbt);
     145        }
     146    }
     147   
     148    void Billboard::setCommonDirection(Vector3 vec)
     149    {
     150        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
     151        if( bSet != NULL )
     152        {
     153            bSet->setCommonDirection( vec );
     154        }
     155    }
     156           
     157    void Billboard::setCommonUpVector(Vector3 vec)
     158    {
     159        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
     160        if( bSet != NULL )
     161        {
     162            bSet->setCommonUpVector( vec );
     163        }
     164    }
     165   
     166    void Billboard::setDefaultDimensions(float width, float height)
     167    {
     168        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
     169        if( bSet != NULL )
     170        {
     171            bSet->setDefaultDimensions(width, height);
     172        }
     173    }
    138174}
Note: See TracChangeset for help on using the changeset viewer.