Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

# CollisionNode Class Reference

A node in the scene graph that can hold any number of CollisionSolids. More...

Inheritance diagram for CollisionNode:

List of all members.

## Public Member Functions
| CollisionNode (string name)
int | addSolid (CollisionSolid const solid)
| Adds the indicated solid to the node.
| clearSolids ()
| Removes all solids from the node.
int | getColliderSort ()
| Returns the collider_sort value that has been set for this particular node.
static BitMaskunsigned | getDefaultCollideMask ()
BitMaskunsigned | getFromCollideMask ()
BitMaskunsigned | getIntoCollideMask ()
int | getNumSolids ()
CollisionSolid const | getSolid (int n)
list | getSolids ()
CollisionSolid | modifySolid (int n)
| removeSolid (int n)
| Removes the solid with the indicated index.
| setCollideMask (BitMaskunsigned int, 32 mask)
| Simultaneously sets both the "from" and "into" CollideMask values to the same thing.
| setColliderSort (int sort)
| Sets a particular collider_sort value on this node.
| setFromCollideMask (BitMaskunsigned int, 32 mask)
| Sets the "from" CollideMask.
| setIntoCollideMask (BitMaskunsigned int, 32 mask)
| Sets the "into" CollideMask.
| setSolid (int n, CollisionSolid solid)
| Replaces the solid with the indicated index.
## Static Public Member Functions
static TypeHandle | getClassType ()
## Public Attributes
BitMaskunsigned | int
| Returns the current "from" CollideMask.
## Static Public Attributes
static BitMaskunsigned | int
| Returns the default into_collide_mask assigned to new CollisionNodes.

## Detailed Description

A node in the scene graph that can hold any number of CollisionSolids.

This may either represent a bit of static geometry in the scene that things will collide with, or an animated object twirling around in the world and running into things.

## Constructor & Destructor Documentation

CollisionNode | ( | string | name | ) |

## Member Function Documentation

int addSolid | ( | CollisionSolid const | solid | ) |

Adds the indicated solid to the node.

Returns the index of the new solid within the node's list of solids.

clearSolids | ( |  | ) |

Removes all solids from the node.

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from PandaNode.

int getColliderSort | ( |  | ) |

Returns the collider_sort value that has been set for this particular node.

See set_collider_sort().

static BitMaskunsigned getDefaultCollideMask | ( |  | ) |

BitMaskunsigned getFromCollideMask | ( |  | ) |

BitMaskunsigned getIntoCollideMask | ( |  | ) |

Reimplemented from PandaNode.

int getNumSolids | ( |  | ) |

CollisionSolid const getSolid | ( | int | n | ) |

list getSolids | ( |  | ) |

CollisionSolid modifySolid | ( | int | n | ) |

removeSolid | ( | int | n | ) |

Removes the solid with the indicated index.

This will shift all subsequent indices down by one.

setCollideMask | ( | BitMaskunsigned | int,
|  | 32 | mask
| ) |  |

Simultaneously sets both the "from" and "into" CollideMask values to the same thing.

setColliderSort | ( | int | sort | ) |

Sets a particular collider_sort value on this node.

This controls the order in which colliders (that is, "from nodes") are grouped together for the collision traversal.

If there are 32 or fewer colliders added to any particular CollisionTraverser, then this value has no meaning. It is only useful if there are many colliders, which may force the CollisionTraverser to make multiple passes through the data; in that case, it may be a useful optimization to group colliders that have similar bounding volumes together (by giving them similar sort values).

setFromCollideMask | ( | BitMaskunsigned | int,
|  | 32 | mask
| ) |  |

Sets the "from" CollideMask.

In order for a collision to be detected from this object into another object, the intersection of this object's "from" mask and the other object's "into" mask must be nonzero.

setIntoCollideMask | ( | BitMaskunsigned | int,
|  | 32 | mask
| ) |  |

Sets the "into" CollideMask.

In order for a collision to be detected from another object into this object, the intersection of the other object's "from" mask and this object's "into" mask must be nonzero.

Reimplemented from PandaNode.

setSolid | ( | int | n,
|  | CollisionSolid | solid
| ) |  |

Replaces the solid with the indicated index.

## Member Data Documentation

BitMaskunsigned int

Returns the current "from" CollideMask.

Returns the current "into" CollideMask.

In order for a collision to be detected from this object into another object, the intersection of this object's "from" mask and the other object's "into" mask must be nonzero.

In order for a collision to be detected from another object into this object, the intersection of the other object's "from" mask and this object's "into" mask must be nonzero.

Reimplemented from PandaNode.

BitMaskunsigned int`[static]`

Returns the default into_collide_mask assigned to new CollisionNodes.

Reimplemented from PandaNode.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties