![]() | ![]() | ![]() | Gtk 3d Canvas (libgtk3dcanvas) Reference Manual | ![]() |
---|
#include <gtk-3dcanvas.h> struct Gtk3dcanvasItem; 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); void gtk_3dcanvas_item_empty (Gtk3dcanvasItem *item);
"parent" Gtk3dcanvasGroup : Read / Write / Construct "type" gint : Read / Write / Construct "color" gchararray : Read / Write / Construct
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().
struct Gtk3dcanvasItem;
The fields of the Gtk3dcanvasItem are private, and should be accessed only through the properties and functions below.
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.
item : | self |
x : | x of the point to add |
y : | y of the point to add |
z : | z of the point to add |
norm_x : | the normal along x of the point |
norm_y : | the normal along y of the point |
norm_z : | the normal along z of the point |
Returns : | the index of the created point in the item. |
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.
item : | self |
index : | the index to add |
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?
item : | self |
void gtk_3dcanvas_item_dump (Gtk3dcanvasItem *item);
Dump an item to stdout for debugging purpose
item : | what to dump |
void gtk_3dcanvas_item_empty (Gtk3dcanvasItem *item);
Remove all the previously added points and index from that 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.
item : | self |
"parent" (Gtk3dcanvasGroup : Read / Write / Construct) | |
"type" (gint : Read / Write / Construct) | |
"color" (gchararray : Read / Write / Construct) |
<<< Gtk3dcanvas | Gtk3dcanvasBall >>> |