Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/distort/projectionScreen.cxx File Reference

#include "projectionScreen.h"
#include "geomNode.h"
#include "geom.h"
#include "geomTristrip.h"
#include "transformState.h"
#include "workingNodePath.h"
#include "switchNode.h"

Go to the source code of this file.

Functions

 PT (GeomNode) ProjectionScreen
 Returns a Geom that renders the particular glyph.

 PT (PandaNode) ProjectionScreen
 Generates a deep copy of the hierarchy at the ProjectionScreen node and below, with vertices flattened into two dimensions as if they were seen by the indicated camera node.


Detailed Description

Definition in file projectionScreen.cxx.


Function Documentation

EXPCL_PANDAEGG PT PandaNode   ) 
 

Generates a deep copy of the hierarchy at the ProjectionScreen node and below, with vertices flattened into two dimensions as if they were seen by the indicated camera node.

This is useful for rendering an image as seen through a non-linear lens. The resulting mesh will have vertices in the range [-1, 1] in both x and y, and may be then rendered with an ordinary orthographic lens, to generate the effect of seeing the image through the specified non-linear lens.

The returned node has no parent; it is up to the caller to parent it somewhere or store it so that it does not get dereferenced and deleted.

Definition at line 389 of file projectionScreen.cxx.

References DCAST, PandaNode::get_child(), SwitchNode::get_class_type(), PandaNode::get_num_children(), TypedObject::is_exact_type(), PandaNode::is_geom_node(), and WorkingNodePath::node().

PT GeomNode   ) 
 

Returns a Geom that renders the particular glyph.

This generates and returns a new GeomNode but does not automatically parent it to the ProjectionScreen node; see regenerate_screen().

The specified projector need not be the same as the projector given to the ProjectionScreen with set_projector() (although this is often what you want).

num_x_verts and num_y_verts specify the number of vertices to make in the grid across the horizontal and vertical dimension of the projector, respectively; distance represents the approximate distance of the screen from the lens center.

Definition at line 237 of file projectionScreen.cxx.


Generated on Fri May 2 00:45:19 2003 for Panda by doxygen1.3