mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
collide: Allow creating dummy CollisionHandler
Useful for benchmarks or unit tests where the result does not matter.
This commit is contained in:
parent
3247903d7b
commit
a2890c03de
@ -15,14 +15,6 @@
|
|||||||
|
|
||||||
TypeHandle CollisionHandler::_type_handle;
|
TypeHandle CollisionHandler::_type_handle;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
CollisionHandler::
|
|
||||||
CollisionHandler() {
|
|
||||||
_wants_all_potential_collidees = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will be called by the CollisionTraverser before a new traversal is begun.
|
* Will be called by the CollisionTraverser before a new traversal is begun.
|
||||||
* It instructs the handler to reset itself in preparation for a number of
|
* It instructs the handler to reset itself in preparation for a number of
|
||||||
|
@ -28,9 +28,10 @@ class CollisionEntry;
|
|||||||
* dispatch detected collisions.
|
* dispatch detected collisions.
|
||||||
*/
|
*/
|
||||||
class EXPCL_PANDA_COLLIDE CollisionHandler : public TypedReferenceCount {
|
class EXPCL_PANDA_COLLIDE CollisionHandler : public TypedReferenceCount {
|
||||||
public:
|
PUBLISHED:
|
||||||
CollisionHandler();
|
CollisionHandler() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
virtual void begin_group();
|
virtual void begin_group();
|
||||||
virtual void add_entry(CollisionEntry *entry);
|
virtual void add_entry(CollisionEntry *entry);
|
||||||
virtual bool end_group();
|
virtual bool end_group();
|
||||||
@ -38,12 +39,10 @@ public:
|
|||||||
INLINE bool wants_all_potential_collidees() const;
|
INLINE bool wants_all_potential_collidees() const;
|
||||||
INLINE void set_root(const NodePath &root);
|
INLINE void set_root(const NodePath &root);
|
||||||
|
|
||||||
PUBLISHED:
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
|
||||||
static void init_type() {
|
static void init_type() {
|
||||||
TypedReferenceCount::init_type();
|
TypedReferenceCount::init_type();
|
||||||
register_type(_type_handle, "CollisionHandler",
|
register_type(_type_handle, "CollisionHandler",
|
||||||
@ -55,7 +54,7 @@ public:
|
|||||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool _wants_all_potential_collidees;
|
bool _wants_all_potential_collidees = false;
|
||||||
const NodePath *_root;
|
const NodePath *_root;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user