31class EXPCL_PANDA_PGRAPH ModelNode :
public PandaNode {
33 explicit INLINE ModelNode(
const std::string &name);
36 INLINE ModelNode(
const ModelNode ©);
51 enum PreserveTransform {
65 void set_transform_limit(PN_stdfloat limit) { _transform_limit = limit; };
68 PreserveTransform _preserve_transform;
69 int _preserve_attributes;
76 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
79 virtual void transform_changed();
82 PN_stdfloat _transform_limit;
90 static void init_type() {
91 PandaNode::init_type();
93 PandaNode::get_class_type());
96 return get_class_type();
98 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 set_preserve_transform(PreserveTransform preserve_transform)
Sets the preserve_transform flag.
void set_preserve_attributes(int attrib_mask)
Sets the preserve_attributes flag.
int get_preserve_attributes() const
Returns the current setting of the preserve_attributes flag.
PreserveTransform get_preserve_transform() const
Returns the current setting of the preserve_transform flag.
virtual bool preserve_name() const
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operatio...
virtual PandaNode * combine_with(PandaNode *other)
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined...
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
virtual int get_unsafe_to_apply_attribs() const
Returns the union of all attributes from SceneGraphReducer::AttribTypes that may not safely be applie...
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_modify_transform() const
Returns true if it is safe to automatically adjust the transform on this kind of node.
static void register_with_read_factory()
Tells the BamReader how to create objects of type PandaNode.
virtual bool safe_to_flatten_below() const
Returns true if a flatten operation may safely continue past this node, or false if nodes below this ...
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.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...
TypeHandle is the identifier used to differentiate C++ class types.
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(),...