6 | | In Orxonox, there are some classes refered to be "objects". In this context an object is not an instance of a class, but a class beeing relevant to the game-logic. Examples of objects are: A ship (but not the model), a particle effect (but not the particles themselfes), a trigger (which might be totally abstract like "finish the game after 20 minutes"), a HUD (but not the graphpics). Examples of classes not beeing objects are: Interfaces (but objects might inherit from them), graphical components (meshes, textures, sprites, billboards, ...), helper classes ([wiki:Timer], ...), classes in external libraries ([wiki:Coding/networking network], audio, [wiki:Core core], ...). |
| 6 | In Orxonox, there are some classes refered to be "objects". In this context an object is not an instance of a class, but a class beeing relevant to the game-logic. Examples of objects are: A ship (but not the model), a particle effect (but not the particles themselfes), a trigger (which might be totally abstract like "finish the game after 20 minutes"), a HUD (but not the graphics). Examples of classes not beeing objects are: Interfaces (but objects might inherit from them), graphical components (meshes, textures, sprites, billboards, ...), helper classes ([wiki:Timer], ...), classes in external libraries ([wiki:Network network], audio, [wiki:Core core], ...). |
15 | | ---to come--- |
| 17 | === XMLPort === |
| 18 | * '''XMLPort('''''element, mode''''')''' is a virtual function defining rules to parse an xml element and assign values and subobjects to the object. This is used by the [wiki:Loader]. See [wiki:XMLPort] for more information. |
| 19 | |
| 20 | === Name === |
| 21 | * '''setName('''''name''''')''': Sets the name of the object. This involves a call to changedName() (see below). |
| 22 | * '''getName()''': Returns the name of the object (if set). |
| 23 | * '''changedName()''': A virtual function which gets called if the name of the object changes. Can be changed by a subclass if the name is somehow important and changes have to be tracked. |
| 24 | |
| 25 | === Activity === |
| 26 | * '''setActive('''''bActive''''')''': Changes the activity of the object. Every object may define it's own definition of "activity" (see changedActivity). |
| 27 | * '''isActive()''': Returns true if the object is active. |
| 28 | * '''changedActivity()''': A virtual function which gets called if the activity of the object changes. This allows the class to implement it's own definition of "activity". |
| 29 | |
| 30 | === Visibility === |
| 31 | * '''setVisible('''''bVisible''''')''': Changes the visibility of the object. Every object may define it's own definition of "visibility" (see changedVisibility). |
| 32 | * '''isVisible()''': Returns true if the object is visiblee. |
| 33 | * '''changedVisibility()''': A virtual function which gets called if the visibility of the object changes. This allows the class to implement it's own definition of "visibility". |
| 34 | |
| 35 | === Loader === |
| 36 | There are a few functions only relevant to the [wiki:Loader] and [wiki:Namespace Namespaces]: |
| 37 | * '''setLevel('''''level''''')''' |
| 38 | * '''getLevel()''' |
| 39 | |
| 40 | * '''setNamespace('''''namespace''''')''' |
| 41 | * '''getNamespace()''' |
19 | | In this illustration of a class-tree (Test.h), the classes A1, A2 and A3 (and all derivatives) are "objects", because they inherit from BaseObject. As you can see, there are some Interfaces. Interfaces aren't connected with the BaseObject, they're on the same level. But they all inherit from OrxonoxClass, but this isn't relevant to the game-logic. |
| 45 | In this illustration of a class-tree (Test.h), the classes A1, A2 and A3 (and all derivatives) are "objects", because they inherit from !BaseObject. As you can see, there are some Interfaces. Interfaces aren't connected with the !BaseObject, they're on the same level. They all inherit from [wiki:OrxonoxClass], but this isn't relevant to the game-logic. |