Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3231 in orxonox.OLD for orxonox/trunk/src/collision.h


Ignore:
Timestamp:
Dec 20, 2004, 12:49:07 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: iniparser, collision fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/collision.h

    r3224 r3231  
    1414
    1515//! Tree structure used by the CollisionCluster
    16 typedef struct CC_Tree
     16typedef struct CCTree
    1717{
    1818  unsigned long n;
    1919  union
    2020  {
    21   struct CC_Tree** b;
     21  struct CCTree** b;
    2222  unsigned long ID;
    2323  } data;
    2424  float r;
    2525  Vector m;
    26 } CC_Tree;
     26} CCTree;
    2727
    2828//! Basic collision detection class
     
    4242class CollisionCluster {
    4343 
    44   CC_Tree* root;
     44  CCTree* root;
    4545 
    4646 
     
    5252  int store (char* filename);
    5353 
    54   friend bool cctree_trace( const Placement* p, CC_Tree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);
    55   friend bool cctree_iterate(const Placement* pa, CC_Tree* ta, unsigned long* ahitflags, const Placement* pb, CC_Tree* tb, unsigned long* bhitflags);
    56   friend bool check_trace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint);
    57   friend bool check_collision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags);
     54  friend bool cctreeTrace( const Placement* p, CCTree* t, unsigned long* hitflags, const Line* trace, Vector* impactpoint);
     55  friend bool cctreeIterate(const Placement* pa, CCTree* ta, unsigned long* ahitflags, const Placement* pb, CCTree* tb, unsigned long* bhitflags);
     56  friend bool checkTrace (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Line* trace, Vector* impactpoint);
     57  friend bool checkCollision (const Placement* pa, const CollisionCluster* a, unsigned long* ahitflags, const Placement* pb, const CollisionCluster* b, unsigned long* bhitflags);
    5858};
    5959
    60 bool sphere_sphere_collision( Vector m1, float r1, Vector m2, float r2);
    61 bool trace_sphere_collision( Vector m, float r, const Line* l, Vector* impactpoint);
     60bool sphereSphereCollision( Vector m1, float r1, Vector m2, float r2);
     61bool traceSphereCollision( Vector m, float r, const Line* l, Vector* impactpoint);
    6262
    6363void setflag( unsigned long* flags, unsigned long ID);
    6464
    65 void free_CC_Tree( CC_Tree* tree);
    66 CC_Tree* load_CC_Tree (FILE* stream);
    67 int save_CC_Tree (CC_Tree* tree, FILE* stream);
     65void freeCCTree( CCTree* tree);
     66CCTree* loadCCTree (FILE* stream);
     67int saveCCTree (CCTree* tree, FILE* stream);
    6868
    6969#endif /* _COLLISION_H */
Note: See TracChangeset for help on using the changeset viewer.