fix RopeNode and SheetNode (weren't rendering)

This commit is contained in:
David Rose 2009-01-08 03:26:09 +00:00
parent e5cf8b1517
commit b0dd18aa3f
4 changed files with 32 additions and 0 deletions

View File

@ -186,6 +186,21 @@ cull_callback(CullTraverser *trav, CullTraverserData &data) {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: RopeNode::is_renderable
// Access: Public, Virtual
// Description: Returns true if there is some value to visiting this
// particular node during the cull traversal for any
// camera, false otherwise. This will be used to
// optimize the result of get_net_draw_show_mask(), so
// that any subtrees that contain only nodes for which
// is_renderable() is false need not be visited.
////////////////////////////////////////////////////////////////////
bool RopeNode::
is_renderable() const {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: RopeNode::output
// Access: Public, Virtual

View File

@ -49,6 +49,7 @@ public:
virtual bool safe_to_transform() const;
virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data);
virtual bool is_renderable() const;
PUBLISHED:
enum RenderMode {

View File

@ -163,6 +163,21 @@ cull_callback(CullTraverser *trav, CullTraverserData &data) {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: SheetNode::is_renderable
// Access: Public, Virtual
// Description: Returns true if there is some value to visiting this
// particular node during the cull traversal for any
// camera, false otherwise. This will be used to
// optimize the result of get_net_draw_show_mask(), so
// that any subtrees that contain only nodes for which
// is_renderable() is false need not be visited.
////////////////////////////////////////////////////////////////////
bool SheetNode::
is_renderable() const {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: SheetNode::output
// Access: Public, Virtual

View File

@ -47,6 +47,7 @@ public:
virtual bool safe_to_transform() const;
virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data);
virtual bool is_renderable() const;
PUBLISHED:
INLINE void set_surface(NurbsSurfaceEvaluator *surface);