14#ifndef NODEPATHCOLLECTION_H
15#define NODEPATHCOLLECTION_H
26class EXPCL_PANDA_PGRAPH NodePathCollection {
28 NodePathCollection() =
default;
31 EXTENSION(NodePathCollection(PyObject *self, PyObject *sequence));
32 EXTENSION(PyObject *__reduce__(PyObject *self)
const);
48 NodePath operator [] (
size_t index)
const;
50 INLINE
void operator += (
const NodePathCollection &other);
51 INLINE NodePathCollection operator + (
const NodePathCollection &other)
const;
55 INLINE
void extend(
const NodePathCollection &other);
58 INLINE
void ls()
const;
59 void ls(std::ostream &out,
int indent_level = 0)
const;
77 EXTENSION(PyObject *get_tight_bounds()
const);
84 INLINE
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a = 1.0,
86 void set_color(
const LColor &color,
int priority = 0);
88 INLINE
void set_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a = 1.0,
92 INLINE
void compose_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a = 1.0,
98 void output(std::ostream &out)
const;
99 void write(std::ostream &out,
int indent_level = 0)
const;
103 NodePaths _node_paths;
static BitMask< uint32_t, nbits > all_on()
This is a set of zero or more NodePaths.
void reparent_to(const NodePath &other)
Reparents all the NodePaths in the collection to the indicated node.
void compose_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0)
Applies color scales to all NodePaths in the collection.
void unstash()
Unstashes all NodePaths in the collection.
void add_path(const NodePath &node_path)
Adds a new NodePath to the collection.
void set_attrib(const RenderAttrib *attrib, int priority=0)
Applies the indicated RenderAttrib to all NodePaths in the collection.
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0)
Colors all NodePaths in the collection.
void add_paths_from(const NodePathCollection &other)
Adds all the NodePaths indicated in the other collection to this path.
size_t size() const
Returns the number of paths in the collection.
void set_collide_mask(CollideMask new_mask, CollideMask bits_to_change=CollideMask::all_on(), TypeHandle node_type=TypeHandle::none())
Recursively applies the indicated CollideMask to the into_collide_masks for all nodes at this level a...
void extend(const NodePathCollection &other)
Appends the other list onto the end of this one.
void write(std::ostream &out, int indent_level=0) const
Writes a complete multi-line description of the NodePathCollection to the indicated output stream.
void ls() const
Lists all the nodes at and below each node in the collection hierarchically.
void detach()
Detaches all NodePaths in the collection.
void remove_paths_from(const NodePathCollection &other)
Removes from this collection all of the NodePaths listed in the other collection.
void set_texture_off(int priority=0)
Sets the geometry at this level and below to render using no texture, on any stage.
void remove_duplicate_paths()
Removes any duplicate entries of the same NodePaths on this collection.
void show()
Shows all NodePaths in the collection.
CollideMask get_collide_mask() const
Returns the union of all of the into_collide_masks for nodes at this level and below.
void reserve(size_t num)
This is a hint to Panda to allocate enough memory to hold the given number of NodePaths,...
bool remove_path(const NodePath &node_path)
Removes the indicated NodePath from the collection.
bool is_empty() const
Returns true if there are no NodePaths in the collection, false otherwise.
void stash()
Stashes all NodePaths in the collection.
void append(const NodePath &node_path)
Adds a new NodePath to the collection.
void hide()
Hides all NodePaths in the collection.
get_num_paths
Returns the number of NodePaths in the collection.
NodePathCollection find_all_matches(const std::string &path) const
Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be ...
void output(std::ostream &out) const
Writes a brief one-line description of the NodePathCollection to the indicated output stream.
void set_color_scale(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a=1.0, int priority=0)
Applies color scales to all NodePaths in the collection.
void wrt_reparent_to(const NodePath &other)
Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as n...
bool has_path(const NodePath &path) const
Returns true if the indicated NodePath appears in this collection, false otherwise.
get_path
Returns the nth NodePath in the collection.
void set_texture(Texture *tex, int priority=0)
Adds the indicated texture to the list of textures that will be rendered on the default texture stage...
bool calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point) const
Calculates the minimum and maximum vertices of all Geoms at these NodePath's bottom nodes and below T...
void clear()
Removes all NodePaths from the collection.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
Defines the properties of a named stage of the multitexture pipeline.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
TypeHandle is the identifier used to differentiate C++ class types.
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.