26 out <<
"(" << _node_path <<
"):";
44 entry = entry->_next) {
46 out << *entry <<
"\n";
60 int max_matches,
int increment)
const {
65 if (max_matches > 0 && result.
get_num_paths() >= max_matches) {
89 if (
consider_node(result, next_level, max_matches, increment + 1)) {
95 nassertr(this_node !=
nullptr,
false);
103 for (
int i = 0; i < num_children; i++) {
113 for (
int i = 0; i < num_stashed; i++) {
130 int increment)
const {
131 nassertv(child_node != _node_path.
node());
148 (*
this, child_node, _i + increment, next_level);
154 (*
this, child_node, _i + increment + 1, next_level);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
PandaNode * node() const
Returns the node traversed to so far.
void add_path(const NodePath &node_path)
Adds a new NodePath to the collection.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void write_level(std::ostream &out, int indent_level) const
Writes the entire level (a linked list of entries beginning at this entry).
bool is_solution(int increment) const
Returns true if this entry represents a solution to the search; i.e.
PandaNode * get_child(size_t n) const
Returns the nth child of the node.
is_overall_hidden
Returns true if the node has been hidden to all cameras by clearing its overall bit.
This class is local to this package only; it doesn't get exported.
bool next_is_stashed(int increment) const
Returns true if the next node matched by this entry must be a stashed node, false otherwise.
void output(std::ostream &out) const
Formats the entry for meaningful output.
bool return_stashed() const
Returns true if this path allows returning of stashed nodes, false otherwise.
bool is_component_match_many(int index) const
Returns true if the nth component is of type match_many, which will require special handling.
bool consider_node(NodePathCollection &result, FindApproxLevelEntry *&next_level, int max_matches, int increment) const
Considers the node represented by the entry for matching the find path.
size_t get_num_children() const
Returns the number of children of the node.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
get_node_path
Constructs and returns an actual NodePath that represents the same path we have just traversed.
get_children
Returns an object that can be used to walk through the list of children of the node.
void output_component(std::ostream &out, int index) const
Formats the nth component of the path to the indicated output stream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_components() const
Returns the number of components in the path.
get_stashed
Returns the nth stashed child of this node.
void consider_next_step(PandaNode *child_node, FindApproxLevelEntry *&next_level, int increment) const
Compares the indicated child node (which is assumed to be a child of _node_path) with the next compon...
get_num_paths
Returns the number of NodePaths in the collection.
TypeHandle is the identifier used to differentiate C++ class types.
bool return_hidden() const
Returns true if this path allows returning of hidden nodes, false otherwise.
bool matches_component(int index, PandaNode *node) const
Returns true if the nth component of the path matches the indicated node, false otherwise.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_num_stashed
Returns the number of stashed nodes this node has.
This is a set of zero or more NodePaths.