CollisionSolid
from panda3d.core import CollisionSolid
- class CollisionSolid
Bases:
CopyOnWriteObject
The abstract base class for all things that can collide with other things in the world, and all the things they can collide with (except geometry).
This class and its derivatives really work very similarly to the way BoundingVolume and all of its derivatives work. There’s a different subclass for each basic shape of solid, and double-dispatch function calls handle the subset of the N*N intersection tests that we care about.
Inheritance diagram
- __init__(*args, **kwargs)
- bounds
- clearEffectiveNormal()
C++ Interface: clear_effective_normal(const CollisionSolid self)
- /**
Removes the normal previously set by set_effective_normal().
*/
- clear_effective_normal()
C++ Interface: clear_effective_normal(const CollisionSolid self)
- /**
Removes the normal previously set by set_effective_normal().
*/
- collision_origin
- getBounds()
C++ Interface: get_bounds(CollisionSolid self)
- /**
Returns the solid’s bounding volume.
*/
- getClassType()
C++ Interface: get_class_type()
- getCollisionOrigin()
C++ Interface: get_collision_origin(CollisionSolid self)
- getEffectiveNormal()
C++ Interface: get_effective_normal(CollisionSolid self)
- /**
Returns the normal that was set by set_effective_normal(). It is an error
to call this unless has_effective_normal() returns true.
*/
- getRespectEffectiveNormal()
C++ Interface: get_respect_effective_normal(CollisionSolid self)
- /**
See set_respect_effective_normal().
*/
- get_bounds()
C++ Interface: get_bounds(CollisionSolid self)
- /**
Returns the solid’s bounding volume.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_collision_origin()
C++ Interface: get_collision_origin(CollisionSolid self)
- get_effective_normal()
C++ Interface: get_effective_normal(CollisionSolid self)
- /**
Returns the normal that was set by set_effective_normal(). It is an error
to call this unless has_effective_normal() returns true.
*/
- get_respect_effective_normal()
C++ Interface: get_respect_effective_normal(CollisionSolid self)
- /**
See set_respect_effective_normal().
*/
- hasEffectiveNormal()
C++ Interface: has_effective_normal(CollisionSolid self)
- /**
Returns true if a special normal was set by set_effective_normal(), false
otherwise.
*/
- has_effective_normal()
C++ Interface: has_effective_normal(CollisionSolid self)
- /**
Returns true if a special normal was set by set_effective_normal(), false
otherwise.
*/
- isTangible()
C++ Interface: is_tangible(CollisionSolid self)
- /**
Returns whether the solid is considered ‘tangible’ or not. An intangible
solid has no effect in a CollisionHandlerPusher (except to throw an event);
it’s useful for defining ‘trigger’ planes and spheres, that cause an effect
when passed through.
*/
- is_tangible()
C++ Interface: is_tangible(CollisionSolid self)
- /**
Returns whether the solid is considered ‘tangible’ or not. An intangible
solid has no effect in a CollisionHandlerPusher (except to throw an event);
it’s useful for defining ‘trigger’ planes and spheres, that cause an effect
when passed through.
*/
- respect_effective_normal
- setBounds()
C++ Interface: set_bounds(const CollisionSolid self, const BoundingVolume bounding_volume)
- /**
Returns the solid’s bounding volume.
*/
- setEffectiveNormal()
C++ Interface: set_effective_normal(const CollisionSolid self, const LVector3f effective_normal)
- /**
Records a false normal for this CollisionSolid that will be reported by the
collision system with all collisions into it, instead of its actual normal.
This is useful as a workaround for the problem of an avatar wanting to
stand on a sloping ground; by storing a false normal, the ground appears to
be perfectly level, and the avatar does not tend to slide down it.
*/
- setRespectEffectiveNormal()
C++ Interface: set_respect_effective_normal(const CollisionSolid self, bool respect_effective_normal)
- /**
This is only meaningful for CollisionSolids that will be added to a
traverser as colliders. It is normally true, but if set false, it means
that this particular solid does not care about the “effective” normal of
other solids it meets, but rather always uses the true normal.
*/
- setTangible()
C++ Interface: set_tangible(const CollisionSolid self, bool tangible)
- /**
Sets the current state of the ‘tangible’ flag. Set this true to make the
solid tangible, so that a CollisionHandlerPusher will not allow another
object to intersect it, or false to make it intangible, so that a
CollisionHandlerPusher will ignore it except to throw an event.
*/
- set_bounds()
C++ Interface: set_bounds(const CollisionSolid self, const BoundingVolume bounding_volume)
- /**
Returns the solid’s bounding volume.
*/
- set_effective_normal()
C++ Interface: set_effective_normal(const CollisionSolid self, const LVector3f effective_normal)
- /**
Records a false normal for this CollisionSolid that will be reported by the
collision system with all collisions into it, instead of its actual normal.
This is useful as a workaround for the problem of an avatar wanting to
stand on a sloping ground; by storing a false normal, the ground appears to
be perfectly level, and the avatar does not tend to slide down it.
*/
- set_respect_effective_normal()
C++ Interface: set_respect_effective_normal(const CollisionSolid self, bool respect_effective_normal)
- /**
This is only meaningful for CollisionSolids that will be added to a
traverser as colliders. It is normally true, but if set false, it means
that this particular solid does not care about the “effective” normal of
other solids it meets, but rather always uses the true normal.
*/
- set_tangible()
C++ Interface: set_tangible(const CollisionSolid self, bool tangible)
- /**
Sets the current state of the ‘tangible’ flag. Set this true to make the
solid tangible, so that a CollisionHandlerPusher will not allow another
object to intersect it, or false to make it intangible, so that a
CollisionHandlerPusher will ignore it except to throw an event.
*/
- tangible