GwyGLSetup

GwyGLSetup — OpenGL 3D scene setup

Functions

Properties

gboolean axes-visible Read / Write
gboolean fmscale-reserve-space Read / Write
double fmscale-size Read / Write
gboolean fmscale-visible Read / Write
double fmscale-y-align Read / Write
gboolean hide-masked Read / Write
gboolean labels-visible Read / Write
double light-phi Read / Write
double light-theta Read / Write
double line-width Read / Write
GwyGLProjection projection Read / Write
double rotation-x Read / Write
double rotation-y Read / Write
double scale Read / Write
GwyGLVisualization visualization Read / Write
double z-scale Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GwyGLSetup

Implemented Interfaces

GwyGLSetup implements GwySerializable.

Includes

#include <libgwydgets/gwydgets.h>

Description

GwyGLSetup represents a basic 3D scene setup: viewpoint, projection, light, scale, etc. It is serializable and used to represent the GwyGLView setup.

Its components can be read directly in the struct or generically with g_object_get(). To set them you it is necessary to use g_object_set().

Functions

gwy_gl_setup_new()

GwyGLSetup *
gwy_gl_setup_new (void);

Creates a new OpenGL view setup with default values.

Returns

A newly created OpenGL view setup.

Types and Values

enum GwyGLMovement

The type of OpenGL 3D view change that happens when user drags it with mouse.

Members

GWY_GL_MOVEMENT_NONE

View cannot be changed by user.

 

GWY_GL_MOVEMENT_ROTATION

View can be rotated.

 

GWY_GL_MOVEMENT_SCALE

View can be scaled.

 

GWY_GL_MOVEMENT_DEFORMATION

View can be scaled.

 

GWY_GL_MOVEMENT_LIGHT

Light position can be changed.

 

enum GwyGLProjection

OpenGL 3D view projection type.

Members

GWY_GL_PROJECTION_ORTHOGRAPHIC

Otrhographic projection.

 

GWY_GL_PROJECTION_PERSPECTIVE

Perspective projection.

 

enum GwyGLVisualization

OpenGL 3D view data visualization type.

Members

GWY_GL_VISUALIZATION_GRADIENT

Data are displayed with color corresponding to 2D view.

 

GWY_GL_VISUALIZATION_LIGHTING

Data are displayed as an uniform material with some lighting.

 

GWY_GL_VISUALIZATION_OVERLAY

Data are displayed with grading and lighting, with colour possibly taken from a different data field.

 

GWY_GL_VISUALIZATION_OVERLAY_NO_LIGHT

Data are displayed with grading and lighting, with colour possibly taken from a different data field.

 

enum GwyGLViewLabel

OpenGL 3D view label type.

Members

GWY_GL_VIEW_LABEL_X

X-axis label.

 

GWY_GL_VIEW_LABEL_Y

Y-axis label.

 

GWY_GL_VIEW_LABEL_MIN

Z-axis bottom label.

 

GWY_GL_VIEW_LABEL_MAX

Z-axis top label.

 

GWY_GL_VIEW_NLABELS

The number of labels.

 

struct GwyGLSetup

struct GwyGLSetup;

struct GwyGLSetupClass

struct GwyGLSetupClass {
    GObjectClass parent_class;

    void (*reserved1)(void);
    void (*reserved2)(void);
};

Property Details

The “axes-visible” property

  “axes-visible”             gboolean

Whether axes are visible.

Owner: GwyGLSetup

Flags: Read / Write

Default value: TRUE


The “fmscale-reserve-space” property

  “fmscale-reserve-space”    gboolean

Whether to reserve horizontal space for the false colour scale.

Owner: GwyGLSetup

Flags: Read / Write

Default value: TRUE


The “fmscale-size” property

  “fmscale-size”             double

Size of false colour scale relative to view height.

Owner: GwyGLSetup

Flags: Read / Write

Allowed values: [0,1]

Default value: 1


The “fmscale-visible” property

  “fmscale-visible”          gboolean

Whether false color bar is visible.

Owner: GwyGLSetup

Flags: Read / Write

Default value: FALSE


The “fmscale-y-align” property

  “fmscale-y-align”          double

Vertical alignment of false colour scale.

Owner: GwyGLSetup

Flags: Read / Write

Allowed values: [0,1]

Default value: 0.5


The “hide-masked” property

  “hide-masked”              gboolean

Hide masked vertices.

Owner: GwyGLSetup

Flags: Read / Write

Default value: FALSE


The “labels-visible” property

  “labels-visible”           gboolean

Whether axis labels are visible if axes are visible.

Owner: GwyGLSetup

Flags: Read / Write

Default value: TRUE


The “light-phi” property

  “light-phi”                double

Light source direction azimuth in horizontal plane, in radians.

Owner: GwyGLSetup

Flags: Read / Write

Default value: 0


The “light-theta” property

  “light-theta”              double

Light source direction deviation from the z-axis, in radians.

Owner: GwyGLSetup

Flags: Read / Write

Default value: 0


The “line-width” property

  “line-width”               double

Width of axis lines and ticks, in pixels.

Owner: GwyGLSetup

Flags: Read / Write

Allowed values: [1,10]

Default value: 1


The “projection” property

  “projection”               GwyGLProjection

The type of the projection.

Owner: GwyGLSetup

Flags: Read / Write

Default value: GWY_GL_PROJECTION_ORTHOGRAPHIC


The “rotation-x” property

  “rotation-x”               double

Angle of the first rotation around x-axis, in radians.

Owner: GwyGLSetup

Flags: Read / Write

Default value: 0.785398


The “rotation-y” property

  “rotation-y”               double

Angle of the second rotation around y-axis, in radians.

Owner: GwyGLSetup

Flags: Read / Write

Default value: -0.785398


The “scale” property

  “scale”                    double

Overall view scale.

Owner: GwyGLSetup

Flags: Read / Write

Allowed values: >= G_MINDOUBLE

Default value: 1


The “visualization” property

  “visualization”            GwyGLVisualization

Data visualization type.

Owner: GwyGLSetup

Flags: Read / Write

Default value: GWY_GL_VISUALIZATION_GRADIENT


The “z-scale” property

  “z-scale”                  double

Extra stretch along z (value) axis.

Owner: GwyGLSetup

Flags: Read / Write

Allowed values: >= G_MINDOUBLE

Default value: 1

See Also

GwyGLView -- the basic OpenGL data display widget