14 #ifndef COLLISIONSPHERE_H 15 #define COLLISIONSPHERE_H 27 INLINE
explicit CollisionSphere(
const LPoint3 ¢er, PN_stdfloat radius);
28 INLINE
explicit CollisionSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius);
30 virtual LPoint3 get_collision_origin()
const;
42 virtual void xform(
const LMatrix4 &mat);
47 virtual void output(std::ostream &out)
const;
49 INLINE
static void flush_level();
52 INLINE
void set_center(
const LPoint3 ¢er);
53 INLINE
void set_center(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
54 INLINE
const LPoint3 &get_center()
const;
56 INLINE
void set_radius(PN_stdfloat radius);
57 INLINE PN_stdfloat get_radius()
const;
60 MAKE_PROPERTY(center, get_center, set_center);
61 MAKE_PROPERTY(radius, get_radius, set_radius);
77 test_intersection_from_parabola(
const CollisionEntry &entry)
const;
81 virtual void fill_viz_geom();
84 bool intersects_line(
double &t1,
double &t2,
85 const LPoint3 &from,
const LVector3 &delta,
86 PN_stdfloat inflate_radius)
const;
87 bool intersects_parabola(
double &t,
const LParabola ¶bola,
89 const LPoint3 &p1,
const LPoint3 &p2)
const;
90 LVertex compute_point(PN_stdfloat latitude, PN_stdfloat longitude)
const;
100 static void register_with_read_factory();
111 static void init_type() {
112 CollisionSolid::init_type();
114 CollisionSolid::get_class_type());
117 return get_class_type();
119 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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,...
Base class for objects that can be written to and read from Bam files.
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.
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 write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
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.
Defines a single collision event.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual PStatCollector & get_test_pcollector()
Returns a PStatCollector that is used to count the number of intersection tests made against a solid ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...