27Camera(
const string &name,
Lens *lens) :
30 _camera_mask(~
PandaNode::get_overall_bit()),
40Camera(
const Camera ©) :
42 _active(copy._active),
44 _camera_mask(copy._camera_mask),
45 _initial_state(copy._initial_state),
46 _lod_scale(copy._lod_scale),
47 _tag_state_key(copy._tag_state_key),
48 _tag_states(copy._tag_states)
60 nassertv(_display_regions.empty());
108 _tag_states[tag_state] = state;
116 _tag_states.erase(tag_state);
133 TagStates::const_iterator tsi;
134 tsi = _tag_states.find(tag_state);
135 return (tsi != _tag_states.end());
143get_tag_state(
const string &tag_state)
const {
144 TagStates::const_iterator tsi;
145 tsi = _tag_states.find(tag_state);
146 if (tsi != _tag_states.end()) {
147 return (*tsi).second;
149 return RenderState::make_empty();
158 if (data ==
nullptr) {
161 _aux_data[node_path] = data;
171 AuxData::iterator ai;
172 ai = _aux_data.find(node_path);
173 if (ai != _aux_data.end()) {
187 AuxData::const_iterator ai;
188 ai = _aux_data.find(node_path);
189 if (ai != _aux_data.end()) {
201 out << _aux_data.size() <<
" data objects held:\n";
202 AuxData::const_iterator ai;
203 for (ai = _aux_data.begin(); ai != _aux_data.end(); ++ai) {
204 out << (*ai).first <<
" " << *(*ai).second <<
"\n";
219 AuxData::iterator ai;
220 ai = _aux_data.begin();
221 while (ai != _aux_data.end()) {
222 AuxData::iterator anext = ai;
225 if (now > (*ai).second->get_expiration_time()) {
242 _display_regions.push_back(display_region);
251 DisplayRegions::iterator dri =
252 find(_display_regions.begin(), _display_regions.end(), display_region);
253 if (dri != _display_regions.end()) {
254 _display_regions.erase(dri);
309 node->fillin(scan, manager);
320 LensNode::fillin(scan, manager);
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
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...
bool read_pointer(DatagramIterator &scan)
The interface for reading a pointer to another object from a Bam file.
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being read.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
void write_pointer(Datagram &packet, const TypedWritable *dest)
The interface for writing a pointer to another object to a Bam file.
int get_file_minor_ver() const
Returns the minor version number of the Bam file currently being written.
void set_word(WordType value)
Sets the entire BitMask to the value indicated by the given word.
WordType get_word() const
Returns the entire BitMask as a single word.
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
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.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of Node by calling the xform()...
CPT(RenderState) get_tag_state(const std set_tag_state
Associates a particular state transition with the indicated tag value.
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...
CPT(RenderState) get_tag_state(const std has_tag_state
Returns true if set_tag_state() has previously been called with the indicated tag state,...
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of Node by duplicating insta...
clear_aux_scene_data
Removes the AuxSceneData associated with the indicated NodePath.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Camera.
CPT(RenderState) get_tag_state(const std clear_tag_state
Removes the association established by a previous call to set_tag_state().
get_frame_time
Returns the time in seconds as of the last time tick() was called (typically, this will be as of the ...
static ClockObject * get_global_clock()
Returns a pointer to the global ClockObject.
A class to retrieve the individual data elements previously stored in a Datagram.
PN_stdfloat get_stdfloat()
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_doubl...
uint32_t get_uint32()
Extracts an unsigned 32-bit integer.
bool get_bool()
Extracts a boolean value.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_uint32(uint32_t value)
Adds an unsigned 32-bit integer to the datagram.
void add_stdfloat(PN_stdfloat value)
Adds either a 32-bit or a 64-bit floating-point number, according to set_stdfloat_double().
void add_bool(bool value)
Adds a boolean value to the datagram.
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...
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
A node that contains a Lens.
virtual int complete_pointers(TypedWritable **plist, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
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.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A basic node of the scene graph or data graph.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.