mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
added set_color_scale to nodepathCollection
This commit is contained in:
parent
863fdd7449
commit
4d949e95a6
@ -441,7 +441,32 @@ set_color(float r, float g, float b, float a, int priority) {
|
||||
void NodePathCollection::
|
||||
set_color(const Colorf &color, int priority) {
|
||||
for (int i = 0; i < get_num_paths(); i++) {
|
||||
get_path(i).node()->set_attrib(ColorAttrib::make_flat(color), priority);
|
||||
get_path(i).set_color(color, priority);
|
||||
//get_path(i).node()->set_attrib(ColorAttrib::make_flat(color), priority);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePathCollection::set_color_scale
|
||||
// Access: Published
|
||||
// Description: Applies color scales to all NodePaths in the collection
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void NodePathCollection::
|
||||
set_color_scale(float r, float g, float b, float a, int priority) {
|
||||
for (int i = 0; i < get_num_paths(); i++) {
|
||||
get_path(i).set_color_scale(Colorf(r, g, b, a), priority);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodePathCollection::set_color_scale
|
||||
// Access: Published
|
||||
// Description: Applies color scales to all NodePaths in the collection
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void NodePathCollection::
|
||||
set_color_scale(const Colorf &color, int priority) {
|
||||
for (int i = 0; i < get_num_paths(); i++) {
|
||||
get_path(i).set_color_scale(color, priority);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,10 @@ PUBLISHED:
|
||||
int priority = 0);
|
||||
void set_color(const Colorf &color, int priority = 0);
|
||||
|
||||
void set_color_scale(float r, float g, float b, float a = 1.0,
|
||||
int priority = 0);
|
||||
void set_color_scale(const Colorf &color, int priority = 0);
|
||||
|
||||
void output(ostream &out) const;
|
||||
void write(ostream &out, int indent_level = 0) const;
|
||||
|
||||
|
@ -286,7 +286,8 @@ cull_callback(CullTraverser *trav, CullTraverserData &data) {
|
||||
|
||||
// Get the net trasform of the _cell_out as seen from the camera.
|
||||
CPT(TransformState) cell_transform =
|
||||
trav->get_camera_transform()->invert_compose(_cell_out.get_net_transform());
|
||||
// trav->get_camera_transform()->invert_compose(_cell_out.get_net_transform());
|
||||
_cell_out.get_net_transform();
|
||||
|
||||
CPT(TransformState) frustum_transform =
|
||||
_cell_out.get_net_transform()->invert_compose(portal_viewer->_scene_setup->get_cull_center().get_net_transform());
|
||||
|
Loading…
x
Reference in New Issue
Block a user