25output(std::ostream &out)
const {
26 out <<
"(" << _node_path <<
"):";
41write_level(std::ostream &out,
int indent_level)
const {
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);
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.
bool is_solution(int increment) const
Returns true if this entry represents a solution to the search; i.e.
void write_level(std::ostream &out, int indent_level) const
Writes the entire level (a linked list of entries beginning at this entry).
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.
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...
void output(std::ostream &out) const
Formats the entry for meaningful output.
bool matches_component(int index, PandaNode *node) const
Returns true if the nth component of the path matches the indicated node, false otherwise.
void output_component(std::ostream &out, int index) const
Formats the nth component of the path to the indicated output stream.
bool return_hidden() const
Returns true if this path allows returning of hidden nodes, false otherwise.
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.
int get_num_components() const
Returns the number of components in the path.
This is a set of zero or more NodePaths.
void add_path(const NodePath &node_path)
Adds a new NodePath to the collection.
get_num_paths
Returns the number of NodePaths in the collection.
PandaNode * get_child(size_t n) const
Returns the nth child of the node.
size_t get_num_children() const
Returns the number of children of the node.
A basic node of the scene graph or data graph.
is_overall_hidden
Returns true if the node has been hidden to all cameras by clearing its overall bit.
get_num_stashed
Returns the number of stashed nodes this node has.
get_stashed
Returns the nth stashed child of this node.
get_children
Returns an object that can be used to walk through the list of children of the node.
TypeHandle is the identifier used to differentiate C++ class types.
PandaNode * node() const
Returns the node traversed to so far.
get_node_path
Constructs and returns an actual NodePath that represents the same path we have just traversed.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
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.