VisuGlExtBox

VisuGlExtBox — Draw a bounding box around nodes.

Functions

Properties

VisuBox * basis Read / Write
guint expand-stipple Read / Write
ToolColor * side-color Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuGlExt
            ╰── VisuGlExtBox

Implemented Interfaces

VisuGlExtBox implements VisuGlExtLined.

Description

This extension allows V_Sim to draw a box around the nodes. The box is defined in the VisuBox structure and can be retrieved with visu_box_getGeometry(). This box is not necessary orthogonal.

It has several properties, namely, its colour, its line width and its line pattern. It is represented in OpenGL with simple lines and is affected by the antialiasing property. Defined resources:

  • box_is_on (boolean): controls if a box is drawn around the rendering area (since 3.0).

  • box_color (RGB in [0;1]): defines the color of the box(since 3.0).

  • box_line_width (integer in [1;10]): defines the width of the lines of the box (since 3.0).

  • box_line_stipple (2 integers in ]0;65535]): dot scheme detail for the lines of the box. The first value is the pattern for the line of the main box and the second is the pattern for the lines of the expanded areas (since 3.4).

Functions

visu_gl_ext_box_new ()

VisuGlExtBox *
visu_gl_ext_box_new (const gchar *name);

Creates a new VisuGlExt to draw a box.

Parameters

name

the name to give to the extension (default is VISU_GL_EXT_BOX_ID).

[allow-none]

Returns

a pointer to the VisuGlExt it created or NULL otherwise.

Since: 3.7


visu_gl_ext_box_setBox ()

gboolean
visu_gl_ext_box_setBox (VisuGlExtBox *box,
                        VisuBox *boxObj);

Attach the VisuBox to draw the frame of.

Parameters

box

the VisuGlExtBox object to attach to.

 

boxObj

the box to get the definition of.

 

Returns

TRUE if the VisuBox model is actually changed.

Since: 3.7


visu_gl_ext_box_setBasis ()

gboolean
visu_gl_ext_box_setBasis (VisuGlExtBox *box,
                          float orig[3],
                          float mat[3][3]);

Define the box to draw with a simple matrix basis-set and an origin.

Parameters

box

the VisuGlExtBox object to attach to.

 

orig

the origin.

[array fixed-size=3]

mat

the basis-set.

[array fixed-size=9]

Returns

TRUE if value is actually changed.

Since: 3.7


visu_gl_ext_box_setSideRGB ()

gboolean
visu_gl_ext_box_setSideRGB (VisuGlExtBox *box,
                            float rgba[4],
                            int mask);

Change the colour to represent the side of the super-cell. A channel alpha of zero, means that the box is rendered as wire-frame only. The sides are indeed drawn only if the box has expansion.

Parameters

box

the VisuGlExtBox to update.

 

rgba

a four floats array with values (0 <= values <= 1) for the red, the green, the blue color and the alpha channel. Only values specified by the mask are really relevant.

[array fixed-size=4]

mask

use TOOL_COLOR_MASK_R, TOOL_COLOR_MASK_G, TOOL_COLOR_MASK_B, TOOL_COLOR_MASK_A or a combinaison to indicate what values in the rgba array must be taken into account.

 

Returns

TRUE if value is actually changed.

Since: 3.7


visu_gl_ext_box_setExpandStipple ()

gboolean
visu_gl_ext_box_setExpandStipple (VisuGlExtBox *box,
                                  guint16 stipple);

Method used to change the value of the parameter box_line_stipple (expanded part).

Parameters

box

the VisuGlExtBox to update.

 

stipple

a pattern for line stipple in OpenGL.

 

Returns

TRUE if value is actually changed.


visu_gl_ext_box_getSideRGB ()

float *
visu_gl_ext_box_getSideRGB (VisuGlExtBox *box);

Read the colour components of the sides of the box (in [0;1]).

Parameters

box

the VisuGlExtBox to inquire.

 

Returns

all the colour values of the current box line.


visu_gl_ext_box_getExpandStipple ()

guint16
visu_gl_ext_box_getExpandStipple (VisuGlExtBox *box);

Read the line stipple pattern used for box (expanded part).

Parameters

box

the VisuGlExtBox to inquire.

 

Returns

the value of current box line pattern.

Types and Values

struct VisuGlExtBox

struct VisuGlExtBox;

An opaque structure.

Since: 3.7


struct VisuGlExtBoxClass

struct VisuGlExtBoxClass {
  VisuGlExtClass parent;
};

A short way to identify _VisuGlExtBoxClass structure.

Members

VisuGlExtClass parent;

the parent class;

 

Since: 3.7


VISU_GL_EXT_BOX_ID

#define VISU_GL_EXT_BOX_ID "Box"

The id used to identify this extension, see visu_gl_ext_rebuild() for instance.

Property Details

The “basis” property

  “basis”                    VisuBox *

provides the basis-set to draw the box.

Flags: Read / Write


The “expand-stipple” property

  “expand-stipple”           guint

rendering line stipple pattern of extension.

Flags: Read / Write

Allowed values: <= 65535

Default value: 65280


The “side-color” property

  “side-color”               ToolColor *

color of the primary cell sides.

Flags: Read / Write