Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
bgui3d_project2d_tableau Class Reference

Tableau that projects a Coin3D scene graph into an image plane. More...

#include <bgui3d_project2d_tableau.h>

Inheritance diagram for bgui3d_project2d_tableau:
Inheritance graph
[legend]

List of all members.

Public Types

enum  interaction_type_enum { CAMERA, SCENEGRAPH }

Public Member Functions

 bgui3d_project2d_tableau ()
 Default Constructor - don't use this, use bgui3d_project2d_tableau_new.
 bgui3d_project2d_tableau (const vpgl_proj_camera< double > &camera, SoNode *scene_root=NULL)
 Constructor - don't use this, use bgui3d_project2d_tableau_new.
virtual ~bgui3d_project2d_tableau ()
 Destructor.
virtual vcl_string type_name () const
 Return the type name of this tableau.
virtual bool handle (const vgui_event &event)
 Handle vgui events.
virtual bool set_camera (const vpgl_proj_camera< double > &camera)
 Set the scene camera.
virtual vcl_auto_ptr
< vpgl_proj_camera< double > > 
camera () const
 Get the scene camera.
void set_headlight (bool enable)
 Activate a headlight.
bool is_headlight () const
 Is the headlight active.
virtual void get_popup (const vgui_popup_params &, vgui_menu &m)
 Builds a popup menu.
virtual vcl_string file_name () const
 file name isn't valid, so return the type_name.
virtual void setup_opengl () const
 Set up OpenGL for rendering.
virtual bool render ()
 Render the scene graph (called on draw events).
virtual bool render_overlay ()
 Render the overlay scene graph (called on draw overlay events).
virtual void request_render ()
 Called when the scene manager requests a render action.
virtual void request_render_overlay ()
 Called when the scene manager requests a render overlay action.
virtual bool idle ()
 Called when VGUI is idle.
void enable_idle ()
 Enable handling of idle events.
void disable_idle ()
 Disable handling of idle events.
bool is_idle_enabled ()
 Returns true if idle event handling is enabled.
virtual void set_scene_root (SoNode *scene_root)
 Set scene root node.
SoNode * scene_root () const
 Return the root node in the scene graph.
virtual void set_overlay_scene_root (SoNode *scene_root)
 Set overlay scene root node.
SoNode * overlay_scene_root () const
 Return the root node in the overlay scene graph.
void set_viewport_region (const SbViewportRegion &region)
 Set the viewport.
const SbViewportRegion & get_viewport_region () const
 Get the viewport.
virtual void set_interaction_type (interaction_type_enum)
 Set the interaction type.
interaction_type_enum interaction_type () const
 Return the type of the interaction.
SoSceneManager * scene_manager () const
virtual vcl_string name () const
virtual vcl_string pretty_name () const
void get_parents (vcl_vector< vgui_tableau_sptr > *out) const
void get_children (vcl_vector< vgui_tableau_sptr > *out) const
vgui_tableau_sptr get_child (unsigned i) const
virtual bool add_child (vgui_tableau_sptr const &)
virtual bool remove_child (vgui_tableau_sptr const &)
virtual bool notify_replaced_child (vgui_tableau_sptr const &old_child, vgui_tableau_sptr const &new_child)
virtual void add_popup (vgui_menu &)
virtual void post_message (char const *, void const *)
virtual void post_redraw ()
virtual void post_overlay_redraw ()
virtual void post_idle_request ()
virtual bool get_bounding_box (float low[3], float high[3]) const
virtual bool draw ()
virtual bool mouse_down (int x, int y, vgui_button, vgui_modifier)
virtual bool mouse_up (int x, int y, vgui_button, vgui_modifier)
virtual bool motion (int x, int y)
virtual bool key_press (int x, int y, vgui_key, vgui_modifier)
virtual bool help ()
void ref () const
void unref () const

Static Public Member Functions

static void get_all (vcl_vector< vgui_tableau_sptr > *out)
static bool exists (vgui_tableau_sptr const &)

Protected Member Functions

virtual bool setup_projection ()
 setup the OpenGL projection matrix.

Protected Attributes

SoNode * scene_root_
 The root node of the scene graph.
SoNode * overlay_scene_root_
SoSceneManager * scene_manager_
 The scene manager.
