OrientationChooser

OrientationChooser — Defines a dialog widget to choose the camera position.

Synopsis


#include <coreTools/toolMatrix.h>

                    OrientationChooser;
enum                OrientationChooserKind;

GtkWidget*          orientationChooserNew               (OrientationChooserKind kind,
                                                         gboolean liveUpdate,
                                                         VisuData *data,
                                                         GtkWindow *parent);
void                orientationChooserGet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);
void                orientationChooserGet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserGet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserSet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);
void                orientationChooserSet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);
void                orientationChooserSet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);

Description

This widget is a GtkDialog window that can be used to choose an orientation for the camera, using either the cartesian coordinates, the box coordinates or the spherical coordinates.

Details

OrientationChooser

typedef struct _OrientationChooser OrientationChooser;

Short form for a OrientationChooser_struct structure.


enum OrientationChooserKind

typedef enum
  {
    orientationChooser_direction,
    orientationChooser_normal
  } OrientationChooserKind;

These values are used when creating an OrientationChooser, to specify the behavior of the box coordinates. This is due to the fact that the box coordinates are not always orthoggonal.

orientationChooser_direction

this flag specifies that the box coordinates are used to identity a direction ;

orientationChooser_normal

this flag specifies that the box coordinates are used to identify a normal direction.

orientationChooserNew ()

GtkWidget*          orientationChooserNew               (OrientationChooserKind kind,
                                                         gboolean liveUpdate,
                                                         VisuData *data,
                                                         GtkWindow *parent);

Create a dialog box with three choices to choose a direction in space: the classical orthogonal basis set, the spherical one or the basis set linked to the box. If the data argument is NULL, this last possibility is made unsensitive. If the kind is set to orientationChooser_direction, the orthogonal coordinates correspond exactly to the box coordinates (after transformation) ; whereas kind is orientationChooser_normal, the cartesian coordinates are those which give the right normal plane to the direction given in the box coordinates.

kind :

to set the box coordinates behavior ;

liveUpdate :

raise "values-changed" when a value is changed ;

data :

the associated VisuData to get the box definition (can be NULL) ;

parent :

give the parent window to set the modal status and the position.

Returns :

a newly created object.

orientationChooserGet_anglesValues ()

void                orientationChooserGet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);

Get the current orientation in the spherical basis set.

orientation :

a OrientationChooser widget ;

values :

a location for two floating point values.

orientationChooserGet_boxValues ()

void                orientationChooserGet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the box basis set.

orientation :

a OrientationChooser widget ;

values :

a location for three floating point values.

orientationChooserGet_orthoValues ()

void                orientationChooserGet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);

Get the current orientation in the orthogonal basis set.

orientation :

a OrientationChooser widget ;

values :

a location for three floating point values.

orientationChooserSet_anglesValues ()

void                orientationChooserSet_anglesValues  (OrientationChooser *orientation,
                                                         float values[2]);

Change the direction using the one given in a spherical basis set. Update all other values accordingly.

orientation :

a OrientationChooser widget ;

values :

two floating point values.

orientationChooserSet_boxValues ()

void                orientationChooserSet_boxValues     (OrientationChooser *orientation,
                                                         float values[3]);

Change the direction using the one given in the box basis set. Update all other values accordingly.

orientation :

a OrientationChooser widget ;

values :

three floating point values.

orientationChooserSet_orthoValues ()

void                orientationChooserSet_orthoValues   (OrientationChooser *orientation,
                                                         float values[3]);

Change the direction using the one given in an orthogonal basis set. Update all other values accordingly.

orientation :

a OrientationChooser widget ;

values :

three floating point values.