wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
wx_bgi_solid.h
Go to the documentation of this file.
1#pragma once
2
16#include "bgi_types.h"
17#include "wx_bgi_dds.h" // WXBGI_SOLID_* and WXBGI_PARAM_* constants
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23// =============================================================================
24// Global solid rendering defaults
25// =============================================================================
26
30
33
40
43
46
47// =============================================================================
48// Phase 4 — 3D solid primitives (world-space, Z-up convention)
49// =============================================================================
50
61 float cx, float cy, float cz,
62 float width, float depth, float height);
63
74 float cx, float cy, float cz,
75 float radius, int slices, int stacks);
76
88 float cx, float cy, float cz,
89 float radius, float height,
90 int slices, int caps);
91
103 float cx, float cy, float cz,
104 float radius, float height,
105 int slices, int cap);
106
118 float cx, float cy, float cz,
119 float major_r, float minor_r,
120 int rings, int sides);
121
122// =============================================================================
123// Phase 5 — 3D surfaces
124// =============================================================================
125
136 float ox, float oy, float oz,
137 float cell_w, float cell_h,
138 int rows, int cols,
139 const float *heights);
140
151 float cx, float cy, float cz,
152 int formula,
153 float param1, float param2,
154 int u_steps, int v_steps);
155
156// =============================================================================
157// Phase 6 — 2D→3D extrusion
158// =============================================================================
159
175 const float *xs, const float *ys, int n_pts,
176 float dir_x, float dir_y, float dir_z,
177 int cap_start, int cap_end);
178
179#ifdef __cplusplus
180} // extern "C"
181#endif
#define BGI_CALL
Definition bgi_types.h:20
#define BGI_API
Definition bgi_types.h:14
Public C API for the Drawing Description Data Structure (DDS).
BGI_API void BGI_CALL wxbgi_extrude_polygon(const float *xs, const float *ys, int n_pts, float dir_x, float dir_y, float dir_z, int cap_start, int cap_end)
Extrude a 2-D polygon profile along a direction vector.
BGI_API void BGI_CALL wxbgi_solid_cylinder(float cx, float cy, float cz, float radius, float height, int slices, int caps)
Draw a Z-aligned cylinder centred at (cx, cy, cz).
BGI_API void BGI_CALL wxbgi_solid_cone(float cx, float cy, float cz, float radius, float height, int slices, int cap)
Draw a Z-aligned cone.
BGI_API void BGI_CALL wxbgi_surface_heightmap(float ox, float oy, float oz, float cell_w, float cell_h, int rows, int cols, const float *heights)
Draw a height-map surface.
BGI_API void BGI_CALL wxbgi_solid_sphere(float cx, float cy, float cz, float radius, int slices, int stacks)
Draw a UV sphere centred at (cx, cy, cz).
BGI_API void BGI_CALL wxbgi_solid_torus(float cx, float cy, float cz, float major_r, float minor_r, int rings, int sides)
Draw a torus (donut) centred at (cx, cy, cz) in the XY plane.
BGI_API void BGI_CALL wxbgi_solid_set_edge_color(int color)
Set the edge colour (BGI palette index) for subsequently created solids.
BGI_API void BGI_CALL wxbgi_solid_box(float cx, float cy, float cz, float width, float depth, float height)
Draw an axis-aligned box centred at (cx, cy, cz).
BGI_API void BGI_CALL wxbgi_solid_set_face_color(int color)
Set the face fill colour (BGI palette index) for subsequently created solids.
BGI_API void BGI_CALL wxbgi_solid_set_draw_mode(int mode)
Set the draw mode for subsequently created solids.
BGI_API int BGI_CALL wxbgi_solid_get_draw_mode(void)
Returns the current solid draw mode (WXBGI_SOLID_WIREFRAME or WXBGI_SOLID_SOLID).
BGI_API void BGI_CALL wxbgi_surface_parametric(float cx, float cy, float cz, int formula, float param1, float param2, int u_steps, int v_steps)
Draw a parametric surface.
BGI_API void BGI_CALL wxbgi_dds_set_solid_draw_mode(int mode)
Change the draw mode on ALL solid objects currently in the DDS scene.