|
@@ -227,173 +227,6 @@ has_interior_point() const {
|
|
|
return (_flags & F_has_interior_point) != 0;
|
|
return (_flags & F_has_interior_point) != 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_into_intersection_point
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the detected collision knows its
|
|
|
|
|
-// intersection point in the coordinate space of the
|
|
|
|
|
-// collided-into object, false otherwise.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_into_intersection_point() const {
|
|
|
|
|
- return has_surface_point();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_into_intersection_point
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns the intersection point in the coordinate
|
|
|
|
|
-// space of the collided-into object. It is an error to
|
|
|
|
|
-// call this if has_into_intersection_point() returns
|
|
|
|
|
-// false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE LPoint3f CollisionEntry::
|
|
|
|
|
-get_into_intersection_point() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_into_intersection_point() is deprecated. Use get_surface_point() instead.");
|
|
|
|
|
- return get_surface_point(get_into_node_path());
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_from_intersection_point
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the detected collision knows its
|
|
|
|
|
-// intersection point in the coordinate space of the
|
|
|
|
|
-// colliding object, false otherwise.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_from_intersection_point() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::has_from_intersection_point() is deprecated. Use has_surface_point() instead.");
|
|
|
|
|
- return has_surface_point();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_from_intersection_point
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns the intersection point in the coordinate
|
|
|
|
|
-// space of the colliding object. It is an error to
|
|
|
|
|
-// call this if has_from_intersection_point() returns
|
|
|
|
|
-// false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE LPoint3f CollisionEntry::
|
|
|
|
|
-get_from_intersection_point() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_from_intersection_point() is deprecated. Use get_surface_point() instead.");
|
|
|
|
|
- return get_surface_point(get_from_node_path());
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_into_surface_normal
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the detected collision knows the
|
|
|
|
|
-// surface normal of the collided-into object at the
|
|
|
|
|
-// point of the collision, false otherwise.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_into_surface_normal() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::has_into_surface_normal() is deprecated. Use has_surface_normal() instead.");
|
|
|
|
|
- return has_surface_normal();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_into_surface_normal
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns the surface normal of the collided-into
|
|
|
|
|
-// object at the point of the collision. It is an error
|
|
|
|
|
-// to call this if has_into_surface_normal() returns
|
|
|
|
|
-// false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE LVector3f CollisionEntry::
|
|
|
|
|
-get_into_surface_normal() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_into_surface_normal() is deprecated. Use get_surface_normal() instead.");
|
|
|
|
|
- return get_surface_normal(get_into_node_path());
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_from_surface_normal
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the detected collision knows the
|
|
|
|
|
-// surface normal of the collided-into object at the
|
|
|
|
|
-// point of the collision, false otherwise.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_from_surface_normal() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::has_from_surface_normal() is deprecated. Use has_surface_normal() instead.");
|
|
|
|
|
- return has_surface_normal();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_from_surface_normal
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns the surface normal of the collided-into
|
|
|
|
|
-// object at the point of the collision, in the space of
|
|
|
|
|
-// the collided-from object. It is an error to call
|
|
|
|
|
-// this if has_from_surface_normal() returns false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE LVector3f CollisionEntry::
|
|
|
|
|
-get_from_surface_normal() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_from_surface_normal() is deprecated. Use get_surface_normal() instead.");
|
|
|
|
|
- return get_surface_normal(get_from_node_path());
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_into_depth
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the collision entry knows how "deep"
|
|
|
|
|
-// the collision was into the collided-into object; that
|
|
|
|
|
-// is, how far into the surface of the collided-into
|
|
|
|
|
-// object the colliding object has penetrated.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_into_depth() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::has_into_depth() is deprecated. Use has_interior_point() instead.");
|
|
|
|
|
- return has_surface_point() && has_interior_point();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_into_depth
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns how "deep" the collision was into the
|
|
|
|
|
-// collided-into object; that is, how far into the
|
|
|
|
|
-// surface of the collided-into object the colliding
|
|
|
|
|
-// object has penetrated. It is an error to call this
|
|
|
|
|
-// if has_into_depth() returns false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE float CollisionEntry::
|
|
|
|
|
-get_into_depth() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_into_depth() is deprecated. Use get_interior_point() instead.");
|
|
|
|
|
- nassertr(has_into_depth(), 0.0);
|
|
|
|
|
- return (get_surface_point(get_into_node_path()) - get_interior_point(get_into_node_path())).length();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::has_from_depth
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns true if the collision entry knows how "deep"
|
|
|
|
|
-// the collision was from the collided-from object; that
|
|
|
|
|
-// is, how far from the surface of the collided-from
|
|
|
|
|
-// object the colliding object has penetrated.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE bool CollisionEntry::
|
|
|
|
|
-has_from_depth() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::has_from_depth() is deprecated. Use has_interior_point() instead.");
|
|
|
|
|
- return has_surface_point() && has_interior_point();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-// Function: CollisionEntry::get_from_depth
|
|
|
|
|
-// Access: Published
|
|
|
|
|
-// Description: Returns how "deep" the collision was from the
|
|
|
|
|
-// collided-from object; that is, how far from the
|
|
|
|
|
-// surface of the collided-from object the colliding
|
|
|
|
|
-// object has penetrated. It is an error to call this
|
|
|
|
|
-// if has_from_depth() returns false.
|
|
|
|
|
-////////////////////////////////////////////////////////////////////
|
|
|
|
|
-INLINE float CollisionEntry::
|
|
|
|
|
-get_from_depth() const {
|
|
|
|
|
- nassert_raise("CollisionEntry::get_from_depth() is deprecated. Use get_interior_point() instead.");
|
|
|
|
|
- return (get_surface_point(get_from_node_path()) - get_interior_point(get_from_node_path())).length();
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: CollisionEntry::get_wrt_space
|
|
// Function: CollisionEntry::get_wrt_space
|
|
|
// Access: Public
|
|
// Access: Public
|