CollisionRay
from panda3d.core import CollisionRay
- class CollisionRay
Bases:
CollisionSolid
An infinite ray, with a specific origin and direction. It begins at its origin and continues in one direction to infinity, and it has no radius. Useful for picking from a window, or for gravity effects.
Inheritance diagram
- __init__(*args, **kwargs)
- direction
- getClassType()
C++ Interface: get_class_type()
- get_class_type()
C++ Interface: get_class_type()
- origin
- setDirection()
C++ Interface: set_direction(const CollisionRay self, const LVector3f direction) set_direction(const CollisionRay self, float x, float y, float z)
- setFromLens()
C++ Interface: set_from_lens(const CollisionRay self, LensNode camera, const LPoint2f point) set_from_lens(const CollisionRay self, LensNode camera, float px, float py)
- /**
Accepts a LensNode and a 2-d point in the range [-1,1]. Sets the
CollisionRay so that it begins at the LensNode’s near plane and extends to
infinity, making it suitable for picking objects from the screen given a
camera and a mouse location.
*/
- /**
Accepts a LensNode and a 2-d point in the range [-1,1]. Sets the
CollisionRay so that it begins at the LensNode’s near plane and extends to
infinity, making it suitable for picking objects from the screen given a
camera and a mouse location.
Returns true if the point was acceptable, false otherwise.
*/
- setOrigin()
C++ Interface: set_origin(const CollisionRay self, const LPoint3f origin) set_origin(const CollisionRay self, float x, float y, float z)
- set_direction()
C++ Interface: set_direction(const CollisionRay self, const LVector3f direction) set_direction(const CollisionRay self, float x, float y, float z)
- set_from_lens()
C++ Interface: set_from_lens(const CollisionRay self, LensNode camera, const LPoint2f point) set_from_lens(const CollisionRay self, LensNode camera, float px, float py)
- /**
Accepts a LensNode and a 2-d point in the range [-1,1]. Sets the
CollisionRay so that it begins at the LensNode’s near plane and extends to
infinity, making it suitable for picking objects from the screen given a
camera and a mouse location.
*/
- /**
Accepts a LensNode and a 2-d point in the range [-1,1]. Sets the
CollisionRay so that it begins at the LensNode’s near plane and extends to
infinity, making it suitable for picking objects from the screen given a
camera and a mouse location.
Returns true if the point was acceptable, false otherwise.
*/