Panda3D
Functions
texProjectorEffect.cxx File Reference

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

#include "texProjectorEffect.h"
#include "cullTraverserData.h"
#include "texMatrixAttrib.h"
#include "lensNode.h"
#include "config_pgraph.h"
#include "nodePath.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"

Go to the source code of this file.

Functions

 CPT (RenderEffect) TexProjectorEffect
 Constructs a TexProjectorEffect that modifies no stages at all. 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
2004-07-25

Definition in file texProjectorEffect.cxx.

Function Documentation

◆ CPT()

CPT ( RenderEffect  )

Constructs a TexProjectorEffect that modifies no stages at all.

Returns a new TexProjectorEffect just like this one, with the indicated projection for the given stage.

If this stage already exists, its projection definition is replaced.

The relative transform between the "from" and the "to" nodes is automatically applied to the texture transform each frame.

Furthermore, if the "to" node is a LensNode, its projection matrix is also applied to the texture transform. In this case, the lens_index may be used to select the particular lens that should be used. Returns a new TexProjectorEffect just like this one, with the indicated stage removed. Returns true if no stages are defined in the TexProjectorEffect, false if at least one is. Returns true if there is a transform associated with the indicated stage, or false otherwise (in which case get_transform(stage) will return the identity transform). Returns the "from" node associated with the TexProjectorEffect on the indicated stage. The relative transform between the "from" and the "to" nodes is automatically applied to the texture transform each frame. Returns the "to" node associated with the TexProjectorEffect on the indicated stage. The relative transform between the "from" and the "to" nodes is automatically applied to the texture transform each frame.

Furthermore, if the "to" node is a LensNode, its projection matrix is also applied to the texture transform. Returns the lens_index associated with the TexProjectorEffect on the indicated stage. This is only used if the "to" node is a LensNode, in which case it specifies the particular lens that should be used. 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. Intended to be overridden by derived TexProjectorEffect types to return a unique number indicating whether this TexProjectorEffect is equivalent to the other one.

This should return 0 if the two TexProjectorEffect objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.

This will only be called with two TexProjectorEffect objects whose get_type() functions return the same. Tells the BamReader how to create objects of type TexProjectorEffect.

Definition at line 38 of file texProjectorEffect.cxx.