46 if (_preserve_transform == PT_drop_node) {
62 return _preserve_transform == PT_drop_node;
71 return _preserve_transform != PT_no_touch;
81 return _preserve_transform == PT_none || _preserve_transform == PT_drop_node;
94 return _preserve_transform != PT_local && _preserve_transform != PT_no_touch;
105 return _preserve_transform == PT_drop_node;
114 return _preserve_transform != PT_drop_node && _preserve_transform != PT_no_touch;
126 return _preserve_attributes;
145 nassertv(pos[0] < _transform_limit);
146 nassertv(pos[0] > -_transform_limit);
147 nassertv(pos[1] < _transform_limit);
148 nassertv(pos[1] > -_transform_limit);
149 nassertv(pos[2] < _transform_limit);
150 nassertv(pos[2] > -_transform_limit);
159 transform_changed() {
160 PandaNode::transform_changed();
164 if (_transform_limit > 0.0) {
165 test_transform(transform);
193 node->fillin(scan, manager);
204 PandaNode::fillin(scan, manager);
206 _preserve_transform = (PreserveTransform)scan.
get_uint8();
A basic node of the scene graph or data graph.
static void register_with_read_factory()
Tells the BamReader how to create objects of type ModelNode.
uint8_t get_uint8()
Extracts an unsigned 8-bit integer.
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 preserve_name() const
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operatio...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
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_transform() const
Returns true if it is generally safe to transform this particular kind of Node by calling the xform()...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
Base class for objects that can be written to and read from Bam files.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of Node by duplicating insta...
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 ...
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
This node is placed at key points within the scene graph to indicate the roots of "models": subtrees ...
virtual bool safe_to_modify_transform() const
Returns true if it is safe to automatically adjust the transform on this kind of node.
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
virtual PandaNode * combine_with(PandaNode *other)
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the datagram.
A class to retrieve the individual data elements previously stored in a Datagram.
virtual int get_unsafe_to_apply_attribs() const
Returns the union of all attributes from SceneGraphReducer::AttribTypes that may not safely be applie...
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 ...
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 ...