14 #ifndef COLLISIONSOLID_H 15 #define COLLISIONSOLID_H 56 virtual LPoint3 get_collision_origin()
const=0;
57 MAKE_PROPERTY(collision_origin, get_collision_origin);
59 INLINE
void set_tangible(
bool tangible);
60 INLINE
bool is_tangible()
const;
61 MAKE_PROPERTY(tangible, is_tangible, set_tangible);
63 INLINE
void set_effective_normal(
const LVector3 &effective_normal);
64 INLINE
void clear_effective_normal();
65 INLINE
bool has_effective_normal()
const;
66 INLINE
const LVector3 &get_effective_normal()
const;
68 INLINE
void set_respect_effective_normal(
bool respect_effective_normal);
69 INLINE
bool get_respect_effective_normal()
const;
70 MAKE_PROPERTY(respect_effective_normal,
71 get_respect_effective_normal,
72 set_respect_effective_normal);
76 MAKE_PROPERTY(bounds, get_bounds, set_bounds);
82 virtual void xform(
const LMatrix4 &mat);
86 bool bounds_only)
const;
92 virtual void output(std::ostream &out)
const;
93 virtual void write(std::ostream &out,
int indent_level = 0)
const;
96 INLINE
bool do_is_tangible()
const;
97 INLINE
bool do_has_effective_normal()
const;
99 INLINE
void mark_internal_bounds_stale();
109 test_intersection_from_segment(
const CollisionEntry &entry)
const;
111 test_intersection_from_capsule(
const CollisionEntry &entry)
const;
113 test_intersection_from_parabola(
const CollisionEntry &entry)
const;
117 static void report_undefined_intersection_test(
TypeHandle from_type,
119 static void report_undefined_from_intersection(
TypeHandle from_type);
121 INLINE
void mark_viz_stale();
122 virtual void fill_viz_geom();
135 LVector3 _effective_normal;
141 F_effective_normal = 0x02,
142 F_viz_geom_stale = 0x04,
143 F_ignore_effective_normal = 0x08,
144 F_internal_bounds_stale = 0x10,
163 static void init_type() {
164 CopyOnWriteObject::init_type();
166 CopyOnWriteObject::get_class_type());
169 return get_class_type();
171 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
186 INLINE std::ostream &operator << (std::ostream &out,
const CollisionSolid &cs) {
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for all things that can collide with other things in the world,...
A cuboid collision volume or object.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
Defines a single collision event.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This implements a solid consisting of a cylinder with hemispherical endcaps, also known as a capsule ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.