API Reference: CollisionDSSolid

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:

Methods of CollisionDSSolid:

Methods of CollisionSolid:

Methods of CopyOnWriteObject:

Methods of CachedTypedWritableReferenceCount:

Methods of TypedWritableReferenceCount:

Methods of TypedWritable:

Methods of TypedObject:

Methods of ReferenceCount:

CollisionDSSolid
CollisionDSSolid::CollisionDSSolid(LPoint3f const &center_a, float radius_a, LPoint3f const &center_b, float radius_b, Planef const &plane_a, Planef const &plane_b);

Filename: collisionDSSolid.I Created by: Dave Schuyler (05Apr06) Based on collision tube by: drose
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. All rights reserved.
All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."
Description:
Description: Creates an invalid tube. Only used when reading from a bam file.

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.

getCollisionOrigin
virtual LPoint3f CollisionSolid::get_collision_origin(void) const = 0;

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:

setBounds
void CollisionSolid::set_bounds(BoundingVolume const &bounding_volume);

Description: Returns the solid's bounding volume.

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);

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:

cacheRef
void CopyOnWriteObject::cache_ref(void) const;

Description: See CachedTypedWritableReferenceCount::cache_ref().

getClassType
static TypeHandle CopyOnWriteObject::get_class_type(void);

Undocumented function.

unref
bool CopyOnWriteObject::unref(void) const;

Description: Explicitly decrements the reference count. See ReferenceCount::unref().
In the case of a CopyOnWriteObject, when the reference count decrements down to the cache reference count, the object is implicitly unlocked.

cacheRef
void CachedTypedWritableReferenceCount::cache_ref(void) const;

Description: Explicitly increments the cache reference count and the normal reference count simultaneously.

cacheUnref
bool CachedTypedWritableReferenceCount::cache_unref(void) const;

Description: Explicitly decrements the cache reference count and the normal reference count simultaneously.
The return value is true if the new reference count is nonzero, false if it is zero.

getCacheRefCount
int CachedTypedWritableReferenceCount::get_cache_ref_count(void) const;

Description: Returns the current reference count.

getClassType
static TypeHandle CachedTypedWritableReferenceCount::get_class_type(void);

Undocumented function.

testRefCountIntegrity
bool CachedTypedWritableReferenceCount::test_ref_count_integrity(void) const;

Description: Does some easy checks to make sure that the reference count isn't completely bogus.

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.