Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2011, 1:11:04 PM (13 years ago)
Author:
FelixSchulthess
Message:

space boundary billboard is now animated. test run with myTestLevel.oxw

Location:
code/branches/presentation/src/orxonox/graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/graphics/Billboard.cc

    r8614 r8710  
    145145        }
    146146    }
    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     }
    174147}
  • code/branches/presentation/src/orxonox/graphics/Billboard.h

    r8614 r8710  
    6565                { return this->colour_; }
    6666
    67 
    6867            inline void setRotation(const Radian& rotation)
    6968                { this->rotation_ = rotation; this->changedRotation(); }
     
    7170                { return this->rotation_; }
    7271
     72            /// use normalised vector as argument
     73            inline void setCommonDirection(const Vector3 vec)
     74                { if(this->billboard_.getBillboardSet())
     75                    this->billboard_.getBillboardSet()->setCommonDirection(vec); }
     76            inline const Vector3 getCommonDirection()
     77                { if(this->billboard_.getBillboardSet())
     78                    return this->billboard_.getBillboardSet()->getCommonDirection(); }
     79
     80            /// use normalised vector as argument
     81            inline void setCommonUpVector(const Vector3 vec)
     82                { if(this->billboard_.getBillboardSet())
     83                    this->billboard_.getBillboardSet()->setCommonUpVector( vec ); }
     84            inline const Vector3 getCommonUpVector()
     85                { if(this->billboard_.getBillboardSet())
     86                    return this->billboard_.getBillboardSet()->getCommonUpVector(); }
    7387
    7488            virtual void setTeamColour(const ColourValue& colour)
     
    7791            void setBillboardType(Ogre::BillboardType bbt);
    7892           
    79             void setCommonDirection(Vector3 vec); //!< normalised Vector vec as argument
    80            
    81             void setCommonUpVector(Vector3 vec); //!< normalised Vector vec as argument
    82            
    83             void setDefaultDimensions(float width, float height);
     93            inline void setDefaultDimensions(float width, float height)
     94                { if(this->billboard_.getBillboardSet())
     95                    this->billboard_.getBillboardSet()->setDefaultDimensions(width, height); }
    8496
     97            inline void setTextureCoords(const Ogre::FloatRect* coords, unsigned int numCoords)
     98                { if(this->billboard_.getBillboardSet())
     99                    this->billboard_.getBillboardSet()->setTextureCoords(coords, numCoords); }
    85100
    86101        protected:
Note: See TracChangeset for help on using the changeset viewer.