CollisionRay

Inheritance:

Methods of CollisionRay:

Methods of CollisionSolid:

Methods of CopyOnWriteObject:

Methods of CachedTypedWritableReferenceCount:

Methods of TypedWritableReferenceCount:

Methods of TypedWritable:

Methods of TypedObject:

Methods of ReferenceCount:

getClassType
static TypeHandle CollisionRay::get_class_type(void);

Undocumented function.

getDirection
LVector3f const &CollisionRay::get_direction(void) const;

Description:

getOrigin
LPoint3f const &CollisionRay::get_origin(void) const;

Description:

setDirection
void CollisionRay::set_direction(LVector3f const &direction);

Description:

setFromLens
bool CollisionRay::set_from_lens(LensNode *camera, LPoint2f const &point);

Description: 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
void CollisionRay::set_origin(LPoint3f const &origin);

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

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 CopyOnWriteObject::get_class_type(void);

Undocumented function.

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.