Hi,
This post is kinda repetition, but I am explaining here bit more detailed
way
I am using VRML 0.17.12 API for my VRML importer
I am facing a problem to read PROTO nodes for my VRML importer.
My node traversing is something looks like following way:
void IDONodeTraverser::do_traversal(node & n)
{
//std::set<node *>::iterator pos = this->traversed_nodes.find(&n);
//const bool alreadyTraversed = (pos != this->traversed_nodes.end());
//if (!alreadyTraversed) {
{
this->on_entering(n);
//this->traversed_nodes.insert(&n);
const node_interface_set & interfaces = n.type().interfaces();
for (node_interface_set::const_iterator
interface_(interfaces.begin());
interface_ != interfaces.end() && !this->halt; ++interface_)
{
if (interface_->type == node_interface::field_id
|| interface_->type == node_interface::exposedfield_id)
{
if (interface_->field_type == field_value::sfnode_id) {
const sfnode value = n.field<sfnode>(interface_->id);
if (value.value()) {
this->do_traversal(*value.value());
}
} else if (interface_->field_type == field_value::mfnode_id)
{
const mfnode children = n.field<mfnode>(interface_->id);
for (size_t i = 0;
i < children.value().size() && !this->halt;
++i) {
if (children.value()[i]) {
this->do_traversal(*children.value()[i]);
}
}
}
}
}
this->on_leaving(n);
}
}
Where the above source is copy of original source (with bit of
modifications).
Problem is, My importer is not reading PROTO keyword.
Am I missing something around, here?
Could some please suggest me on this?
Thanks,
Mahesh
--
View this message in context: http://old.nabble.com/Problem-with-PROTO-keyword-tp34397759p34397759.html
Sent from the openvrml-develop mailing list archive at Nabble.com.
|