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

ProjectionScreen Class Reference

#include <projectionScreen.h>

Inheritance diagram for ProjectionScreen:

PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

virtual PandaNodemake_copy () const
virtual bool has_cull_callback () const
virtual bool cull_callback (CullTraverser *trav, CullTraverserData &data)
INLINE const NodePathget_projector () const
 PT (GeomNode) generate_screen(const NodePath &projector
void regenerate_screen (const NodePath &projector, const string &screen_name, int num_x_verts, int num_y_verts, float distance)
 PT (PandaNode) make_flat_mesh(const NodePath &camera)
INLINE void set_invert_uvs (bool invert_uvs)
INLINE bool get_invert_uvs () const
INLINE void set_vignette_on (bool vignette_on)
INLINE bool get_vignette_on () const
INLINE void set_vignette_color (const Colorf &vignette_color)
INLINE const Colorfget_vignette_color () const
INLINE void set_frame_color (const Colorf &frame_color)
INLINE const Colorfget_frame_color () const
void recompute ()
INLINE const UpdateSeqget_last_screen () const
void recompute_if_stale ()
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: void set_projector(const NodePath &projector)
const string & screen_name
const string int num_x_verts
const string int int num_y_verts
const string int int float distance

Protected Member Functions

 ProjectionScreen (const ProjectionScreen &copy)

Private Member Functions

virtual ~ProjectionScreen ()
void do_recompute (const NodePath &this_np)
void recompute_node (const WorkingNodePath &np, LMatrix4f &rel_mat, bool &computed_rel_mat)
void recompute_child (const WorkingNodePath &np, LMatrix4f &rel_mat, bool &computed_rel_mat)
void recompute_geom_node (const WorkingNodePath &np, LMatrix4f &rel_mat, bool &computed_rel_mat)
void recompute_geom (Geom *geom, const LMatrix4f &rel_mat)
PandaNodemake_mesh_node (PandaNode *result_parent, const WorkingNodePath &np, const NodePath &camera, LMatrix4f &rel_mat, bool &computed_rel_mat)
void make_mesh_children (PandaNode *new_node, const WorkingNodePath &np, const NodePath &camera, LMatrix4f &rel_mat, bool &computed_rel_mat)
 PT (GeomNode) make_mesh_geom_node(const WorkingNodePath &np
 PT (Geom) make_mesh_geom(Geom *geom
 PT (LensNode) _projector_node

Private Attributes

PUBLISHED __pad0__: ProjectionScreen(const string &name = "")
const NodePathcamera
const NodePath LMatrix4f & rel_mat
const NodePath LMatrix4f bool & computed_rel_mat
Lenslens
Lens LMatrix4f & rel_mat
NodePath _projector
bool _invert_uvs
bool _vignette_on
Colorf _vignette_color
Colorf _frame_color
PTA_Colorf _colors
LMatrix4f _rel_top_mat
bool _computed_rel_top_mat
bool _stale
UpdateSeq _projector_lens_change
UpdateSeq _last_screen

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

ProjectionScreen::~ProjectionScreen  )  [private, virtual]
 

Definition at line 51 of file projectionScreen.cxx.

ProjectionScreen::ProjectionScreen const ProjectionScreen &  copy  )  [protected]
 

Definition at line 60 of file projectionScreen.cxx.

References _computed_rel_top_mat, and _stale.

Referenced by make_copy().


Member Function Documentation

bool ProjectionScreen::cull_callback CullTraverser trav,
CullTraverserData data
[virtual]
 

Reimplemented from PandaNode.

Definition at line 119 of file projectionScreen.cxx.

References recompute_if_stale().

void ProjectionScreen::do_recompute const NodePath this_np  )  [private]
 

Definition at line 372 of file projectionScreen.cxx.

References _colors, _computed_rel_top_mat, _frame_color, _projector_lens_change, _rel_top_mat, _stale, _vignette_color, PointerToArray< Colorf >::clear(), NULL, PointerToArray< Colorf >::push_back(), and recompute_node().

Referenced by recompute(), and recompute_if_stale().

virtual TypeHandle ProjectionScreen::force_init_type void   )  [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 139 of file projectionScreen.h.

References PandaNode::get_class_type(), and PandaNode::init_type().

TypeHandle ProjectionScreen::get_class_type void   )  [inline, static]
 

Reimplemented from PandaNode.

Definition at line 128 of file projectionScreen.h.

INLINE const Colorf& ProjectionScreen::get_frame_color  )  const
 

