Panda3D
Functions
scissorEffect.cxx File Reference

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

#include "scissorEffect.h"
#include "scissorAttrib.h"
#include "cullTraverser.h"
#include "cullTraverserData.h"
#include "nodePath.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "boundingHexahedron.h"
#include "lens.h"

Go to the source code of this file.

Functions

 CPT (RenderEffect) ScissorEffect
 Constructs a new screen-relative ScissorEffect. 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
2008-07-30

Definition in file scissorEffect.cxx.

Function Documentation

◆ CPT()

CPT ( RenderEffect  )

Constructs a new screen-relative ScissorEffect.

Returns a new ScissorEffect with the indicated point added.

Constructs a new node-relative ScissorEffect.

Constructs a new node-relative ScissorEffect, with no points.

The frame defines a left, right, bottom, top region, relative to the DisplayRegion. See ScissorAttrib.

This empty ScissorEffect does nothing. You must then call add_point a number of times to add the points you require.

The two points are understood to be relative to the indicated node, or the current node if the NodePath is empty, and determine the diagonally opposite corners of the scissor region.

The four points are understood to be relative to the indicated node, or the current node if the indicated NodePath is empty, and determine four points surrounding the scissor region.

It is only valid to call this on a "node" type ScissorEffect. The full set of points, projected into screen space, defines the bounding volume of the rectangular scissor region.

Each point may be relative to a different node, if desired. 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. Intended to be overridden by derived ScissorEffect types to return a unique number indicating whether this ScissorEffect is equivalent to the other one.

This should return 0 if the two ScissorEffect 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 ScissorEffect objects whose get_type() functions return the same. Tells the BamReader how to create objects of type ScissorEffect.

Definition at line 62 of file scissorEffect.cxx.