23 extern 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) {
101 if (_parent ==
nullptr) {
116 if (_parent ==
nullptr) {
131 if (_parent ==
nullptr) {
146 if (_parent ==
nullptr) {
161 if (_parent ==
nullptr) {
175 if (_parent ==
nullptr) {
192 if (_parent ==
nullptr) {
209 if (_parent ==
nullptr) {
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);
254 test_under_integrity()
const {
255 if (_parent ==
nullptr) {
257 nassertv(_depth == 0);
258 nassertv(_under_flags == 0);
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();
290 egg_start_parse_body() {
304 update_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;
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";
351 has_primitives()
const {
360 joint_has_primitives()
const {
369 has_normals()
const {
384 r_transform(
const LMatrix4d &,
const LMatrix4d &, CoordinateSystem) {
394 r_transform_vertices(
const LMatrix4d &) {
404 r_mark_coordsys(CoordinateSystem) {
411 r_flatten_transforms() {
virtual bool determine_indexed()
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" sc...
void apply_texmats()
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the te...
A base class for nodes in the hierarchy that are not leaf nodes.
virtual EggRenderMode * determine_draw_order()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual EggRenderMode * determine_depth_test_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
bool test_ref_count_integrity() const
Does some easy checks to make sure that the reference count isn't completely bogus.
This is a collection of textures by TRef name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
This class stores miscellaneous rendering properties that is associated with geometry,...
virtual bool determine_decal()
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag...
virtual EggRenderMode * determine_visibility_mode()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
Similar to MutexHolder, but for a light mutex.
virtual bool is_anim_matrix() const
Returns true if this node represents a table of animation transformation data, false otherwise.
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_alpha_mode()
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.
int find_used_textures(EggNode *node)
Walks the egg hierarchy beginning at the indicated node, looking for textures that are referenced by ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual EggRenderMode * determine_bin()
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.
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.
TypeHandle is the identifier used to differentiate C++ class types.
virtual EggRenderMode * determine_depth_offset()
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this leve...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.