23extern int eggyyparse();
36 for (
unsigned int ni = 0; ni < strip_prefix.size(); ++ni) {
37 std::string axe_name = strip_prefix[ni];
38 if (this->get_name().substr(0, axe_name.size()) == axe_name) {
39 std::string new_name = this->get_name().substr(axe_name.size());
41 this->set_name(new_name);
56 r_apply_texmats(textures);
86 if (_parent ==
nullptr) {
90 return _parent->determine_alpha_mode();
101 if (_parent ==
nullptr) {
105 return _parent->determine_depth_write_mode();
116 if (_parent ==
nullptr) {
120 return _parent->determine_depth_test_mode();
131 if (_parent ==
nullptr) {
135 return _parent->determine_visibility_mode();
146 if (_parent ==
nullptr) {
150 return _parent->determine_depth_offset();
161 if (_parent ==
nullptr) {
165 return _parent->determine_draw_order();
175 if (_parent ==
nullptr) {
179 return _parent->determine_bin();
192 if (_parent ==
nullptr) {
196 return _parent->determine_indexed();
209 if (_parent ==
nullptr) {
213 return _parent->determine_decal();
224parse_egg(
const std::string &egg_syntax) {
225 EggGroupNode *group = get_parent();
226 if (
is_of_type(EggGroupNode::get_class_type())) {
227 DCAST_INTO_R(group,
this,
false);
230 std::istringstream in(egg_syntax);
234 egg_init_parser(in,
"",
this, group);
236 if (!egg_start_parse_body()) {
237 egg_cleanup_parser();
242 egg_cleanup_parser();
244 return (egg_error_count() == 0);
254test_under_integrity()
const {
255 if (_parent ==
nullptr) {
257 nassertv(_depth == 0);
258 nassertv(_under_flags == 0);
261 _parent->test_ref_count_integrity();
263 nassertv(_depth == _parent->_depth + 1);
268 nassertv((_under_flags & _parent->_under_flags) == _parent->_under_flags);
271 EggGroupNode::iterator ci;
272 ci = find(_parent->begin(), _parent->end(),
this);
273 nassertv(ci != _parent->end());
276 _parent->test_under_integrity();
290egg_start_parse_body() {
304update_under(
int depth_offset) {
306 if (_parent ==
nullptr) {
309 _vertex_frame =
nullptr;
310 _node_frame =
nullptr;
311 _vertex_frame_inv =
nullptr;
312 _node_frame_inv =
nullptr;
313 _vertex_to_node =
nullptr;
314 _node_to_vertex =
nullptr;
316 _parent->test_ref_count_integrity();
317 depth = _parent->_depth + 1;
318 _under_flags = _parent->_under_flags;
319 _vertex_frame = _parent->_vertex_frame;
320 _node_frame = _parent->_node_frame;
321 _vertex_frame_inv = _parent->_vertex_frame_inv;
322 _node_frame_inv = _parent->_node_frame_inv;
323 _vertex_to_node = _parent->_vertex_to_node;
324 _node_to_vertex = _parent->_node_to_vertex;
327 if (depth - _depth != depth_offset) {
328 egg_cat.error() <<
"Cycle in egg graph or invalid egg pointer!\n";
351has_primitives()
const {
360joint_has_primitives()
const {
384r_transform(
const LMatrix4d &,
const LMatrix4d &, CoordinateSystem) {
394r_transform_vertices(
const LMatrix4d &) {
404r_mark_coordsys(CoordinateSystem) {
411r_flatten_transforms() {
virtual EggRenderMode * determine_bin()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
virtual bool is_joint() const
Returns true if this particular node represents a <Joint> entry or not.
virtual EggRenderMode * determine_alpha_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
int rename_node(vector_string strip_prefix)
Rename by stripping out the prefix.
virtual EggRenderMode * determine_depth_test_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
void apply_texmats()
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the te...
virtual EggRenderMode * determine_depth_offset()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
virtual bool is_anim_matrix() const
Returns true if this node represents a table of animation transformation data, false otherwise.
virtual bool determine_indexed()
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" sc...
bool parse_egg(const std::string &egg_syntax)
Parses the egg syntax given in the indicate string as if it had been read from the egg file within th...
virtual EggRenderMode * determine_depth_write_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
virtual EggRenderMode * determine_visibility_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
virtual EggRenderMode * determine_draw_order()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
virtual bool determine_decal()
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag...
This class stores miscellaneous rendering properties that is associated with geometry,...
This is a collection of textures by TRef name.
int find_used_textures(EggNode *node)
Walks the egg hierarchy beginning at the indicated node, looking for textures that are referenced by ...
Similar to MutexHolder, but for a light mutex.
TypeHandle is the identifier used to differentiate C++ class types.
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.