INLINE bool ProjectionScreen::get_invert_uvs  )  const
 

INLINE const UpdateSeq& ProjectionScreen::get_last_screen  )  const
 

Referenced by NonlinearImager::add_screen().

INLINE const NodePath& ProjectionScreen::get_projector  )  const
 

virtual TypeHandle ProjectionScreen::get_type void   )  const [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 136 of file projectionScreen.h.

References PandaNode::get_class_type().

INLINE const Colorf& ProjectionScreen::get_vignette_color  )  const
 

INLINE bool ProjectionScreen::get_vignette_on  )  const
 

bool ProjectionScreen::has_cull_callback  )  const [virtual]
 

Reimplemented from PandaNode.

Definition at line 95 of file projectionScreen.cxx.

void ProjectionScreen::init_type void   )  [inline, static]
 

Reimplemented from PandaNode.

Definition at line 131 of file projectionScreen.h.

References PandaNode::get_class_type(), PandaNode::init_type(), and register_type().

Referenced by init_libdistort().

PandaNode * ProjectionScreen::make_copy  )  const [virtual]
 

Reimplemented from PandaNode.

Definition at line 81 of file projectionScreen.cxx.

References ProjectionScreen().

void ProjectionScreen::make_mesh_children PandaNode new_node,
const WorkingNodePath np,
const NodePath camera,
LMatrix4f &  rel_mat,
bool &  computed_rel_mat
[private]
 

Definition at line 569 of file projectionScreen.cxx.

References PandaNode::get_child(), PandaNode::get_num_children(), PandaNode::get_state(), PandaNode::get_transform(), make_mesh_node(), WorkingNodePath::node(), PandaNode::set_state(), transform, and PandaNode::WorkingNodePath.

Referenced by make_mesh_node().

PandaNode * ProjectionScreen::make_mesh_node PandaNode result_parent,
const WorkingNodePath np,
const NodePath camera,
LMatrix4f &  rel_mat,
bool &  computed_rel_mat
[private]
 

Definition at line 539 of file projectionScreen.cxx.

References PandaNode::add_child(), PandaNode::is_geom_node(), PandaNode::make_copy(), make_mesh_children(), WorkingNodePath::node(), NULL, PT(), and PandaNode::safe_to_flatten().

Referenced by make_mesh_children().

ProjectionScreen::PT LensNode   )  [private]
 

ProjectionScreen::PT Geom   )  [private]
 

ProjectionScreen::PT GeomNode   )  const [private]
 

ProjectionScreen::PT PandaNode   )  const [virtual]
 

Reimplemented from PandaNode.

ProjectionScreen::PT GeomNode   )  const
 

Referenced by make_mesh_node(), and regenerate_screen().

void ProjectionScreen::recompute  ) 
 

Definition at line 332 of file projectionScreen.cxx.

References do_recompute().

Referenced by recompute_if_stale().

void ProjectionScreen::recompute_child const WorkingNodePath np,
LMatrix4f &  rel_mat,
bool &  computed_rel_mat
[private]
 

Definition at line 433 of file projectionScreen.cxx.

References PandaNode::get_transform(), WorkingNodePath::node(), recompute_node(), and transform.

Referenced by recompute_node().

void ProjectionScreen::recompute_geom Geom geom,
const LMatrix4f &  rel_mat
[private]
 

Definition at line 481 of file projectionScreen.cxx.

References _colors, _invert_uvs, G_PER_VERTEX, Geom::get_next_vertex(), Geom::get_num_vertices(), lens, Geom::make_vertex_iterator(), NULL, Lens::project(), PointerToArray< unsigned short >::push_back(), PointerToArray< TexCoordf >::push_back(), Geom::set_colors(), Geom::set_texcoords(), and Vertexf.

Referenced by recompute_geom_node().

void ProjectionScreen::recompute_geom_node const WorkingNodePath np,
LMatrix4f &  rel_mat,
bool &  computed_rel_mat
[private]
 

Definition at line 458 of file projectionScreen.cxx.

References _projector, DCAST, GeomNode::get_geom(), NodePath::get_mat(), WorkingNodePath::get_node_path(), WorkingNodePath::node(), and recompute_geom().

Referenced by recompute_node().

void ProjectionScreen::recompute_if_stale  ) 
 

Definition at line 346 of file projectionScreen.cxx.

References _computed_rel_top_mat, _projector, _projector_lens_change, _rel_top_mat, _stale, do_recompute(), NodePath::get_mat(), NULL, and recompute().

