Panda3D
 All Classes Functions Variables Enumerations
collideMask.h
00001 // Filename: collideMask.h
00002 // Created by:  drose (03Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef COLLIDEMASK_H
00016 #define COLLIDEMASK_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "bitMask.h"
00021 
00022 // This is the data type of the collision mask: the set of bits that
00023 // every CollisionNode has, and that any two nodes must have some in
00024 // common in order to be tested for a mutual intersection.
00025 
00026 // This file used to live in the collide directory, but since it's
00027 // such a trivial definition that a few other directories (like egg)
00028 // need without necessarily having to pull in all of collide, it
00029 // seemed better to move it to putil.
00030 
00031 typedef BitMask32 CollideMask;
00032 
00033 // We need some conventions for initial bits for GeomNodes and
00034 // CollideNodes.  These are primarily advisory, since the application
00035 // programmer is free to define each bit as he or she chooses, but
00036 // they also control the initial default values that are assigned to
00037 // new nodes.
00038 
00039 // By established convention, the lower 20 bits are reserved for
00040 // CollisionNodes.  Each CollisionNode has all these bits set on by
00041 // default (and no others).  You can (and probably should) change this
00042 // on a per-node basis to specialize CollisionNodes for different
00043 // purposes.
00044 static const CollideMask default_collision_node_collide_mask = CollideMask::lower_on(20);
00045 
00046 // The next bit is reserved for generic GeomNodes.  Each GeomNode has
00047 // this bit on by default (and no others).  You can, of course, set
00048 // any mask you want on a particular GeomNode; this is just the
00049 // default bit if you choose not to do anything.
00050 static const CollideMask default_geom_node_collide_mask = CollideMask::bit(20);
00051 
00052 // The remaining 11 bits are presently unassigned.  No nodes will have
00053 // these bits on by default.
00054 
00055 #endif
00056 
 All Classes Functions Variables Enumerations