Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2008, 2:06:41 AM (17 years ago)
Author:
landauf
Message:

added support for isVisible() and isActive() to all objects.
those functions are provided by BaseObject, combined with virtual functions changedVisibility and changedActivity respectively.
use them, to make orxonox scriptable, say: to change the state of objects with 2 simple functions instead of changing all meshes and emitters and billboards of an object. don't forget to pass calls to changedVisibility and changedActivity to the parent class.

additionally there is a new function, isInitialized(), provided by BaseObject too. this returns true if the constructor of BaseObject passed the object registration. this allows you, to check whether an object was properly initialized or if the constructor returned (as this is the case while creating the class hierarchy). use isInitialized() in your destructor before deleting something.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Skybox.h

    r1505 r1558  
    4343            virtual ~Skybox();
    4444
    45             void loadParams(TiXmlElement* xmlElem);
    4645            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void changedVisibility();
    4747            void setSkybox(const std::string& skyboxname);
    48            
     48
    4949            virtual bool create();
    5050            void registerAllVariables();
Note: See TracChangeset for help on using the changeset viewer.