Referenced by cull_callback().

void ProjectionScreen::recompute_node const WorkingNodePath np,
LMatrix4f &  rel_mat,
bool &  computed_rel_mat
[private]
 

Definition at line 397 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(), WorkingNodePath::node(), recompute_child(), recompute_geom_node(), and PandaNode::WorkingNodePath.

Referenced by do_recompute(), and recompute_child().

void ProjectionScreen::regenerate_screen const NodePath projector,
const string &  screen_name,
int  num_x_verts,
int  num_y_verts,
float  distance
 

Definition at line 266 of file projectionScreen.cxx.

References PandaNode::add_child(), distance(), PT(), and PandaNode::remove_all_children().

INLINE void ProjectionScreen::set_frame_color const Colorf frame_color  ) 
 

INLINE void ProjectionScreen::set_invert_uvs bool  invert_uvs  ) 
 

INLINE void ProjectionScreen::set_vignette_color const Colorf vignette_color  ) 
 

INLINE void ProjectionScreen::set_vignette_on bool  vignette_on  ) 
 


Member Data Documentation

PUBLISHED ProjectionScreen::__pad0__ [private]
 

Reimplemented from PandaNode.

Definition at line 52 of file projectionScreen.h.

PUBLISHED ProjectionScreen::__pad1__
 

Reimplemented from PandaNode.

Definition at line 64 of file projectionScreen.h.

PTA_Colorf ProjectionScreen::_colors [private]
 

Definition at line 120 of file projectionScreen.h.

Referenced by do_recompute(), and recompute_geom().

bool ProjectionScreen::_computed_rel_top_mat [private]
 

Definition at line 122 of file projectionScreen.h.

Referenced by do_recompute(), ProjectionScreen(), and recompute_if_stale().

Colorf ProjectionScreen::_frame_color [private]
 

Definition at line 118 of file projectionScreen.h.

Referenced by do_recompute().

bool ProjectionScreen::_invert_uvs [private]
 

Definition at line 115 of file projectionScreen.h.

Referenced by recompute_geom().

UpdateSeq ProjectionScreen::_last_screen [private]
 

Definition at line 125 of file projectionScreen.h.

NodePath ProjectionScreen::_projector [private]
 

Definition at line 113 of file projectionScreen.h.

Referenced by recompute_geom_node(), and recompute_if_stale().

UpdateSeq ProjectionScreen::_projector_lens_change [private]
 

Definition at line 124 of file projectionScreen.h.

Referenced by do_recompute(), and recompute_if_stale().

LMatrix4f ProjectionScreen::_rel_top_mat [private]
 

Definition at line 121 of file projectionScreen.h.

Referenced by do_recompute(), and recompute_if_stale().

bool ProjectionScreen::_stale [private]
 

Definition at line 123 of file projectionScreen.h.

Referenced by do_recompute(), ProjectionScreen(), and recompute_if_stale().

TypeHandle ProjectionScreen::_type_handle [static, private]
 

Reimplemented from PandaNode.

Definition at line 27 of file projectionScreen.cxx.

Colorf ProjectionScreen::_vignette_color [private]
 

Definition at line 117 of file projectionScreen.h.

Referenced by do_recompute().

bool ProjectionScreen::_vignette_on [private]
 

Definition at line 116 of file projectionScreen.h.

const NodePath& ProjectionScreen::camera [private]
 

Definition at line 107 of file projectionScreen.h.

const NodePath LMatrix4f bool& ProjectionScreen::computed_rel_mat [private]
 

Definition at line 107 of file projectionScreen.h.

const string int int float ProjectionScreen::distance
 

Definition at line 68 of file projectionScreen.h.

Lens* ProjectionScreen::lens [private]
 

Definition at line 110 of file projectionScreen.h.

Referenced by recompute_geom().

const string int ProjectionScreen::num_x_verts
 

Definition at line 68 of file projectionScreen.h.

const string int int ProjectionScreen::num_y_verts
 

Definition at line 68 of file projectionScreen.h.

Lens LMatrix4f& ProjectionScreen::rel_mat [private]
 

Definition at line 110 of file projectionScreen.h.

const NodePath LMatrix4f& ProjectionScreen::rel_mat [private]
 

Definition at line 107 of file projectionScreen.h.

const string& ProjectionScreen::screen_name
 

Definition at line 68 of file projectionScreen.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:20 2003 for Panda by doxygen1.3