15 #include "config_collide.h" 16 #include "collisionBox.h" 17 #include "collisionEntry.h" 18 #include "collisionHandler.h" 19 #include "collisionHandlerEvent.h" 20 #include "collisionHandlerHighestEvent.h" 21 #include "collisionHandlerFloor.h" 22 #include "collisionHandlerGravity.h" 23 #include "collisionHandlerPhysical.h" 24 #include "collisionHandlerPusher.h" 25 #include "collisionHandlerFluidPusher.h" 26 #include "collisionHandlerQueue.h" 27 #include "collisionInvSphere.h" 28 #include "collisionLine.h" 29 #include "collisionLevelStateBase.h" 30 #include "collisionGeom.h" 31 #include "collisionNode.h" 32 #include "collisionParabola.h" 33 #include "collisionPlane.h" 34 #include "collisionPolygon.h" 35 #include "collisionFloorMesh.h" 36 #include "collisionRay.h" 37 #include "collisionRecorder.h" 38 #include "collisionSegment.h" 39 #include "collisionSolid.h" 40 #include "collisionSphere.h" 41 #include "collisionTraverser.h" 42 #include "collisionTube.h" 43 #include "collisionVisualizer.h" 46 Configure(config_collide);
47 NotifyCategoryDef(collide,
"");
49 ConfigureFn(config_collide) {
54 (
"respect-prev-transform",
false,
55 PRC_DESC(
"Set this true to have all CollisionTraversers in the world respect " 56 "the previous frame's transform (position) for a given object when " 57 "determining motion for collision tests. If this is false, you must " 58 "explicitly enable motion detection for a particular traverser. It " 59 "is false by default to force programmers to decide on a " 60 "case-by-case basis whether they really need this feature."));
63 (
"respect-effective-normal",
true,
64 PRC_DESC(
"This should be true to support the effective_normal interface of " 65 "polygons. Set it false to disable this feature, so that all " 66 "collision solids (including polygons and planes) use their actual " 67 "normal for intersection and physics tests."));
70 (
"allow-collider-multiple",
false,
71 PRC_DESC(
"Set this true to enable the use of a DoubleBitMask or QuadBitMask " 73 "colliders added to a single traverser in one pass. If this is " 74 "false, a one-word BitMask is always used instead, which is faster " 75 "per pass, but may require more passes."));
78 (
"flatten-collision-nodes",
false,
79 PRC_DESC(
"Set this true to allow NodePath::flatten_medium() and " 80 "flatten_strong() to combine multiple CollisionNodes " 81 "into a single CollisionNode--but only if they share the " 82 "same name and collide masks. When false, CollisionNodes " 83 "are never combined. This is false by default, since " 84 "collision tests rely heavily on bounding volume tests " 85 "to be efficient, and combining CollisionNodes is likely " 86 "to merge bounding volumes inappropriately."));
89 (
"collision-parabola-bounds-threshold", 10.0,
90 PRC_DESC(
"This is the threshold size for a CollisionParabola to " 91 "make a bounding box (BoundingHexahedron). If the parabola " 92 "is smaller than this, it will make a BoundingSphere instead, " 93 "which is much easier to make and will be good enough for " 97 (
"collision-parabola-bounds-sample", 10,
98 PRC_DESC(
"This is the number of points along a CollisionParabola to " 99 "sample in order to determine an accurate bounding box."));
102 (
"fluid-cap-amount", 100,
103 PRC_DESC(
"ensures that fluid pos doesn't check beyond X feet"));
106 (
"pushers-horizontal",
false,
107 PRC_DESC(
"Set this true to make all CollisionHandlerPushers have the " 108 "set_horizontal() flag by default, false to let the move " 109 "in three dimensions by default."));
121 static bool initialized =
false;
127 CollisionBox::init_type();
128 CollisionEntry::init_type();
129 CollisionHandler::init_type();
130 CollisionHandlerEvent::init_type();
131 CollisionHandlerHighestEvent::init_type();
132 CollisionHandlerFloor::init_type();
133 CollisionHandlerGravity::init_type();
134 CollisionHandlerPhysical::init_type();
135 CollisionHandlerPusher::init_type();
136 CollisionHandlerFluidPusher::init_type();
137 CollisionHandlerQueue::init_type();
138 CollisionInvSphere::init_type();
139 CollisionLine::init_type();
140 CollisionLevelStateBase::init_type();
141 CollisionGeom::init_type();
142 CollisionNode::init_type();
143 CollisionParabola::init_type();
144 CollisionPlane::init_type();
145 CollisionPolygon::init_type();
146 CollisionFloorMesh::init_type();
147 CollisionRay::init_type();
148 CollisionSegment::init_type();
149 CollisionSolid::init_type();
150 CollisionSphere::init_type();
151 CollisionTraverser::init_type();
152 CollisionTube::init_type();
154 #ifdef DO_COLLISION_RECORDING 155 CollisionRecorder::init_type();
156 CollisionVisualizer::init_type();
static void register_with_read_factory()
Factory method to generate a CollisionPolygon object.
static void register_with_read_factory()
Factory method to generate a CollisionSphere object.
This is a convenience class to specialize ConfigVariable as a boolean type.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionTube.
This is a convenience class to specialize ConfigVariable as a floating-point type.
static void register_with_read_factory()
Factory method to generate a CollisionBox object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionSegment.
static void register_with_read_factory()
Factory method to generate a CollisionInvSphere object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionRay.
static void register_with_read_factory()
Factory method to generate a CollisionPolygon object.
static void register_with_read_factory()
Factory method to generate a CollisionPlane object.
This is a convenience class to specialize ConfigVariable as an integer type.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionNode.
static void register_with_read_factory()
Factory method to generate a CollisionParabola object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionLine.