alternative to assert
[gtkD.git] / srcgl / glgdk / GLDraw.d
blobd93e286c19cf13048a720a6ef9f953117a3491dc
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = /usr/share/doc/libgtkglext1-doc/html/gtkglext/gtkglext-gdkglshapes.html
26 * outPack = glgdk
27 * outFile = GLDraw
28 * strct =
29 * realStrct=
30 * ctorStrct=
31 * clss = GLDraw
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gdk_gl_draw_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * structWrap:
45 * local aliases:
48 module glgdk.GLDraw;
50 private import glgdk.glgdktypes;
52 private import lib.glgdk;
55 /**
56 * Description
58 public class GLDraw
61 /**
64 /**
65 * Renders a cube.
66 * The cube is centered at the modeling coordinates origin with sides of
67 * length size.
68 * solid : TRUE if the cube should be solid.
69 * size : length of cube sides.
71 public static void cube(int solid, double size)
73 // void gdk_gl_draw_cube (gboolean solid, double size);
74 gdk_gl_draw_cube(solid, size);
77 /**
78 * Renders a sphere centered at the modeling coordinates origin of
79 * the specified radius. The sphere is subdivided around the Z axis into
80 * slices and along the Z axis into stacks.
81 * solid : TRUE if the sphere should be solid.
82 * radius : the radius of the sphere.
83 * slices : the number of subdivisions around the Z axis (similar to lines of
84 * longitude).
85 * stacks : the number of subdivisions along the Z axis (similar to lines of
86 * latitude).
88 public static void sphere(int solid, double radius, int slices, int stacks)
90 // void gdk_gl_draw_sphere (gboolean solid, double radius, int slices, int stacks);
91 gdk_gl_draw_sphere(solid, radius, slices, stacks);
94 /**
95 * Renders a cone oriented along the Z axis.
96 * The base of the cone is placed at Z = 0, and the top at Z = height.
97 * The cone is subdivided around the Z axis into slices, and along
98 * the Z axis into stacks.
99 * solid : TRUE if the cone should be solid.
100 * base : the radius of the base of the cone.
101 * height : the height of the cone.
102 * slices : the number of subdivisions around the Z axis.
103 * stacks : the number of subdivisions along the Z axis.
105 public static void cone(int solid, double base, double height, int slices, int stacks)
107 // void gdk_gl_draw_cone (gboolean solid, double base, double height, int slices, int stacks);
108 gdk_gl_draw_cone(solid, base, height, slices, stacks);
112 * Renders a torus (doughnut) centered at the modeling coordinates
113 * origin whose axis is aligned with the Z axis.
114 * solid : TRUE if the torus should be solid.
115 * inner_radius : inner radius of the torus.
116 * outer_radius : outer radius of the torus.
117 * nsides : number of sides for each radial section.
118 * rings : number of radial divisions for the torus.
120 public static void torus(int solid, double innerRadius, double outerRadius, int nsides, int rings)
122 // void gdk_gl_draw_torus (gboolean solid, double inner_radius, double outer_radius, int nsides, int rings);
123 gdk_gl_draw_torus(solid, innerRadius, outerRadius, nsides, rings);
127 * Renders a tetrahedron centered at the modeling coordinates
128 * origin with a radius of the square root of 3.
129 * solid : TRUE if the tetrahedron should be solid.
131 public static void tetrahedron(int solid)
133 // void gdk_gl_draw_tetrahedron (gboolean solid);
134 gdk_gl_draw_tetrahedron(solid);
138 * Renders a octahedron centered at the modeling coordinates
139 * origin with a radius of 1.0.
140 * solid : TRUE if the octahedron should be solid.
142 public static void octahedron(int solid)
144 // void gdk_gl_draw_octahedron (gboolean solid);
145 gdk_gl_draw_octahedron(solid);
149 * Renders a dodecahedron centered at the modeling coordinates
150 * origin with a radius of the square root of 3.
151 * solid : TRUE if the dodecahedron should be solid.
153 public static void dodecahedron(int solid)
155 // void gdk_gl_draw_dodecahedron (gboolean solid);
156 gdk_gl_draw_dodecahedron(solid);
160 * Renders a icosahedron.
161 * The icosahedron is centered at the modeling coordinates origin
162 * and has a radius of 1.0.
163 * solid : TRUE if the icosahedron should be solid.
165 public static void icosahedron(int solid)
167 // void gdk_gl_draw_icosahedron (gboolean solid);
168 gdk_gl_draw_icosahedron(solid);
172 * Renders a teapot.
173 * Both surface normals and texture coordinates for the teapot are generated.
174 * The teapot is generated with OpenGL evaluators.
175 * solid : TRUE if the teapot should be solid.
176 * scale : relative size of the teapot.
177 * << Font RenderingTokens >>
179 public static void teapot(int solid, double scale)
181 // void gdk_gl_draw_teapot (gboolean solid, double scale);
182 gdk_gl_draw_teapot(solid, scale);