VisuPairCylinder

VisuPairCylinder — An interface defining all the properties required to draw a VisuPair as a cylinder.

Functions

Properties

guint color-type Read / Write
gfloat radius Read / Write

Types and Values

Object Hierarchy

    GInterface
    ╰── VisuPairCylinder

Prerequisites

VisuPairCylinder requires GObject.

Known Implementations

VisuPairCylinder is implemented by VisuPairLink.

Description

VisuPairCylinder interface introduces the "radius" property for the cylinder rendering. Cylinders can also be rendered with a solid color or with colors depending on the VisuElement their are linking.

Functions

visu_pair_cylinder_getDefaultRadius ()

gfloat
visu_pair_cylinder_getDefaultRadius ();

Get the default value for cylinder radius.

Returns

the default value for cylinder radius.


visu_pair_cylinder_getDefaultColorType ()

VisuPairCylinderColorId
visu_pair_cylinder_getDefaultColorType
                               ();

Get the color scheme.

Returns

an integer corresponding to the color scheme (0 or 1).


visu_pair_cylinder_setColorType ()

gboolean
visu_pair_cylinder_setColorType (VisuPairCylinder *data,
                                 VisuPairCylinderColorId val);

It set the color scheme for cylinder pairs. It can be 0 or 1.

Parameters

data

a VisuPairCylinder object.

 

val

a integer that identify the color scheme.

 

Returns

TRUE if the calling method should take care of VisuGlExtPairs objects, FALSE if not.


visu_pair_cylinder_getColorType ()

VisuPairCylinderColorId
visu_pair_cylinder_getColorType (VisuPairCylinder *data);

Get the color type value for the specified pair.

Parameters

data

a VisuPairCylinder object.

 

Returns

the color type value.


visu_pair_cylinder_setRadius ()

gboolean
visu_pair_cylinder_setRadius (VisuPairCylinder *data,
                              gfloat val);

This method allows to change the radius value of a specific pair. When a pair is rendered via a cylinder, it first checks if that pairs has a specific radius value set by this method. If not, it uses the default value.

Parameters

data

a VisuPairCylinder object ;

 

val

a float value.

 

Returns

TRUE if the value is changed.


visu_pair_cylinder_getRadius ()

gfloat
visu_pair_cylinder_getRadius (VisuPairCylinder *data);

Get the radius value for the specified pair.

Parameters

data

a VisuPairCylinder object.

 

Returns

the radius value.

Types and Values

enum VisuPairCylinderColorId

Possible flags to colourise the cylinder pairs.

Members

VISU_CYLINDER_COLOR_USER

color is chosen by the user.

 

VISU_CYLINDER_COLOR_ELEMENT

color is chosen according to the color of the VisuElement the pair is linked to.

 

VISU_CYLINDER_N_COLOR

number of choices for the colourisation.

 

VISU_PAIR_CYLINDER_RADIUS_MIN

#define VISU_PAIR_CYLINDER_RADIUS_MIN 0.01f

Minimum value for the radius of cylinder pairs.


VISU_PAIR_CYLINDER_RADIUS_MAX

#define VISU_PAIR_CYLINDER_RADIUS_MAX 3.f

Maximum value for the radius of cylinder pairs.


struct VisuPairCylinderInterface

struct VisuPairCylinderInterface {
  GTypeInterface parent;

  gfloat     (*get_radius) (VisuPairCylinder *self);
  gboolean   (*set_radius) (VisuPairCylinder *self, gfloat val);

  VisuPairCylinderColorId (*get_colorType) (VisuPairCylinder *self);
  gboolean                (*set_colorType) (VisuPairCylinder *self, VisuPairCylinderColorId val);
};

Interface for class that can represent VisuPairLink as cylinders.

Members

GTypeInterface parent;

its parent.

 

get_radius ()

a method to get the radius.

 

set_radius ()

a method to change the radius of drawn cylinder VisuPairLink.

 

get_colorType ()

a method to get the coloring scheme.

 

set_colorType ()

a method to change the coloring scheme.

 

Since: 3.8


VisuPairCylinder

typedef struct _VisuPairCylinder VisuPairCylinder;

Interface object.

Since: 3.8

Property Details

The “color-type” property

  “color-type”               guint

cylinder color type.

Flags: Read / Write

Allowed values: <= 1

Default value: 0


The “radius” property

  “radius”                   gfloat

cylinder radius.

Flags: Read / Write

Allowed values: [0.01,3]

Default value: 0.1