SoSceneManager * overlay_scene_manager_
bool idle_enabled_
interaction_type_enum interaction_type_

Private Attributes

vnl_double_3x4 camera_z_
 The canonical camera looking down the -z axis.
double model_matrix_ [16]
 The GL model matrix to load for the camera position.
bool draw_headlight_
 Flag for drawing a headlight.

Detailed Description

Tableau that projects a Coin3D scene graph into an image plane.

The scenegraph should not contain a camera node. The image plane is specified by 3x4 camera matrix

Definition at line 23 of file bgui3d_project2d_tableau.h.


Member Enumeration Documentation

Enumerator:
CAMERA 
SCENEGRAPH 

Definition at line 104 of file bgui3d_tableau.h.


Constructor & Destructor Documentation

bgui3d_project2d_tableau::bgui3d_project2d_tableau ( )

Default Constructor - don't use this, use bgui3d_project2d_tableau_new.

Definition at line 27 of file bgui3d_project2d_tableau.cxx.

bgui3d_project2d_tableau::bgui3d_project2d_tableau ( const vpgl_proj_camera< double > &  camera,
SoNode *  scene_root = NULL 
)

Constructor - don't use this, use bgui3d_project2d_tableau_new.

Definition at line 36 of file bgui3d_project2d_tableau.cxx.

bgui3d_project2d_tableau::~bgui3d_project2d_tableau ( ) [virtual]

Destructor.

Definition at line 45 of file bgui3d_project2d_tableau.cxx.


Member Function Documentation

vcl_auto_ptr< vpgl_proj_camera< double > > bgui3d_project2d_tableau::camera ( ) const [virtual]

Get the scene camera.

creates a vpgl camera (either perspective or affine) from the graphics camera

Reimplemented from bgui3d_tableau.

Definition at line 163 of file bgui3d_project2d_tableau.cxx.

void bgui3d_tableau::disable_idle ( ) [inherited]

Disable handling of idle events.

Definition at line 201 of file bgui3d_tableau.cxx.

void bgui3d_tableau::enable_idle ( ) [inherited]

Enable handling of idle events.

Definition at line 192 of file bgui3d_tableau.cxx.

virtual vcl_string bgui3d_tableau::file_name ( ) const [inline, virtual, inherited]

file name isn't valid, so return the type_name.

Reimplemented from vgui_tableau.

Definition at line 41 of file bgui3d_tableau.h.

void bgui3d_project2d_tableau::get_popup ( const vgui_popup_params ,
vgui_menu m 
) [virtual]

Builds a popup menu.

Reimplemented from vgui_tableau.

Definition at line 310 of file bgui3d_project2d_tableau.cxx.

const SbViewportRegion & bgui3d_tableau::get_viewport_region ( ) const [inherited]

Get the viewport.

Definition at line 310 of file bgui3d_tableau.cxx.

bool bgui3d_project2d_tableau::handle ( const vgui_event event) [virtual]

Handle vgui events.

Reimplemented from bgui3d_tableau.

Definition at line 201 of file bgui3d_project2d_tableau.cxx.

bool bgui3d_tableau::idle ( ) [virtual, inherited]

Called when VGUI is idle.

Reimplemented from vgui_tableau.

Reimplemented in bgui3d_examiner_tableau.

Definition at line 182 of file bgui3d_tableau.cxx.

bgui3d_tableau::interaction_type_enum bgui3d_tableau::interaction_type ( ) const [inherited]

Return the type of the interaction.

Get the interaction type.

Definition at line 324 of file bgui3d_tableau.cxx.

bool bgui3d_project2d_tableau::is_headlight ( ) const [inline]

Is the headlight active.

Definition at line 53 of file bgui3d_project2d_tableau.h.

bool bgui3d_tableau::is_idle_enabled ( ) [inherited]

Returns true if idle event handling is enabled.

Definition at line 209 of file bgui3d_tableau.cxx.

SoNode* bgui3d_tableau::overlay_scene_root ( ) const [inline, inherited]

Return the root node in the overlay scene graph.

Definition at line 84 of file bgui3d_tableau.h.

bool bgui3d_tableau::render ( ) [virtual, inherited]

Render the scene graph (called on draw events).

