Top | ![]() |
![]() |
![]() |
![]() |
guint | boundary | Read / Write |
ToolVector * | expansion | Read / Write |
guint | hidding-scheme | Read / Write |
guint | units | Read / Write |
gboolean | use-expansion | Read / Write |
struct | VisuBox |
struct | VisuBoxClass |
enum | VisuBoxVector |
enum | VisuBoxBoundaries |
enum | VisuBoxHiddingStatus |
struct | VisuBoxVertices |
struct | VisuBoxCell |
VisuBox * visu_box_new (double geometry[VISU_BOX_N_VECTORS]
,VisuBoxBoundaries bc
);
A VisuBox object store the definition of a cell.
Since: 3.7
VisuBox * visu_box_new_full (double full[3][3]
,VisuBoxBoundaries bc
);
A VisuBox object stores the definition of a cell. This may fail,
if full
does not define a 3D basis set (the three vectors are not
linearly independant). To check this, use visu_box_getGeometry()
to
test if the first vector is G_MAXFLOAT.
Since: 3.7
void visu_box_convertFullToCell (VisuBox *box
,float cell[3]
,float full[3]
);
Convert given cartesian coordinates of a full matrix definition
(see visu_box_setGeometryFull()
) to cartesian coordinates in the
cell definition used by V_Sim. It corresponds to two applied rotations.
box |
a VisuBox object. |
|
cell |
. |
[out caller-allocates][array fixed-size=3] |
full |
. |
[in][array fixed-size=3] |
Since: 3.7
void visu_box_convertXYZtoBoxCoordinates (const VisuBox *box
,float boxCoord[3]
,float xyz[3]
);
Use this method to transform cartesian coordinates to the box coordinates.
[skip]
box |
a VisuBox object ; |
|
boxCoord |
an array of floating point values to store the result ; |
|
xyz |
an array of floating point values describing coordinates in cartesian. |
Since: 3.7
void visu_box_convertXYZToReduced (VisuBox *box
,GArray *xyz
,float *u
,float *v
,float *w
);
Use this method to transform cartesian into box coordinates.
box |
a VisuBox object ; |
|
xyz |
floating point values that describes the cartesian coordinates. |
[in][array fixed-size=3][element-type gfloat] |
u |
the x coordinate. |
[out caller-allocates] |
v |
the y coordinate. |
[out caller-allocates] |
w |
the z coordinate. |
[out caller-allocates] |
Since: 3.7
void visu_box_convertBoxCoordinatestoXYZ (VisuBox *box
,float xyz[3]
,float boxCoord[3]
);
Use this method to transform box coordinates into cartesian.
[skip]
box |
a VisuBox object ; |
|
xyz |
an array of floating point values to store the result ; |
|
boxCoord |
an array of floating point values that describes the box coordinates. |
Since: 3.7
void visu_box_convertReducedToXYZ (VisuBox *box
,GArray *red
,float *x
,float *y
,float *z
);
Use this method to transform box coordinates into cartesian.
box |
a VisuBox object ; |
|
red |
floating point values that describes the cartesian coordinates. |
[in][array fixed-size=3][element-type gfloat] |
x |
the x coordinate. |
[out caller-allocates] |
y |
the y coordinate. |
[out caller-allocates] |
z |
the z coordinate. |
[out caller-allocates] |
Since: 3.7
gboolean visu_box_constrainInside (VisuBox *box
,float translat[3]
,float xyz[3]
,gboolean withExt
);
Given the box defintion box
and the initial xyz
cartesian coordinates, it
returns the translation translat
to be applied to xyz
to move the
node into the box.
box |
a VisuBox object. |
|
translat |
a translation in cartesian coordinates (out values). |
|
xyz |
a set of cartesian coordinates. |
|
withExt |
TRUE to take into account the box expansions. |
Since: 3.7
void visu_box_getInvMatrix (VisuBox *box
,double matrix[3][3]
);
This method is used when the inverse box matrix is required. This matrix can transform
a vector given in cartesian coordinates into a box vector. If a simple vector
multication is required, then the use of visu_box_convertXYZtoBoxCoordinates()
should be prefered.
[skip]
Since: 3.7
void visu_box_getCellMatrix (VisuBox *box
,double matrix[3][3]
);
This method is used when the box matrix is required. This matrix can transform
a vector given in box coordinates into a cartesian vector. If a simple vector
multication is required, then the use of visu_box_convertBoxCoordinatestoXYZ()
should be prefered.
[skip]
Since: 3.7
void visu_box_getCellMatrixv (VisuBox *box
,double *m11
,double *m12
,double *m13
,double *m21
,double *m22
,double *m23
,double *m31
,double *m32
,double *m33
);
This method is a binding method for visu_box_getCellMatrix()
.
box |
a VisuBox object ; |
|
m11 |
an area to store the matrix. |
[out] |
m12 |
an area to store the matrix. |
[out] |
m13 |
an area to store the matrix. |
[out] |
m21 |
an area to store the matrix. |
[out] |
m22 |
an area to store the matrix. |
[out] |
m23 |
an area to store the matrix. |
[out] |
m31 |
an area to store the matrix. |
[out] |
m32 |
an area to store the matrix. |
[out] |
m33 |
an area to store the matrix. |
[out] |
Since: 3.7
void visu_box_getVertices (VisuBox *box
,float v[8][3]
,gboolean withExtension
);
All nodes are rendered inside a bounding box, this method can be used to retrieve
it. This box is not the drawn box but the box containing all the
nodes, included possible extension. To get the box itself, use
visu_box_getCellMatrix()
instead. One can also get the vertices of
the box itself using FALSE as withExtension
argument.
box |
a VisuBox object. |
|
v |
the position of the eight vertices of the bounding box. |
[out caller-allocates][type VisuBoxVertices*] |
withExtension |
a boolean. |
void visu_box_getExtension (const VisuBox *boxObj
,float extension[3]
);
Using visu_box_setExtension()
, it is possible to duplicate the primitive box
in each directions. Use this method to know the current extension. Returned
values are positive floating point values. An extension of 0. means that
only the primitive box exists, while a value of one means a duplication of
one box in each direction of the coordinate.
boxObj |
a VisuBox object ; |
|
extension |
an allocated array to store the values. |
[out][array fixed-size=3] |
Since: 3.7
VisuBoxBoundaries
visu_box_getBoundary (VisuBox *box
);
Get the boundary conditions defined for box
.
Since: 3.7
void visu_box_getPeriodicity (VisuBox *box
,gboolean per[3]
);
Get for each {x, y, z} directions if the box
is periodic.
box |
a VisuBox object. |
|
per |
a location to store three periodicties. |
[out caller-allocates][array fixed-size=3] |
Since: 3.7
double visu_box_getGeometry (VisuBox *box
,VisuBoxVector vector
);
Retrieve the value of a vector defining the bounding box. The vector is chosen with an int, see the VisuBoxVector enum for more details.
the value of the required vector (always a positive value for vector = 0, 2 or 5 !), or G_MAXFLOAT if the box has not been initialised.
Since: 3.7
void visu_box_getCentre (VisuBox *box
,float centre[3]
);
centre
contains on output the cartesian coordinates of the centre
of the bounding box.
Since: 3.7
float visu_box_getGlobalSize (VisuBox *box
,gboolean withExt
);
The box has a whole size that contains it (including margin, see
visu_box_setMargin()
), this size can be retrieve taking into
account the extension of the box, or not.
G_MAXFLOAT
on failure, otherwise a length for the biggest
diagonal distance of the box, with or without extension.
Since: 3.7
ToolUnits
visu_box_getUnit (VisuBox *box
);
The lengths of box
may be given in a certain unit using
visu_box_setUnit()
.
Since: 3.7
gboolean visu_box_getInside (VisuBox *box
,float vect[3]
,float ratio
);
Update vect
, taking into consideration the particular periodicity
of box
, for vect
expressed in reduced coordinates to be within
[-ratio;ratio].
box |
a VisuBox object. |
|
vect |
some cartesian coordinates. |
[array fixed-size=3][inout] |
ratio |
a ratio in [0;1]. |
Since: 3.8
gboolean visu_box_getPeriodicVector (VisuBox *box
,float vect[3]
);
Modify vect
to get the shortest equivalent vector, taking into
account the periodicity.
[skip]
Since: 3.7
void visu_box_getPeriodicVectorv (VisuBox *box
,float *x
,float *y
,float *z
,float vect[3]
);
Equivalent of visu_box_getPeriodicVector()
used for bindings.
box |
a VisuBox object. |
|
x |
the new x part. |
[out] |
y |
the new y part. |
[out] |
z |
the new z part. |
[out] |
vect |
a vector. |
[array fixed-size=3] |
Since: 3.7
void visu_box_getPeriodicArray (VisuBox *box
,float *array
,guint nEle
);
Used for bindings.
box |
a VisuBox object. |
|
array |
an array of |
[type gint64] |
nEle |
number of elements in |
Since: 3.7
gboolean
visu_box_getExtensionActive (VisuBox *box
);
Retrieve if extensions are applied or not.
Since: 3.8
VisuBoxHiddingStatus
visu_box_getHiddingStatus (const VisuBox *box
);
Retrieves the masking status of box
.
Since: 3.8
gboolean visu_box_setExtensionActive (VisuBox *box
,gboolean status
);
Change if extension values are used not not.
Since: 3.8
gboolean visu_box_setBoundary (VisuBox *box
,VisuBoxBoundaries bc
);
Set up the boundary conditions of box
.
Since: 3.7
gboolean visu_box_setGeometry (VisuBox *box
,double geometry[VISU_BOX_N_VECTORS]
);
This methods set the size of the box.
Since: 3.7
gboolean visu_box_setGeometryFull (VisuBox *box
,double full[3][3]
);
As visu_box_setGeometry()
, but using a full matrix.
Since: 3.7
gboolean visu_box_setMargin (VisuBox *box
,gfloat margin
,gboolean emit
);
This routine add some margin to defined the OpenGL rendering zone
of box
.
Since: 3.7
gboolean visu_box_setExtension (VisuBox *boxObj
,float extension[3]
);
Change the duplication of the box in the three directions.
boxObj |
a VisuBox object ; |
|
extension |
an allocated array to store the values. |
[in][array fixed-size=3] |
Since: 3.7
gboolean visu_box_setUnit (VisuBox *box
,ToolUnits unit
);
The lengths of box
may be given in a certain unit by calling this
routine. If the unit is different from the previously defined, the
coordinate are scaled accordingly.
Since: 3.7
gboolean visu_box_setOrigin (VisuBox *box
,const float orig[3]
);
Change the origin of box
.
Since: 3.8
gboolean visu_box_setHiddingStatus (VisuBox *box
,VisuBoxHiddingStatus status
);
Changes the masking status of box
for status
.
Since: 3.8
struct VisuBoxClass { VisuObjectClass parent; };
Class structure of VisuBox objects.
Identifier of every projection of the box super-cell on an orthogonal basis-set.
Since: 3.7
This describes the periodicity of the bounding box in the three directions.
This describes the possibilty to use the box as a masking objects for nodes.
Since: 3.8
struct VisuBoxVertices { float vertices[8][3]; };
Structure used for bindings.
Since: 3.7
struct VisuBoxCell { double box[VISU_BOX_N_VECTORS]; };
Structure used for bindings.
Since: 3.7
“boundary”
property“boundary” guint
Boundary conditions.
Flags: Read / Write
Allowed values: <= 7
Default value: 7
“hidding-scheme”
property“hidding-scheme” guint
hidding scheme used by the box.
Flags: Read / Write
Allowed values: <= 2
Default value: 0
“units”
property“units” guint
Units of dimensions.
Flags: Read / Write
Allowed values: <= 3
Default value: 0
“use-expansion”
property“use-expansion” gboolean
Expanion is active or not.
Flags: Read / Write
Default value: FALSE
“SizeChanged”
signalvoid user_function (VisuBox *box, gfloat extens, gpointer user_data)
Gets emitted when the box size is changed (because of box duplication for instance).
box |
the object which received the signal ; |
|
extens |
the new longuest distance in the box taking into account the extension. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.7
“UnitChanged”
signalvoid user_function (VisuBox *box, gfloat factor, gpointer user_data)
Gets emitted when the units are changed.
box |
the object which received the signal ; |
|
factor |
the factor that has been applied. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.7