21 _origin(LPoint3(0.0, 0.0, 0.0)),
22 _direction(LVector3(0.0, 0.0, 0.0))
30 CollisionRay(
const LPoint3 &origin,
const LVector3 &direction) :
31 _origin(origin), _direction(direction)
33 nassertv(_direction != LPoint3::zero());
40 CollisionRay(PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz,
41 PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz) :
42 _origin(ox, oy, oz), _direction(dx, dy, dz)
44 nassertv(_direction != LPoint3::zero());
53 _origin(copy._origin),
54 _direction(copy._direction)
61 INLINE
void CollisionRay::
62 set_origin(
const LPoint3 &origin) {
64 mark_internal_bounds_stale();
71 INLINE
void CollisionRay::
72 set_origin(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
73 set_origin(LPoint3(x, y, z));
79 INLINE
const LPoint3 &CollisionRay::
87 INLINE
void CollisionRay::
88 set_direction(
const LVector3 &direction) {
89 _direction = direction;
90 mark_internal_bounds_stale();
92 nassertv(_direction != LPoint3::zero());
98 INLINE
void CollisionRay::
99 set_direction(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
100 set_direction(LVector3(x, y, z));
106 INLINE
const LVector3 &CollisionRay::
107 get_direction()
const {
An infinite ray, with a specific origin and direction.
The abstract base class for all things that can collide with other things in the world,...
A node that contains a Lens.
bool set_from_lens(LensNode *camera, const LPoint2 &point)
Accepts a LensNode and a 2-d point in the range [-1,1].
CollisionRay()
Creates an invalid ray.