Panda3D

Functions
renderEffect.cxx File Reference

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

`#include "renderEffect.h"`
`#include "bamReader.h"`
`#include "indent.h"`
`#include "config_pgraph.h"`

Go to the source code of this file.

## Functions
| CPT (RenderEffect) RenderEffect
| This function is used by derived RenderEffect types to share a common RenderEffect pointer for all equivalent RenderEffect objects. More...
| CPT (TransformState) RenderEffect
| Preprocesses the accumulated transform that is about to be applied to (or through) this node due to a flatten operation. 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-14

Definition in file renderEffect.cxx.

## Function Documentation

## ◆ CPT() [1/2]

CPT | ( | RenderEffect |  | ) |

This function is used by derived RenderEffect types to share a common RenderEffect pointer for all equivalent RenderEffect objects.

The make() function of the derived type should create a new RenderEffect and pass it through return_new(), which will either save the pointer and return it unchanged (if this is the first similar such object) or delete it and return an equivalent pointer (if there was already a similar object saved).

Definition at line 232 of file renderEffect.cxx.

## ◆ CPT() [2/2]

CPT | ( | TransformState |  | ) |

Preprocesses the accumulated transform that is about to be applied to (or through) this node due to a flatten operation.

The returned value will be used instead.

Returns true if this kind of effect can safely be combined with sibling nodes that share the exact same effect, or false if this is not a good idea.

Returns a new RenderEffect transformed by the indicated matrix.

Should be overridden by derived classes to return true if cull_callback() has been defined. Otherwise, returns false to indicate cull_callback() does not need to be called for this effect during the cull traversal.

If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time. This may include additional manipulation of render state or additional visible/invisible decisions, or any other arbitrary operation.

At the time this function is called, the current node's transform and state have not yet been applied to the net_transform and net_state. This callback may modify the node_transform and node_state to apply an effective change to the render state at this level.

Should be overridden by derived classes to return true if adjust_transform() has been defined, and therefore the RenderEffect has some effect on the node's apparent local and net transforms.

Performs some operation on the node's apparent net and/or local transforms. This will only be called if has_adjust_transform() is redefined to return true.

Both parameters are in/out. The original transforms will be passed in, and they may (or may not) be modified in-place by the RenderEffect.

Returns the total number of unique RenderEffect objects allocated in the world. This will go up and down during normal operations.

Definition at line 77 of file renderEffect.cxx.