Panda3D
|
An infinite line, similar to a CollisionRay, except that it extends in both directions. More...
#include "collisionLine.h"
Public Member Functions | |
CollisionLine () | |
Creates an invalid line. | |
CollisionLine (const LPoint3 &origin, const LVector3 &direction) | |
CollisionLine (PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz, PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz) | |
CollisionLine (const CollisionLine ©) | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
virtual CollisionSolid * | make_copy () |
virtual void | output (ostream &out) const |
virtual | PT (CollisionEntry) test_intersection(const CollisionEntry &entry) const |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type CollisionLine. | |
Protected Member Functions | |
virtual void | fill_viz_geom () |
Fills the _viz_geom GeomNode up with Geoms suitable for rendering this solid. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new CollisionLine. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type CollisionLine is encountered in the Bam file. |
An infinite line, similar to a CollisionRay, except that it extends in both directions.
It is, however, directional.
Definition at line 28 of file collisionLine.h.
CollisionLine::CollisionLine | ( | ) | [inline] |
Creates an invalid line.
This isn't terribly useful; it's expected that the user will subsequently adjust the line via set_origin()/set_direction() or set_from_lens().
Definition at line 25 of file collisionLine.I.
Referenced by make_from_bam().
void CollisionLine::fill_viz_geom | ( | ) | [protected, virtual] |
Fills the _viz_geom GeomNode up with Geoms suitable for rendering this solid.
Reimplemented from CollisionRay.
Definition at line 72 of file collisionLine.cxx.
References GeomVertexWriter::add_data3(), GeomVertexWriter::add_data4(), and GeomVertexFormat::get_v3cp().
void CollisionLine::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new CollisionLine.
Reimplemented from CollisionRay.
Definition at line 156 of file collisionLine.cxx.
Referenced by make_from_bam().
TypedWritable * CollisionLine::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type CollisionLine is encountered in the Bam file.
It should create the CollisionLine and extract its information from the file.
Reimplemented from CollisionRay.
Definition at line 137 of file collisionLine.cxx.
References CollisionLine(), and fillin().
Referenced by register_with_read_factory().
void CollisionLine::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type CollisionLine.
Reimplemented from CollisionRay.
Definition at line 113 of file collisionLine.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
void CollisionLine::write_datagram | ( | BamWriter * | manager, |
Datagram & | dg | ||
) | [virtual] |
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from CollisionRay.
Definition at line 124 of file collisionLine.cxx.