29class EXPCL_PANDA_PGRAPH LensNode :
public PandaNode {
31 explicit LensNode(
const std::string &name,
Lens *lens =
nullptr);
34 LensNode(
const LensNode ©);
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);
56 bool is_in_view(
int index,
const LPoint3 &pos);
62 PT(PandaNode) _shown_frustum;
70 typedef pvector<LensSlot> Lenses;
80 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
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();}
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
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 ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
void hide_frustum()
Disables the drawing of the lens's frustum to aid in visualization.
void set_lens(Lens *lens)
Sets up the LensNode using this particular Lens pointer.
void show_frustum()
Enables the drawing of the lens's frustum to aid in visualization.
void copy_lens(const Lens &lens)
Sets up the LensNode using a copy of the indicated Lens.
bool is_in_view(const LPoint3 &pos)
Returns true if the given point is within the bounds of the lens of the LensNode (i....
bool set_lens_active(int index, bool active)
Sets the active flag for the nth lens.
Lens * get_lens(int index=0) const
Returns a pointer to the particular Lens associated with this LensNode, or NULL if there is not yet a...
bool activate_lens(int index)
An alternate way to call set_lens_active(index, true).
bool deactivate_lens(int index)
An alternate way to call set_lens_active(index, false).
bool get_lens_active(int index) const
Returns the active flag for the nth lens.
A base class for any number of different kinds of lenses, linear and otherwise.
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.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode 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.
TypeHandle is the identifier used to differentiate C++ class types.
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().
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.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...