15 #ifndef COLLISIONSOLID_H
16 #define COLLISIONSOLID_H
18 #include "pandabase.h"
20 #include "config_collide.h"
21 #include "copyOnWriteObject.h"
23 #include "pointerTo.h"
24 #include "renderState.h"
26 #include "lightMutex.h"
27 #include "lightMutexHolder.h"
28 #include "pStatCollector.h"
61 virtual LPoint3 get_collision_origin()
const=0;
63 INLINE
void set_tangible(
bool tangible);
64 INLINE
bool is_tangible()
const;
66 INLINE
void set_effective_normal(
const LVector3 &effective_normal);
67 INLINE
void clear_effective_normal();
68 INLINE
bool has_effective_normal()
const;
69 INLINE
const LVector3 &get_effective_normal()
const;
71 INLINE
void set_respect_effective_normal(
bool respect_effective_normal);
72 INLINE
bool get_respect_effective_normal()
const;
81 virtual void xform(
const LMatrix4 &mat);
85 bool bounds_only)
const;
91 virtual void output(ostream &out)
const;
92 virtual void write(ostream &out,
int indent_level = 0)
const;
95 INLINE
bool do_is_tangible()
const;
96 INLINE
bool do_has_effective_normal()
const;
98 INLINE
void mark_internal_bounds_stale();
108 test_intersection_from_segment(
const CollisionEntry &entry)
const;
110 test_intersection_from_parabola(
const CollisionEntry &entry)
const;
114 static void report_undefined_intersection_test(
TypeHandle from_type,
116 static void report_undefined_from_intersection(
TypeHandle from_type);
118 INLINE
void mark_viz_stale();
119 virtual void fill_viz_geom();
139 F_effective_normal = 0x02,
140 F_viz_geom_stale = 0x04,
141 F_ignore_effective_normal = 0x08,
142 F_internal_bounds_stale = 0x10,
161 static void init_type() {
162 CopyOnWriteObject::init_type();
163 register_type(_type_handle,
"CollisionSolid",
164 CopyOnWriteObject::get_class_type());
167 return get_class_type();
169 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
183 INLINE ostream &operator << (ostream &out,
const CollisionSolid &cs) {
188 #include "collisionSolid.I"
A basic node of the scene graph or data graph.
An infinite ray, with a specific origin and direction.
The abstract interface to a number of classes that decide what to do when a collision is detected...
A CollisionHandlerPusher that makes use of timing and spatial information from fluid collisions to im...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
The abstract base class for all things that can collide with other things in the world, and all the things they can collide with (except geometry).
A cuboid collision volume or object.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A spherical collision volume or object.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
A lightweight class that represents a single element that may be timed and/or counted via stats...
A finite line segment, with two specific endpoints but no thickness.
This is a 4-by-4 transform matrix.
Defines a single collision event.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
An infinite line, similar to a CollisionRay, except that it extends in both directions.
This base class provides basic reference counting, but also can be used with a CopyOnWritePointer to ...
This defines a parabolic arc, or subset of an arc, similar to the path of a projectile or falling obj...
A node in the scene graph that can hold any number of CollisionSolids.
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
This is a standard, non-reentrant mutex, similar to the Mutex class.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...
A node that holds Geom objects, renderable pieces of geometry.