Top | ![]() |
![]() |
![]() |
![]() |
VisuPlaneSetVisuPlaneSet — Defines a storage object to gather VisuPlane objects. |
struct | VisuPlaneSet |
struct | VisuPlaneSetClass |
struct | VisuPlaneSetIter |
enum | VisuPlaneSetHiddingEnum |
A VisuPlaneSet object is a storage object for a bunch of
VisuPlane. This object provides methods to compute hiding
properties, like visu_plane_set_getVisibility()
; method to load
and save plane definitions into a file, see
visu_plane_set_exportXMLFile()
; or to iterate over the internal storage.
gpointer (*VisuPlaneSetItemNew) (VisuPlane *plane
,gpointer data
);
A method to generate a new plane item in the plane set for
plane
. This method is called to encapsulate plane
when plane
is
added to the plane set.
Since: 3.8
void (*VisuPlaneSetItemFree) (VisuPlane *plane
,gpointer data
);
A method to free a given plane item in the plane set for
plane
. This method is called when plane
is removed from the plane set.
Since: 3.8
VisuPlaneSet * visu_plane_set_new ();
Creates an object to store several planes and do hiding operations with them.
Since: 3.8
VisuPlaneSet * visu_plane_set_newFull (VisuPlaneSetItemNew newItem
,VisuPlaneSetItemFree freeItem
,gpointer data
);
Creates an object to store several planes and do hiding operations with them.
newItem |
a routine to be called when adding a plane to the set. |
[scope call] |
freeItem |
a routine to be called when removing a plane from the set. |
[scope call] |
data |
some user data. |
Since: 3.8
gboolean visu_plane_set_add (VisuPlaneSet *set
,VisuPlane *plane
);
Adds a plane
to the list of stored planes.
Since: 3.8
gboolean visu_plane_set_remove (VisuPlaneSet *set
,VisuPlane *plane
);
Remove plane
from the list of stored planes.
Since: 3.8
VisuPlane * visu_plane_set_getAt (const VisuPlaneSet *set
,guint i
);
Retrieve the plane stored at index i
.
Since: 3.8
gboolean visu_plane_set_iter_new (const VisuPlaneSet *set
,VisuPlaneSetIter *iter
);
Creates an iterator on the internal storage of VisuPlane objects.
Since: 3.8
gboolean
visu_plane_set_iter_next (VisuPlaneSetIter *iter
);
Use this function to iterate on plane stored in a VisuPlaneSet object.
Since: 3.8
gboolean visu_plane_set_getIntersection (const VisuPlaneSet *set
,float pointA[3]
,float pointB[3]
,float inter[3]
,gboolean inside
);
Compute the location of the intersection point of segment AB with list of
planes set
. If there are several intersections, the closest to
point A is returned. If inside
is TRUE, then the intersection
point must be within the line [AB].
set |
an array of VisuPlane, NULL terminated ; |
|
pointA |
three cartesian coordinates. |
|
pointB |
three cartesian coordinates. |
|
inter |
a location to store the intersection point. |
|
inside |
a boolean. |
Since: 3.8
gboolean visu_plane_set_setHiddingMode (VisuPlaneSet *set
,VisuPlaneSetHiddingEnum mode
);
This method is used to set the hiding mode flag. In union mode, elements are not drawn if they are hidden by one plane at least. In intersection mode, elements are only hidden if masked by all planes.
set |
the list of planes. |
|
mode |
a value related to the hiding mode (look at the enum VisuPlaneSetHiddingEnum). |
Since: 3.8
gboolean
visu_plane_set_getHiddingStatus (const VisuPlaneSet *set
);
Inquire if the set
has any masking planes.
Since: 3.8
gboolean visu_plane_set_getVisibility (const VisuPlaneSet *set
,float point[3]
);
Compute the visibility of the given point
, following the masking scheme
of the given plane list.
Since: 3.8
gboolean visu_plane_set_parseXMLFile (VisuPlaneSet *set
,const gchar *filename
,GError **error
);
Read the given file (syntax in XML) and create a list of planes.
set |
a VisuPlaneSet object to store read planes. |
|
filename |
the file to parse ;. |
[type filename] |
error |
a pointer to store the error (can be NULL). |
TRUE if everything goes right, if not and error
(if not NULL)
is set and contains the message of the error.
Since: 3.8
gboolean visu_plane_set_exportXMLFile (const VisuPlaneSet *set
,const gchar *filename
,GError **error
);
Export in XML format the given list of planes to the given file.
set |
a VisuPlaneSet object. |
|
filename |
the file to export to ; |
|
error |
a pointer to store the error (can be NULL). |
TRUE if everything goes right, if not and error
(if not NULL)
is set and contains the message of the error.
Since: 3.8
struct VisuPlaneSetClass { VisuObjectClass parent; };
Common name to refer to a _VisuPlaneSetClass.
struct VisuPlaneSetIter { const VisuPlaneSet *set; VisuPlane *plane; GList *next; };
Structure to iterate over the stored plane
of set
.
const VisuPlaneSet * |
the VisuPlaneSet to iter on. |
|
VisuPlane * |
the current VisuPlane. |
|
GList * |
internal index. |
[element-type gpointer] |
Since: 3.8
Enum used to address different hiding modes. See visu_plane_set_setHiddingMode()
for
further details.
“hidding-mode”
property“hidding-mode” guint
how to hide from multiple planes.
Flags: Read / Write
Allowed values: <= 1
Default value: 0
“masking”
property“masking” gboolean
masking property.
Flags: Read / Write
Default value: FALSE
“added”
signalvoid user_function (VisuPlaneSet *set, VisuPlane *plane, gpointer user_data)
This signal is emitted each time a plane is added to the set.
set |
the object emitting the signal. |
|
plane |
the added VisuPlane object. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.8
“removed”
signalvoid user_function (VisuPlaneSet *set, VisuPlane *plane, gpointer user_data)
This signal is emitted each time a plane is removed from the set.
set |
the object emitting the signal. |
|
plane |
the removed VisuPlane object. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
Since: 3.8