Gtk 3d Canvas (libgtk3dcanvas) Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <gtk-3dcanvas-item.h> Gtk3dcanvasItem* gtk_3dcanvas_item_new (Gtk3dcanvasGroup *parent, GType type, const gchar *first_arg_name, ...); int gtk_3dcanvas_item_add_point (Gtk3dcanvasItem *item, float x, float y, float z, float norm_x, float norm_y, float norm_z); void gtk_3dcanvas_item_add_index (Gtk3dcanvasItem *item, int index); void gtk_3dcanvas_item_compute_extents (Gtk3dcanvasItem *item); void gtk_3dcanvas_item_dump (Gtk3dcanvasItem *item); |
This type should not be used directly, and its childs (Gtk3dCanvasBall, etc) should be prefered. The methods here should be seen as internal ones, for the implementation of these childs.
If you insist, to use Gtk3dCanvasItem, you should create it using gtk_3dcanvas_item_new(), then add some points on it using gtk_3dcanvas_item_add_point(), and finally link the points using gtk_3dcanvas_item_add_index().
Gtk3dcanvasItem* gtk_3dcanvas_item_new (Gtk3dcanvasGroup *parent, GType type, const gchar *first_arg_name, ...); |
Allocates an gtk_3dcanvas item. Once it is created, you have to fill it using add_point and add_index functions.
You may find easier to use a child of gtk_3dcanvas_item instead of this.
parent : | the group in which this item should be placed |
type : | The object type of the item. |
first_arg_name : | A list of object argument name/value pairs, NULL-terminated, used to configure the item. For example, "color", "00BB00", "type", GL_QUAD_STRIP, NULL. |
... : | Rest of this list |
Returns : | the newly allocated item |
int gtk_3dcanvas_item_add_point (Gtk3dcanvasItem *item, float x, float y, float z, float norm_x, float norm_y, float norm_z); |
Add a point to a previously allocated object.
This can be viewed as an internal function for gtk_3dcanvas_item childs, but was made public just in case you know what you do.
void gtk_3dcanvas_item_add_index (Gtk3dcanvasItem *item, int index); |
Add an index to a previously allocated item.
This can be viewed as an internal function for gtk_3dcanvas_item childs, but was made public just in case you know what you do.
void gtk_3dcanvas_item_compute_extents (Gtk3dcanvasItem *item); |
Only needed if you remove points from the item, since adding point updates the extents automatically. But how could you remove points?