|
cgv
|
helper class to control multiple render passes in init_frame and after_finish methods of drawable. More...
#include <drawable.h>
Public Member Functions | |
| multi_pass_drawable () | |
| construct to be not inside of a render pass | |
| bool | initiate_render_pass_recursion (context &ctx) |
| call in init_frame method to check whether the recursive render passes need to be initiated | |
| void | perform_render_pass (context &ctx, int rp_idx, RenderPass rp=RP_USER_DEFINED, int excluded_flags=RPF_HANDLE_SCREEN_SHOT, int included_flags=0) |
| call to initiate a render pass in the init_frame method after initiate_render_pass_recursion() has succeeded | |
| void | initiate_terminal_render_pass (int rp_idx) |
| call after last recursive render pass to use current render pass for last render pass | |
| bool | multi_pass_ignore_finish (const context &ctx) |
| check in after_finish method, whether this should be directly exited with a return statement | |
| bool | multi_pass_terminate (const context &ctx) |
| check in after_finish method, whether this was the terminating render pass | |
Public Member Functions inherited from cgv::render::drawable | |
| drawable () | |
| default construction | |
| void | hide () |
| hide the drawable | |
| void | show () |
| show the drawable | |
| bool | is_visible () const |
| check whether the drawable is visible | |
| context * | get_context () const |
| access the current context. The context will be available latestly in the init method but not in the contructor. | |
| void | set_context (context *_ctx) |
| set the current focus context, this should only be called by the context itself | |
| view * | find_view_as_node (size_t view_idx=0) const |
| convenience function to find the view control in the current hierarchy | |
| bool | get_world_location (int x, int y, const view &V, dvec3 &world_location, double *window_z_ptr=0) const |
| use given view together with depth buffer of context in order to compute the world location of the point at mouse pointer location (x,y) | |
| void | post_redraw () |
| posts a redraw event to the current context if one is available | |
| void | force_redraw () |
| forces a redraw right now. This cannot be called from init, init_frame, draw, finish_draw, finish_frame and clear | |
| virtual bool | init (context &) |
| this method is called after creation or recreation of the context, return whether all necessary functionality is supported | |
| virtual void | resize (unsigned int w, unsigned int h) |
| callback to announce resizing of the output window | |
| virtual void | init_frame (context &) |
| this method is called in one pass over all drawables before the draw method | |
| virtual void | draw (context &) |
| overload to draw the content of this drawable | |
| virtual void | finish_draw (context &) |
| this method is called when the current drawable is left in a tree traversal that calls the draw method | |
| virtual void | finish_frame (context &) |
| this method is called in one pass over all drawables after drawing | |
| virtual void | after_finish (context &) |
| this method is called in one pass over all drawables after finish frame | |
| virtual void | clear (context &) |
| clear all objects living in the context like textures or display lists | |
Public Member Functions inherited from cgv::base::traverse_policy | |
| traverse_policy (int _policy=TP_ALL+TP_STOP_ON_SUCCESS, bool _active=true, int _focus=-1) | |
| construct default traverse policy that visits everything | |
| int | get_policy () const |
| return the policy without the stop on success flag | |
| bool | stop_on_success () const |
| return whether to stop on success | |
| bool | stop_on_failure () const |
| return whether to stop on failure | |
| void | set_policy (int _policy) |
| set a new policy, always add stop on success flag if needed | |
| int | get_focused_child () const |
| return the focused child or -1 if none is focused | |
| void | set_focused_child (int _focused_child) |
| set the focused child | |
| bool | get_active () const |
| return whether the current node is active | |
| void | set_active (bool _active) |
| set the active flag of the current node | |
Protected Attributes | |
| int | current_render_pass |
| unsigned | render_pass_recursion_depth |
Protected Attributes inherited from cgv::base::traverse_policy | |
| TraversePolicy | policy |
| bool | active |
| int | focus |
helper class to control multiple render passes in init_frame and after_finish methods of drawable.
Definition at line 65 of file drawable.h.
| cgv::render::multi_pass_drawable::multi_pass_drawable | ( | ) |
construct to be not inside of a render pass
Definition at line 135 of file drawable.cxx.
| bool cgv::render::multi_pass_drawable::initiate_render_pass_recursion | ( | context & | ctx | ) |
call in init_frame method to check whether the recursive render passes need to be initiated
Definition at line 141 of file drawable.cxx.
References cgv::render::context::get_render_pass_recursion_depth().
| void cgv::render::multi_pass_drawable::initiate_terminal_render_pass | ( | int | rp_idx | ) |
call after last recursive render pass to use current render pass for last render pass
Definition at line 156 of file drawable.cxx.
| bool cgv::render::multi_pass_drawable::multi_pass_ignore_finish | ( | const context & | ctx | ) |
check in after_finish method, whether this should be directly exited with a return statement
Definition at line 161 of file drawable.cxx.
References cgv::render::context::get_render_pass_recursion_depth(), and cgv::render::context::get_render_pass_user_data().
| bool cgv::render::multi_pass_drawable::multi_pass_terminate | ( | const context & | ctx | ) |
check in after_finish method, whether this was the terminating render pass
Definition at line 171 of file drawable.cxx.
References cgv::render::context::get_render_pass_recursion_depth().
| void cgv::render::multi_pass_drawable::perform_render_pass | ( | context & | ctx, |
| int | rp_idx, | ||
| RenderPass | rp = RP_USER_DEFINED, |
||
| int | excluded_flags = RPF_HANDLE_SCREEN_SHOT, |
||
| int | included_flags = 0 |
||
| ) |
call to initiate a render pass in the init_frame method after initiate_render_pass_recursion() has succeeded
Definition at line 149 of file drawable.cxx.
References cgv::render::context::get_render_pass_flags(), and cgv::render::context::render_pass().
|
protected |
Definition at line 69 of file drawable.h.
|
protected |
Definition at line 71 of file drawable.h.