Panda3D
Functions
collisionNode.cxx File Reference

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

#include "collisionNode.h"
#include "config_collide.h"
#include "geomNode.h"
#include "cullTraverserData.h"
#include "cullTraverser.h"
#include "renderState.h"
#include "transformState.h"
#include "colorScaleAttrib.h"
#include "transparencyAttrib.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "clockObject.h"
#include "boundingSphere.h"
#include "boundingBox.h"
#include "config_mathutil.h"

Go to the source code of this file.

Functions

 CPT (RenderState) CollisionNode
 Returns a RenderState for rendering the ghosted collision solid that represents the previous frame's position, for those collision nodes that indicate a velocity. 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
2002-03-16

Definition in file collisionNode.cxx.

Function Documentation

◆ CPT()

CPT ( RenderState  )
inline

Returns a RenderState for rendering the ghosted collision solid that represents the previous frame's position, for those collision nodes that indicate a velocity.

Returns a RenderState for rendering the new element during second half of fade.

Returns a RenderState for rendering the old element during second half of fade.

Returns a RenderState for rendering the new element during first half of fade.

Given an input state, returns the munged state.

Returns a new RenderState object that represents the same as the source state, with the indicated RenderAttrib removed.

The private implemention of compose(); this actually composes two RenderStates, without bothering with the cache.

This function is used to share a common RenderState pointer for all equivalent RenderState objects.

Returns a new RenderState object that represents the composition of this state with the other state.

Returns a RenderState with n attributes set.

Returns a RenderState with five attributes set.

Returns a RenderState with four attributes set.

Returns a RenderState with three attributes set.

Returns a RenderState with two attributes set.

Returns the RenderState to apply to the frame.

Recursively determines the net state changes to the indicated component node from the root of the graph.

Returns a RenderState for increasing the DepthOffset by one.

Returns a RenderState for rendering the inside surfaces of the bounding volume visualizations.

Returns a RenderState for flashing the object blue, to show it is animated by the hardware when show-vertex-animation is on.

Called during draw to begin a three-step rendering phase to draw decals.

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.

The second step, begin_decal_nested(), is called after drawing the base geometry and prior to drawing any of the nested decal geometry that is to be applied to the base geometry.

The third step, begin_decal_base_second(), is called after drawing the base geometry and the nested decal geometry, and prior to drawing the base geometry one more time (if needed).

It should return a RenderState object appropriate for rendering the base geometry the second time, or NULL if it is not necessary to re-render the base geometry.

Recursively determines the net state changes to the indicated component node from the nth node above it. If n exceeds the length of the path, this returns the net transform from the root of the graph. Recursively determines the net transform to the indicated component node from the root of the graph. Recursively determines the net transform to the indicated component node from the nth node above it. If n exceeds the length of the path, this returns the net transform from the root of the graph.

If any node in the path had a net_transform effect applied, returns NULL– in this case the partial transform cannot be easily determined. Recursively determines the net "previous" transform to the indicated component node from the root of the graph. Recursively determines the net "previous" transform to the indicated component node from the nth node above it. If n exceeds the length of the path, this returns the net previous transform from the root of the graph. Finds up to max_matches matches against the given path string from this node and deeper. The max_matches count indicates the maximum number of matches to return, or -1 not to limit the number returned. Finds up to max_matches matches against the given approx_path from this node and deeper. The max_matches count indicates the maximum number of matches to return, or -1 not to limit the number returned. The fundamental implementation of find_matches(), given a starting level (a linked list of FindApproxLevelEntry objects). The recursive implementation of clear_model_nodes(). This walks through the subgraph defined by the indicated node and below.

The result of this operation is cached, and will be retained as long as both this RenderState object and the other RenderState object continue to exist. Should one of them destruct, the cached entry will be removed, and its pointer will be allowed to destruct as well. Returns a new RenderState object that represents the composition of this state's inverse with the other state.

