# CollisionDSSolid

from pandac.PandaModules import CollisionDSSolid

Class : CollisionDSSolid
Description : A collision volume or object made up of the intersection of two spheres (potentially a lens) and two half-spaces (planes).

## Inheritance:

CollisionDSSolid: CollisionSolid
CollisionSolid: TypedWritableReferenceCount
TypedWritableReferenceCount: TypedWritable ReferenceCount
TypedWritable: TypedObject
TypedObject:
ReferenceCount:

## Methods of CollisionDSSolid:

distToPlaneA
distToPlaneB
getCenterA
getCenterB
getClassType
getNormalA
getNormalB
getPlaneA
getPlaneB
getRadiusA
getRadiusB
setCenterA
setCenterB
setPlaneA
setPlaneB
setRadiusA
setRadiusB

## Methods of CollisionSolid:

clearEffectiveNormal
getBounds
getClassType
getEffectiveNormal
getRespectEffectiveNormal
hasEffectiveNormal
isTangible
output
setEffectiveNormal
setRespectEffectiveNormal
setTangible
write

## Methods of TypedWritableReferenceCount:

getClassType

## Methods of TypedWritable:

getClassType

## Methods of TypedObject:

getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

distToPlaneA float CollisionDSSolid::dist_to_plane_a(LPoint3f const &point) const; Plane a Description:

distToPlaneB float CollisionDSSolid::dist_to_plane_b(LPoint3f const &point) const; Plane b Description:

getCenterA LPoint3f const &CollisionDSSolid::get_center_a(void) const; Description:

getCenterB LPoint3f const &CollisionDSSolid::get_center_b(void) const; Description:

getClassType static TypeHandle CollisionDSSolid::get_class_type(void); Undocumented function.

getNormalA LVector3f CollisionDSSolid::get_normal_a(void) const; Plane a Description:

getNormalB LVector3f CollisionDSSolid::get_normal_b(void) const; Plane b Description:

getPlaneA Planef const &CollisionDSSolid::get_plane_a(void) const; Description:

getPlaneB Planef const &CollisionDSSolid::get_plane_b(void) const; Description:

getRadiusA float CollisionDSSolid::get_radius_a(void) const; Description:

getRadiusB float CollisionDSSolid::get_radius_b(void) const; Description:

setCenterA void CollisionDSSolid::set_center_a(LPoint3f const &center); Sphere a Description:

setCenterB void CollisionDSSolid::set_center_b(LPoint3f const &center); Sphere b Description:

setPlaneA void CollisionDSSolid::set_plane_a(Planef const &plane); Description:

setPlaneB void CollisionDSSolid::set_plane_b(Planef const &plane); Description:

setRadiusA void CollisionDSSolid::set_radius_a(float radius); Description:

setRadiusB void CollisionDSSolid::set_radius_b(float radius); Description:

clearEffectiveNormal void CollisionSolid::clear_effective_normal(void); Description: Removes the normal previously set by set_effective_normal().

getBounds ConstPointerTo< BoundingVolume > CollisionSolid::get_bounds(void) const; Description: Returns the solid's bounding volume.

getClassType static TypeHandle CollisionSolid::get_class_type(void); Undocumented function.

getEffectiveNormal LVector3f const &CollisionSolid::get_effective_normal(void) const; Description: Returns the normal that was set by set_effective_normal(). It is an error to call this unless has_effective_normal() returns true.

getRespectEffectiveNormal bool CollisionSolid::get_respect_effective_normal(void) const; Description: See set_respect_effective_normal().

hasEffectiveNormal bool CollisionSolid::has_effective_normal(void) const; Description: Returns true if a special normal was set by set_effective_normal(), false otherwise.

isTangible bool CollisionSolid::is_tangible(void) const; Description: 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.

output virtual void CollisionSolid::output(ostream &out) const; Description:

setEffectiveNormal void CollisionSolid::set_effective_normal(LVector3f const &effective_normal); Description: 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 void CollisionSolid::set_respect_effective_normal(bool respect_effective_normal); Description: 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 void CollisionSolid::set_tangible(bool tangible); Filename: collisionSolid.I Created by: drose (27Jun00) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: 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.

write virtual void CollisionSolid::write(ostream &out, int indent_level = (0)) const; Description:

getClassType static TypeHandle TypedWritableReferenceCount::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedWritable::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.