Top | ![]() |
![]() |
![]() |
![]() |
Primitives are objects containing basic 3D geometrical structures. A variety of them can be created using these functions.
G3DObject * g3d_primitive_cube (G3DFloat width
,G3DFloat height
,G3DFloat depth
,G3DMaterial *material
);
Generates an object containing a box. It is deprecated and now a wrapper for
g3d_primitive_box()
.
G3DObject * g3d_primitive_box (G3DFloat width
,G3DFloat height
,G3DFloat depth
,G3DMaterial *material
);
Generates an object containing a box.
G3DObject * g3d_primitive_box_strip_2d (guint32 vcnt
,gdouble *vdata
,gdouble height
,gdouble width
,G3DMaterial *material
);
Generates a strip of box segments defined by corner center points using two-dimensional data (x/z plane).
G3DObject * g3d_primitive_mesh (guint32 m
,guint32 n
,gboolean wrap_m
,gboolean wrap_n
,G3DMaterial *material
);
Generate a mesh consisting of m * n vertices. The vertex data is initialized with (0.0, 0.0, 0.0) and has to be set to something useful.
G3DObject * g3d_primitive_cylinder (G3DFloat radius
,G3DFloat height
,guint32 sides
,gboolean top
,gboolean bottom
,G3DMaterial *material
);
Generates an object containing a cylinder.
G3DObject * g3d_primitive_tube (G3DFloat r_in
,G3DFloat r_out
,G3DFloat height
,guint32 sides
,gboolean top
,gboolean bottom
,G3DMaterial *material
);
Generates an object containing a tube (a cylinder with a hole).
G3DObject * g3d_primitive_sphere (G3DFloat radius
,guint32 vseg
,guint32 hseg
,G3DMaterial *material
);
Generates an object containing a sphere.