Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 4 and Version 5 of ~archive/CollisionReaction


Ignore:
Timestamp:
Apr 15, 2017, 3:35:18 PM (3 years ago)
Author:
landauf
Comment:

fixed links

Legend:

Unmodified
Added
Removed
Modified
  • ~archive/CollisionReaction

    v4 v5  
    55
    66== Overview ==
    7 You can find the whole source in [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction this directory], the main modules are:
    8  * [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/collision_tube.h Collision Tube] - collects all collision information and stores them
    9  * [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/collision_event.h Collision Event] - each obb intersecting with an other obb fires such an event, contained in an Collision object
    10  * [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/collision.h Collision] - defined as the event of two objects intersecting, contain !CollisionEvents
    11  * [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/collision_filter.h Collision Filter] - looks if two objects are listening for collisions between them
    12  * [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/cr_engine.h Collision Reaction Engine] - controlling the collision reactions and checking out the Collisions
     7You can find the whole source in [source:orxonox.OLD/trunk/src/lib/collision_reaction this directory], the main modules are:
     8 * [source:orxonox.OLD/trunk/src/lib/collision_reaction/collision_tube.h Collision Tube] - collects all collision information and stores them
     9 * [source:orxonox.OLD/trunk/src/lib/collision_reaction/collision_event.h Collision Event] - each obb intersecting with an other obb fires such an event, contained in an Collision object
     10 * [source:orxonox.OLD/trunk/src/lib/collision_reaction/collision.h Collision] - defined as the event of two objects intersecting, contain !CollisionEvents
     11 * [source:orxonox.OLD/trunk/src/lib/collision_reaction/collision_filter.h Collision Filter] - looks if two objects are listening for collisions between them
     12 * [source:orxonox.OLD/trunk/src/lib/collision_reaction/cr_engine.h Collision Reaction Engine] - controlling the collision reactions and checking out the Collisions
    1313
    1414== Coding Examples ==
     
    2020  this->subscribeReaction(CoRe::CREngine::CR_OBJECT_DAMAGE, Projectile::staticClassID());
    2121}}}
    22 You can find this function prototype [https://dev.orxonox.net/browser/trunk/src/world_entities/world_entity.h#L83 here]. This registers the object to a damage reaction to all Projectile classes (and subclassses) (BTW: this is the default subscriptoin of all !WorldEntities).
     22You can find this function prototype [source:orxonox.OLD/trunk/src/world_entities/world_entity.h#L83 here]. This registers the object to a damage reaction to all Projectile classes (and subclassses) (BTW: this is the default subscriptoin of all !WorldEntities).
    2323
    2424=== Object Damage ===
    25 Object damage is evaluated with the [https://dev.orxonox.net/browser/trunk/src/lib/collision_reaction/cr_object_damage.h CRObjectDamage] !CollisionReaction object. Each [wiki:archive/WorldEntity WorldEntity] has got a {{{float damage}}} that can be accessed via {{{void setDamage(float damage)}}} and {{{float getDamage()}}}. The damage to another object is evaluated with this {{{damage}}} variable. Here is a short example:
     25Object damage is evaluated with the [source:orxonox.OLD/trunk/src/lib/collision_reaction/cr_object_damage.h CRObjectDamage] !CollisionReaction object. Each [wiki:WorldEntity WorldEntity] has got a {{{float damage}}} that can be accessed via {{{void setDamage(float damage)}}} and {{{float getDamage()}}}. The damage to another object is evaluated with this {{{damage}}} variable. Here is a short example:
    2626{{{
    2727  this->setDamage(100.0f);