Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3238 in orxonox.OLD for orxonox/branches/sound/src/collision.h


Ignore:
Timestamp:
Dec 20, 2004, 2:42:54 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches: updated branches: buerli, nico, sound. And moved bezierTrack to old.bezierTrack. Conflicts resolved in a usefull order.
Conflics mostly resolved in favor of trunk
merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/sound/src/collision.h

    r2190 r3238  
    44*/
    55
    6 #ifndef COLLISION_H
    7 #define COLLISION_H
     6#ifndef _COLLISION_H
     7#define _COLLISION_H
    88
    99#include "vector.h"
     
    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
    69 #endif
     69#endif /* _COLLISION_H */
Note: See TracChangeset for help on using the changeset viewer.