14#ifndef COLLISIONSEGMENT_H
15#define COLLISIONSEGMENT_H
35 INLINE
explicit CollisionSegment(PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az,
36 PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz);
42 virtual CollisionSolid *make_copy();
47 virtual void xform(
const LMatrix4 &mat);
49 virtual void output(std::ostream &out)
const;
52 INLINE
void set_point_a(
const LPoint3 &a);
53 INLINE
void set_point_a(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
54 INLINE
const LPoint3 &get_point_a()
const;
56 INLINE
void set_point_b(
const LPoint3 &b);
57 INLINE
void set_point_b(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
58 INLINE
const LPoint3 &get_point_b()
const;
64 MAKE_PROPERTY(point_a, get_point_a, set_point_a);
65 MAKE_PROPERTY(point_b, get_point_b, set_point_b);
71 virtual void fill_viz_geom();
88 static void init_type() {
89 CollisionSolid::init_type();
91 CollisionSolid::get_class_type());
94 return get_class_type();
96 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
Defines a single collision event.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CollisionSegment.
bool set_from_lens(LensNode *camera, const LPoint2 &point)
Accepts a LensNode and a 2-d point in the range [-1,1].
virtual LPoint3 get_collision_origin() const
Returns the point in space deemed to be the "origin" of the solid for collision purposes.
CollisionSegment()
Creates an invalid segment.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
virtual void xform(const LMatrix4 &mat)
Transforms the solid by the indicated matrix.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A node that contains a Lens.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...