Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 26, 2008, 1:23:48 PM (17 years ago)
Author:
rgrieder
Message:

added documentation to OverlayGroup
ready for merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/overlays/OverlayGroup.h

    r1615 r1623  
    2727 */
    2828
     29/**
     30@file
     31@brief Declaration of the OverlayGroup class.
     32*/
     33
    2934#ifndef _OverlayGroup_H__
    3035#define _OverlayGroup_H__
     
    3944namespace orxonox
    4045{
     46    /**
     47    @brief
     48        OverlayGroup does almost exactly what it says: It groups OrxonoxOverlays together.
     49        You can scroll the entire group by a certain amount. Scale however works differently
     50        than expected: Each OrxonoxOverlay scales individually. That's quite useful when you
     51        create your HUD with an OverlayGroup and then want to alter its size.
     52    */
    4153    class _OrxonoxExport OverlayGroup : public BaseObject
    4254    {
    4355    public:
    4456        OverlayGroup();
    45         ~OverlayGroup();
     57        //! Empty destructor.
     58        ~OverlayGroup() { }
    4659
    4760        void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     
    5063        static void scaleGroup(const std::string& name, float scale);
    5164        static void scrollGroup(const std::string& name, const Vector2& scroll);
    52         static void rotateGroup(const std::string& name, Radian angle);
    5365
    5466    private:
     67        //! Scales each OrxonoxOverlay individually by scale.
    5568        void scale(const Vector2& scale) { this->setScale(scale * this->scale_); }
    5669        void setScale(const Vector2& scale);
     70        //! Returns the current size of the group.
    5771        Vector2 getScale() const { return this->scale_; }
    5872
     73        //! Scrolls each OrxonoxOverlay individually by scroll.
    5974        void scroll(const Vector2& scroll) { this->setScroll(scroll + this->scroll_); }
    6075        void setScroll(const Vector2& scroll);
     76        //! Returns the current scrolling offset of the group.
    6177        Vector2 getScroll() const { return this->scale_; }
    6278
     
    6480        OrxonoxOverlay* getElement(unsigned int index);
    6581
    66         std::map<std::string, OrxonoxOverlay*> hudElements_;
    67         Vector2 scale_;
    68         Vector2 scroll_;
     82        std::map<std::string, OrxonoxOverlay*> hudElements_;    //!< Contains all the OrxonoxOverlays of the this group.
     83        Vector2 scale_;                                         //!< Current scale (independant of the elements).
     84        Vector2 scroll_;                                        //!< Current scrolling offset.
    6985    };
    7086}
Note: See TracChangeset for help on using the changeset viewer.