31 explicit LensNode(
const std::string &name,
Lens *lens =
nullptr);
36 virtual void output(std::ostream &out)
const;
37 virtual void write(std::ostream &out,
int indent_level = 0)
const;
39 virtual void xform(
const LMatrix4 &mat);
43 INLINE
void copy_lens(
const Lens &lens);
44 INLINE
void copy_lens(
int index,
const Lens &lens);
45 INLINE
void set_lens(
Lens *lens);
46 void set_lens(
int index,
Lens *lens);
47 INLINE
Lens *get_lens(
int index = 0)
const;
49 bool set_lens_active(
int index,
bool active);
50 INLINE
bool get_lens_active(
int index)
const;
52 INLINE
bool activate_lens(
int index);
53 INLINE
bool deactivate_lens(
int index);
55 INLINE
bool is_in_view(
const LPoint3 &pos);
56 bool is_in_view(
int index,
const LPoint3 &pos);
87 static void init_type() {
88 PandaNode::init_type();
90 PandaNode::get_class_type());
93 return get_class_type();
95 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
A base class for any number of different kinds of lenses, linear and otherwise.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A node that contains a Lens.
Base class for objects that can be written to and read from Bam files.
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.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is our own Panda specialization on the default STL list.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual void xform(const LMatrix4 &mat)
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
An instance of this class is passed to the Factory when requesting it to do its business and construc...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...