Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2008, 11:09:43 PM (15 years ago)
Author:
rgrieder
Message:
  • Added support for attaching physical WorldEntities to each other. Currently you can only add static objects to kinematic/dynamic/static other objects. Future plans involve attaching kinematic objects to static/kinematic ones. All other combinations don't make sense at all.
  • Added CollisionShape, SphereCollisionShape and CompoundCollisionShape

Usage for collision shapes (example):

<LinearEntity collisionType="kinematic">

<attached>

<Model position="0,0,0" scale=10 mesh="ast1.mesh" />
<StaticEntity position="0,10,0" collisionType="static"> # Everything else than "static" fails!

<collisionShapes>

<SphereCollisionShape radius=40 position="10,10,-10"/>
<CompoundCollisionShape position="4,4,4"> # You can also make compound shapes directly

<SphereCollisionShape radius=10/>

</CompoundCollisionShape>

</collisionShapes>

</StaticEntity>

</attached>

</LinearEntity>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/core/XMLPort.h

    r2291 r2303  
    196196    @param xmlelement The XMLElement (recieved through the XMLPort function)
    197197    @param mode The mode (load/save) (received through the XMLPort function)
    198     @param bApplyLoaderMask If this is true, an added sub-object only gets loaded if it's class is included in the Loaders ClassTreeMask (this is usually false)
    199     @param bLoadBefore If this is true, the sub-cobject gets loaded (through XMLPort) BEFORE it gets added to the main class (this is usually true)
     198    @param bApplyLoaderMask If this is true, an added sub-object gets loaded only if it's class is included in the Loaders ClassTreeMask (this is usually false)
     199    @param bLoadBefore If this is true, the sub-object gets loaded (through XMLPort) BEFORE it gets added to the main class (this is usually true)
    200200
    201201    bApplyLoaderMask is usually false for the following reason:
     
    204204    Of course, if there are "standalone" weapons in the level, they wont be loaded.
    205205
    206     If bLoadBefore, an added object already has all attributes set (like it's name). This is most
     206    If bLoadBefore is true, an added object already has all attributes set (like it's name). This is most
    207207    likely the best option, so this is usually true.
    208208
     
    243243    Note that "weapons" is the subsection. This allows you to add more types of sub-objects. In our example,
    244244    you could add pilots, blinking lights or other stuff. If you don't want a subsection, just use "" (an
    245     empty string). The you can add sub-objects directly into the mainclass.
     245    empty string). Then you can add sub-objects directly into the mainclass.
    246246*/
    247247#define XMLPortObjectExtended(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
Note: See TracChangeset for help on using the changeset viewer.