alternative to assert
[gtkD.git] / gtkD / srcgl / glgdk / GLDraw.d
blob408d6cd3ef797e8af3b7931bf1e68876043a043c
1 /*
2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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 = 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 * module aliases:
46 * local aliases:
49 module glgdk.GLDraw;
51 version(noAssert)
53 version(Tango)
55 import tango.io.Stdout; // use the tango loging?
59 private import gtkglc.glgdktypes;
61 private import gtkglc.glgdk;
68 /**
69 * Description
71 public class GLDraw
74 /**
77 /**
78 * Renders a cube.
79 * The cube is centered at the modeling coordinates origin with sides of
80 * length size.
81 * solid:
82 * TRUE if the cube should be solid.
83 * size:
84 * length of cube sides.
86 public static void cube(int solid, double size)
88 // void gdk_gl_draw_cube (gboolean solid, double size);
89 gdk_gl_draw_cube(solid, size);
92 /**
93 * Renders a sphere centered at the modeling coordinates origin of
94 * the specified radius. The sphere is subdivided around the Z axis into
95 * slices and along the Z axis into stacks.
96 * solid:
97 * TRUE if the sphere should be solid.
98 * radius:
99 * the radius of the sphere.
100 * slices:
101 * the number of subdivisions around the Z axis (similar to lines of
102 * longitude).
103 * stacks:
104 * the number of subdivisions along the Z axis (similar to lines of
105 * latitude).
107 public static void sphere(int solid, double radius, int slices, int stacks)
109 // void gdk_gl_draw_sphere (gboolean solid, double radius, int slices, int stacks);
110 gdk_gl_draw_sphere(solid, radius, slices, stacks);
114 * Renders a cone oriented along the Z axis.
115 * The base of the cone is placed at Z = 0, and the top at Z = height.
116 * The cone is subdivided around the Z axis into slices, and along
117 * the Z axis into stacks.
118 * solid:
119 * TRUE if the cone should be solid.
120 * base:
121 * the radius of the base of the cone.
122 * height:
123 * the height of the cone.
124 * slices:
125 * the number of subdivisions around the Z axis.
126 * stacks:
127 * the number of subdivisions along the Z axis.
129 public static void cone(int solid, double base, double height, int slices, int stacks)
131 // void gdk_gl_draw_cone (gboolean solid, double base, double height, int slices, int stacks);
132 gdk_gl_draw_cone(solid, base, height, slices, stacks);
136 * Renders a torus (doughnut) centered at the modeling coordinates
137 * origin whose axis is aligned with the Z axis.
138 * solid:
139 * TRUE if the torus should be solid.
140 * inner_radius:
141 * inner radius of the torus.
142 * outer_radius:
143 * outer radius of the torus.
144 * nsides:
145 * number of sides for each radial section.
146 * rings:
147 * number of radial divisions for the torus.
149 public static void torus(int solid, double innerRadius, double outerRadius, int nsides, int rings)
151 // void gdk_gl_draw_torus (gboolean solid, double inner_radius, double outer_radius, int nsides, int rings);
152 gdk_gl_draw_torus(solid, innerRadius, outerRadius, nsides, rings);
156 * Renders a tetrahedron centered at the modeling coordinates
157 * origin with a radius of the square root of 3.
158 * solid:
159 * TRUE if the tetrahedron should be solid.
161 public static void tetrahedron(int solid)
163 // void gdk_gl_draw_tetrahedron (gboolean solid);
164 gdk_gl_draw_tetrahedron(solid);
168 * Renders a octahedron centered at the modeling coordinates
169 * origin with a radius of 1.0.
170 * solid:
171 * TRUE if the octahedron should be solid.
173 public static void octahedron(int solid)
175 // void gdk_gl_draw_octahedron (gboolean solid);
176 gdk_gl_draw_octahedron(solid);
180 * Renders a dodecahedron centered at the modeling coordinates
181 * origin with a radius of the square root of 3.
182 * solid:
183 * TRUE if the dodecahedron should be solid.
185 public static void dodecahedron(int solid)
187 // void gdk_gl_draw_dodecahedron (gboolean solid);
188 gdk_gl_draw_dodecahedron(solid);
192 * Renders a icosahedron.
193 * The icosahedron is centered at the modeling coordinates origin
194 * and has a radius of 1.0.
195 * solid:
196 * TRUE if the icosahedron should be solid.
198 public static void icosahedron(int solid)
200 // void gdk_gl_draw_icosahedron (gboolean solid);
201 gdk_gl_draw_icosahedron(solid);
205 * Renders a teapot.
206 * Both surface normals and texture coordinates for the teapot are generated.
207 * The teapot is generated with OpenGL evaluators.
208 * solid:
209 * TRUE if the teapot should be solid.
210 * scale:
211 * relative size of the teapot.
212 * <<Font Rendering
213 * Tokens>>
215 public static void teapot(int solid, double scale)
217 // void gdk_gl_draw_teapot (gboolean solid, double scale);
218 gdk_gl_draw_teapot(solid, scale);