Reimplemented in bgui3d_examiner_tableau, and bgui3d_examiner_slider_tableau.

Definition at line 82 of file bgui3d_tableau.cxx.

bool bgui3d_tableau::render_overlay ( ) [virtual, inherited]

Render the overlay scene graph (called on draw overlay events).

Definition at line 116 of file bgui3d_tableau.cxx.

void bgui3d_tableau::request_render ( ) [virtual, inherited]

Called when the scene manager requests a render action.

Definition at line 217 of file bgui3d_tableau.cxx.

void bgui3d_tableau::request_render_overlay ( ) [virtual, inherited]

Called when the scene manager requests a render overlay action.

Called when the overlay scene manager requests a render action.

Definition at line 225 of file bgui3d_tableau.cxx.

SoSceneManager * bgui3d_tableau::scene_manager ( ) const [inherited]

Definition at line 331 of file bgui3d_tableau.cxx.

SoNode* bgui3d_tableau::scene_root ( ) const [inline, inherited]

Return the root node in the scene graph.

Definition at line 78 of file bgui3d_tableau.h.

bool bgui3d_project2d_tableau::set_camera ( const vpgl_proj_camera< double > &  cam) [virtual]

Set the scene camera.

creates a graphics camera from a vpgl camera (either perspective or affine)

Reimplemented from bgui3d_tableau.

Definition at line 59 of file bgui3d_project2d_tableau.cxx.

void bgui3d_project2d_tableau::set_headlight ( bool  enable) [inline]

Activate a headlight.

Definition at line 50 of file bgui3d_project2d_tableau.h.

void bgui3d_tableau::set_interaction_type ( interaction_type_enum  type) [virtual, inherited]

Set the interaction type.

Definition at line 317 of file bgui3d_tableau.cxx.

void bgui3d_tableau::set_overlay_scene_root ( SoNode *  scene_root) [virtual, inherited]

Set overlay scene root node.

Definition at line 260 of file bgui3d_tableau.cxx.

void bgui3d_tableau::set_scene_root ( SoNode *  scene_root) [virtual, inherited]

Set scene root node.

Reimplemented in bgui3d_viewer_tableau.

Definition at line 233 of file bgui3d_tableau.cxx.

void bgui3d_tableau::set_viewport_region ( const SbViewportRegion &  region) [inherited]

Set the viewport.

Definition at line 301 of file bgui3d_tableau.cxx.

void bgui3d_tableau::setup_opengl ( ) const [virtual, inherited]

Set up OpenGL for rendering.

Definition at line 70 of file bgui3d_tableau.cxx.

bool bgui3d_project2d_tableau::setup_projection ( ) [protected, virtual]

setup the OpenGL projection matrix.

Definition at line 237 of file bgui3d_project2d_tableau.cxx.

vcl_string bgui3d_project2d_tableau::type_name ( ) const [virtual]

Return the type name of this tableau.

Reimplemented from bgui3d_tableau.

Definition at line 50 of file bgui3d_project2d_tableau.cxx.


Member Data Documentation

The canonical camera looking down the -z axis.

Definition at line 64 of file bgui3d_project2d_tableau.h.

Flag for drawing a headlight.

Definition at line 70 of file bgui3d_project2d_tableau.h.

bool bgui3d_tableau::idle_enabled_ [protected, inherited]

Definition at line 123 of file bgui3d_tableau.h.

Definition at line 124 of file bgui3d_tableau.h.

The GL model matrix to load for the camera position.

Definition at line 67 of file bgui3d_project2d_tableau.h.

SoSceneManager* bgui3d_tableau::overlay_scene_manager_ [protected, inherited]

Definition at line 122 of file bgui3d_tableau.h.

SoNode* bgui3d_tableau::overlay_scene_root_ [protected, inherited]

Definition at line 118 of file bgui3d_tableau.h.

SoSceneManager* bgui3d_tableau::scene_manager_ [protected, inherited]

The scene manager.

Definition at line 121 of file bgui3d_tableau.h.

SoNode* bgui3d_tableau::scene_root_ [protected, inherited]

The root node of the scene graph.

Definition at line 117 of file bgui3d_tableau.h.


The documentation for this class was generated from the following files: