35class EXPCL_PANDA_PGRAPH Camera :
public LensNode {
38 Camera(
const Camera ©);
52 INLINE
void set_scene(
const NodePath &scene);
81 INLINE
void set_tag_state_key(
const std::string &tag_state_key);
106 void add_display_region(DisplayRegion *display_region);
107 void remove_display_region(DisplayRegion *display_region);
111 NodePath _cull_center;
113 NodePath _lod_center;
115 DrawMask _camera_mask;
116 PN_stdfloat _lod_scale;
118 typedef pvector<DisplayRegion *> DisplayRegions;
119 DisplayRegions _display_regions;
122 std::string _tag_state_key;
124 typedef pmap<std::string, CPT(
RenderState) > TagStates;
125 TagStates _tag_states;
144 static void init_type() {
145 LensNode::init_type();
147 LensNode::get_class_type());
149 virtual TypeHandle get_type()
const {
150 return get_class_type();
152 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
155 static TypeHandle _type_handle;
157 friend class DisplayRegion;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a base class for a generic data structure that can be attached per- instance to the camera,...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
set_camera_mask
Changes the set of bits that represent the subset of the scene graph the camera will render.
is_active
Returns the current setting of the active flag on the camera.
get_lod_center
Returns the point from which the LOD distances will be measured, if it was set by set_lod_center(),...
set_lod_center
Specifies the point from which the LOD distances are measured.
set_aux_scene_data
Associates the indicated AuxSceneData object with the given NodePath, possibly replacing a previous d...
set_initial_state
Sets the initial state which is applied to all nodes in the scene, as if it were set at the top of th...
set_cull_center
Specifies the point from which the culling operations are performed.
void list_aux_scene_data(std::ostream &out) const
Outputs all of the NodePaths and AuxSceneDatas in use.
void clear_tag_states()
Removes all associations established by previous calls to set_tag_state().
get_aux_scene_data
Returns the AuxSceneData associated with the indicated NodePath, or NULL if nothing is associated.
get_cull_bounds
Returns the custom cull volume that was set by set_cull_bounds(), if any, or NULL if no custom cull v...
get_scene
Returns the scene that will be rendered by the camera.
get_lod_scale
Returns the multiplier for LOD distances.
get_display_region
Returns the nth display region associated with the camera.
get_camera_mask
Returns the set of bits that represent the subset of the scene graph the camera will render.
set_active
Sets the active flag on the camera.
set_cull_bounds
Specifies the bounding volume that should be used to perform culling from this camera.
set_tag_state
Associates a particular state transition with the indicated tag value.
get_tag_state
Returns the state associated with the indicated tag state by a previous call to set_tag_state(),...
int cleanup_aux_scene_data(Thread *current_thread=Thread::get_current_thread())
Walks through the list of currently-assigned AuxSceneData objects and releases any that are past thei...
get_tag_state_key
Returns the tag key as set by a previous call to set_tag_state_key().
get_num_display_regions
Returns the number of display regions associated with the camera.
has_tag_state
Returns true if set_tag_state() has previously been called with the indicated tag state,...
get_cull_center
Returns the point from which the culling operations will be performed, if it was set by set_cull_cent...
clear_aux_scene_data
Removes the AuxSceneData associated with the indicated NodePath.
clear_tag_state
Removes the association established by a previous call to set_tag_state().
set_lod_scale
Sets the multiplier for LOD distances.
set_scene
Sets the scene that will be rendered by the camera.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
A rectangular subregion within a window for rendering into.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
static void register_with_read_factory()
Tells the BamReader how to create objects of type LensNode.
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
A base class for any number of different kinds of lenses, linear and otherwise.
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xf...
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...
A perspective-type lens: a normal camera.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.