Panda3D

Functions
collisionSolid.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

`#include "collisionSolid.h"`
`#include "config_collide.h"`
`#include "collisionSphere.h"`
`#include "collisionLine.h"`
`#include "collisionRay.h"`
`#include "collisionSegment.h"`
`#include "collisionCapsule.h"`
`#include "collisionParabola.h"`
`#include "collisionBox.h"`
`#include "collisionEntry.h"`
`#include "boundingSphere.h"`
`#include "datagram.h"`
`#include "datagramIterator.h"`
`#include "bamReader.h"`
`#include "bamWriter.h"`
`#include "indent.h"`
`#include "cullFaceAttrib.h"`
`#include "colorAttrib.h"`
`#include "renderModeAttrib.h"`
`#include "transparencyAttrib.h"`
`#include "geomNode.h"`

Go to the source code of this file.

## Functions
| CPT (BoundingVolume) CollisionSolid
| Returns the solid's bounding volume. More...
| CPT (RenderState) CollisionSolid
| Returns a RenderState for rendering collision visualizations in solid. More...
| PT (CollisionEntry) CollisionSolid
| Tests for a collision between this object (which is also the "from" object in the entry) and the "into" object. More...
| PT (CopyOnWriteObject) CollisionSolid
| Required to implement CopyOnWriteObject. More...
| PT (PandaNode) CollisionSolid
| Returns a GeomNode that may be rendered to visualize the CollisionSolid. More...

## Detailed Description

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."

Author
  drose

Date
  2000-04-24

Definition in file collisionSolid.cxx.

## Function Documentation

## ◆ CPT() [1/2]

CPT | ( | BoundingVolume |  | ) |
| inline

Returns the solid's bounding volume.

Returns the node's user bounding volume.

Returns the node's internal bounding volume.

Returns the solid's bounding volume.

This is the bounding volume around the node alone, without including children.

Returns the total number of vertices that will be rendered by this particular node alone, not accounting for its children.

This may not include all vertices for certain dynamic effects.

This is provided as an alternate way for a node to set its own internal bounds, rather than overloading compute_internal_bounds(). If this method is called, the internal bounding volume will immediately be set to the indicated pointer.

This is the bounding volume specified with get_bounds(). This will return NULL if the user bounding volume has never been set.

Indicates that the bounding volume, or something that influences the bounding volume (or any of the other things stored in CData, like net_collide_mask), may have changed for this node, and that it must be recomputed.

Should be called by a derived class to mark the internal bounding volume stale, so that recompute_internal_bounds() will be called when the bounding volume is next requested.

Definition at line 82 of file collisionSolid.cxx.

## ◆ CPT() [2/2]

CPT | ( | RenderState |  | ) |

Returns a RenderState for rendering collision visualizations in solid.

Returns a RenderState for rendering collision visualizations for things that are neither solid nor exactly wireframe, like rays and segments.

Returns a RenderState for rendering collision visualizations in wireframe.

This automatically returns the appropriate state according to the setting of _tangible.

Assumes the lock is already held.

Assumes the lock is already held.

Definition at line 388 of file collisionSolid.cxx.

## ◆ PT() [1/3]

PT | ( | CollisionEntry |  | ) |

Tests for a collision between this object (which is also the "from" object in the entry) and the "into" object.

If a collision is detected, returns a new CollisionEntry object that records the collision; otherwise, returns NULL.

Transforms the solid by the indicated matrix.

Definition at line 108 of file collisionSolid.cxx.

## ◆ PT() [2/3]

PT | ( | CopyOnWriteObject |  | ) |

Required to implement CopyOnWriteObject.

Definition at line 74 of file collisionSolid.cxx.

## ◆ PT() [3/3]

PT | ( | PandaNode |  | ) |

Returns a GeomNode that may be rendered to visualize the CollisionSolid.

This is used during the cull traversal to render the CollisionNodes that have been made visible.

Returns a PStatCollector that is used to count the number of bounding volume tests made against a solid of this type in a given frame.

Definition at line 133 of file collisionSolid.cxx.