Public Member Functions |
| | CollisionSegment () |
| | Creates an invalid segment.
|
|
| CollisionSegment (const LPoint3 &a, const LPoint3 &db) |
|
| CollisionSegment (PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az, PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz) |
|
| CollisionSegment (const CollisionSegment ©) |
|
virtual TypeHandle | force_init_type () |
| virtual LPoint3 | get_collision_origin () const |
| | Returns the point in space deemed to be the "origin" of the solid for collision purposes.
|
|
const LPoint3 & | get_point_a () const |
|
const LPoint3 & | get_point_b () const |
|
virtual TypeHandle | get_type () const |
|
virtual CollisionSolid * | make_copy () |
|
virtual void | output (ostream &out) const |
|
virtual | PT (CollisionEntry) test_intersection(const CollisionEntry &entry) const |
| bool | set_from_lens (LensNode *camera, const LPoint2 &point) |
| | Accepts a LensNode and a 2-d point in the range [-1,1].
|
| bool | set_from_lens (LensNode *camera, PN_stdfloat px, PN_stdfloat py) |
| | Accepts a LensNode and a 2-d point in the range [-1,1].
|
|
void | set_point_a (const LPoint3 &a) |
|
void | set_point_a (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
|
void | set_point_b (const LPoint3 &b) |
|
void | set_point_b (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) |
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
| virtual void | xform (const LMatrix4 &mat) |
| | Transforms the solid by the indicated matrix.
|
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 CollisionSegment.
|
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 CollisionSegment.
|
|
virtual | PT (BoundingVolume) compute_internal_bounds() const |
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 CollisionSegment is encountered in the Bam file.
|
A finite line segment, with two specific endpoints but no thickness.
It's similar to a CollisionRay, except it does not continue to infinity.
It does have an ordering, from point A to point B. If more than a single point of the segment is intersecting a solid, the reported intersection point is generally the closest on the segment to point A.
Definition at line 35 of file collisionSegment.h.