Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of ~archive/WorldEntity


Ignore:
Timestamp:
Nov 27, 2007, 11:58:16 PM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/WorldEntity

    v1 v2  
    1 = WorldEntity =
    2 A WorldEntity is an extension ParentNode, that can be displayed, and interact in the wonderful Worlds of orxonox
     1= !WorldEntity =
     2A !WorldEntity is an extension [wiki:archive/ParentNode ParentNode], that can be displayed, and interact in the wonderful Worlds of orxonox
    33
    44source:/trunk/src/world_entities/world_entity.h#HEAD [[br]]
    55__Dependecies__:
    6   * ParentNode
     6  * [wiki:archive/ParentNode ParentNode]
    77
    88== usage ==
     
    2222}}}
    2323'''Initailisation-Phase:'''
    24   * __loadParams__: Loads Parameters on the WorldEntity - level
    25   * __loadModel__: loads a new Model onto the WorldEntity (this is coppled with the ResourceManager, so you don't have to care about the pointer anymore)
    26   * __buildObbTree__: If you want collisions to happen onto this WorldEntity, then you have to call this function, to create a Collision-Cluster. This is normally called upon a call to loadModel, but maybe you want something more.
    27   * __setVisibility__: Tells the ENGINE if this WorldEntity must be drawn, or not
     24  * __loadParams__: Loads Parameters on the !WorldEntity - level
     25  * __loadModel__: loads a new Model onto the !WorldEntity (this is coppled with the [wiki:archive/ResourceManager ResourceManager], so you don't have to care about the pointer anymore)
     26  * __buildObbTree__: If you want collisions to happen onto this !WorldEntity, then you have to call this function, to create a Collision-Cluster. This is normally called upon a call to loadModel, but maybe you want something more.
     27  * __setVisibility__: Tells the ENGINE if this !WorldEntity must be drawn, or not
    2828 
    2929'''Runtime'''
    30   * __tick__: Tells this WorldEntity, to step around a little timestep (dt) into the future (or past if (dt < 0)). All derived Classes should reimplement this function, to describe the behaviour of the WorldEntity over time.
    31   * __draw__: Tells this WorldEntity to draw itself. This function should be reimplemented virtually by all derived classes. Most Classes are drawn differently. The default drawing function is quite good, but maybe not, what you are looking for.
     30  * __tick__: Tells this !WorldEntity, to step around a little timestep (dt) into the future (or past if (dt < 0)). All derived Classes should reimplement this function, to describe the behaviour of the !WorldEntity over time.
     31  * __draw__: Tells this !WorldEntity to draw itself. This function should be reimplemented virtually by all derived classes. Most Classes are drawn differently. The default drawing function is quite good, but maybe not, what you are looking for.
    3232  * __collidesWith__: If a Collision has happened, this function is called. Here you get the Entity that collided with this one, and the location, where the hit occured.
    3333
     
    3636
    3737
    38 == Howto Create a new WorldEntity ==
    39 If you want to create a new WorldEntity, you first have to know the concept of
    40   * ClassID, BaseObject (for nice integration into our project)
    41   * LoadParam / Factory (for automatic Loading)
     38== Howto Create a new !WorldEntity ==
     39If you want to create a new !WorldEntity, you first have to know the concept of
     40  * ClassID, [wiki:archive/BaseObject BaseObject] (for nice integration into our project)
     41  * [wiki:archive/LoadParam LoadParam] / Factory (for automatic Loading)
    4242
    43 Then it would be a good idea to look at an other WorldEntity, like Player/NPC/PowerUp.
     43Then it would be a good idea to look at an other !WorldEntity, like Player/NPC/PowerUp.
    4444
    4545__Creation Process__:
    4646  1. ''Copy'' src/proto/proto_world_entity.[cc,h] to src world_entities/you_entity.[cc,h]
    47   2. ''Rename'' all the ProtoWorldEntities to !YourOwnName (look at all cases, PROTO_WORLD_ENTITY, proto_world_entity.h)
     47  2. ''Rename'' all the !ProtoWorldEntities to !YourOwnName (look at all cases, PROTO_WORLD_ENTITY, proto_world_entity.h)
    4848  3. ''add'' your new ClassID to src/defs/class_id.h -> write a mail to orxonox-dev-mailingList, if you have problems with this
    49   4. ''Peek'' at some the other WorldEntities, to get the hang of the functionality
     49  4. ''Peek'' at some the other !WorldEntities, to get the hang of the functionality
    5050  5. ''be'' creative :)