This is similar to compose(), but is particularly useful for computing the relative state of a node as viewed from some other node. Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced (unless the override is lower). Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced unconditionally. The override is not changed. Returns a new RenderState object that represents the same as the source state, with the new RenderAttrib added. If there is already a RenderAttrib with the same type, it is replaced unconditionally. The override is also replaced unconditionally. Returns a new RenderState object that represents the same as the source state, with the indicated RenderAttrib removed. Returns a new RenderState object that represents the same as the source state, with all attributes' override values incremented (or decremented, if negative) by the indicated amount. If the override would drop below zero, it is set to zero. This method overrides ReferenceCount::unref() to check whether the remaining reference count is entirely in the cache, and if so, it checks for and breaks a cycle in the cache involving this object. This is designed to prevent leaks from cyclical references within the cache. Returns the maximum priority number (sometimes called override) that may be set on any node. This may or may not be enforced, but the scene graph code assumes that no priority numbers will be larger than this, and some effects may not work properly if you use a larger number.

This is different from return_unique() in that it does not actually guarantee a unique pointer, unless uniquify-states is set.

See the similar logic in RenderAttrib. The idea is to create a new RenderState object and pass it through this function, which will share the pointer with a previously-created RenderState object if it is equivalent.

The private implemention of invert_compose(). Detects whether there is a cycle in the cache that begins with this state. If any are detected, breaks them by removing this state from the cache.

Returns true if an attrib of the indicated type is present, false otherwise. Returns true if an attrib of the indicated type is present, false otherwise. Looks for a RenderAttrib of the indicated type in the state, and returns it if it is found, or NULL if it is not. Returns the RenderAttrib with the indicated slot index, or NULL if there is no such RenderAttrib in the state. Returns the RenderAttrib with the indicated slot index, or the default attrib for that slot if there is no such RenderAttrib in the state. Looks for a RenderAttrib of the indicated type in the state, and returns its override value if it is found, or 0 if it is not. Looks for a RenderAttrib of the indicated type in the state, and returns its override value if it is found, or 0 if it is not. Returns the pointer to the unique RenderState in the cache that is equivalent to this one. This may be the same pointer as this object, or it may be a different pointer; but it will be an equivalent object, and it will be a shared pointer. This may be called from time to time to improve cache benefits. Overrides this method to update PStats appropriately. Overrides this method to update PStats appropriately. Overrides this method to update PStats appropriately. Overrides this method to update PStats appropriately. Returns the number of entries in the composition cache for this RenderState. This is the number of other RenderStates whose composition with this one has been cached. This number is not useful for any practical reason other than performance analysis. Returns the number of entries in the invert_composition cache for this RenderState. This is similar to the composition cache, but it records cache entries for the invert_compose() operation. See get_composition_cache_num_entries(). Returns the number of slots in the composition cache for this RenderState. You may use this as an upper bound when walking through all of the composition cache results via get_composition_cache_source() or result().

This has no practical value other than for examining the cache for performance analysis. Returns the source RenderState of the nth element in the composition cache. Returns NULL if there doesn't happen to be an entry in the nth element. See get_composition_cache_result().

This has no practical value other than for examining the cache for performance analysis. Returns the result RenderState of the nth element in the composition cache. Returns NULL if there doesn't happen to be an entry in the nth element.

In general, a->compose(a->get_composition_cache_source(n)) == a->get_composition_cache_result(n).

This has no practical value other than for examining the cache for performance analysis. Returns the number of slots in the composition cache for this RenderState. You may use this as an upper bound when walking through all of the composition cache results via get_invert_composition_cache_source() or result().

This has no practical value other than for examining the cache for performance analysis. Returns the source RenderState of the nth element in the invert composition cache. Returns NULL if there doesn't happen to be an entry in the nth element. See get_invert_composition_cache_result().

This has no practical value other than for examining the cache for performance analysis. Returns the result RenderState of the nth element in the invert composition cache. Returns NULL if there doesn't happen to be an entry in the nth element.

In general, a->invert_compose(a->get_invert_composition_cache_source(n)) == a->get_invert_composition_cache_result(n).

This has no practical value other than for examining the cache for performance analysis. Returns the draw order indicated by the CullBinAttrib, if any, associated by this state (or 0 if there is no CullBinAttrib). See get_bin_index(). Returns the bin index indicated by the CullBinAttrib, if any, associated by this state (or the default bin index if there is no CullBinAttrib). This function is provided as an optimization for determining this at render time. This function should only be called from the destructor; it indicates that this RenderState object is beginning destruction. It is only used as a sanity check, and is only meaningful when NDEBUG is not defined.

Definition at line 330 of file collisionNode.cxx.