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
15
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 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
64
75 float cx, float cy, float cz,
76 float radius, int slices, int stacks,
77 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
78
90 float cx, float cy, float cz,
91 float radius, float height,
92 int slices, int caps,
93 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
94
106 float cx, float cy, float cz,
107 float radius, float height,
108 int slices, int cap,
109 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
110
122 float cx, float cy, float cz,
123 float major_r, float minor_r,
124 int rings, int sides,
125 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
126
127// =============================================================================
128// Phase 5 — 3D surfaces
129// =============================================================================
130
141 float ox, float oy, float oz,
142 float cell_w, float cell_h,
143 int rows, int cols,
144 const float *heights,
145 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
146
157 float cx, float cy, float cz,
158 int formula,
159 float param1, float param2,
160 int u_steps, int v_steps,
161 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
162
163// =============================================================================
164// Phase 6 — 2D→3D extrusion
165// =============================================================================
166
182 const float *xs, const float *ys, int n_pts,
183 float dir_x, float dir_y, float dir_z,
184 int cap_start, int cap_end,
185 int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr));
186
187#ifdef __cplusplus
188} // extern "C"
189#endif
#define BGI_DEFAULT_ARG(value)
Definition bgi_types.h:26
#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_solid_sphere(float cx, float cy, float cz, float radius, int slices, int stacks, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw a UV sphere centred at (cx, cy, cz).
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, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw a parametric surface.
BGI_API void BGI_CALL wxbgi_solid_cone(float cx, float cy, float cz, float radius, float height, int slices, int cap, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
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, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw a height-map surface.
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_set_face_color(int color)
Set the face fill colour (BGI palette index) for subsequently created solids.
BGI_API void BGI_CALL wxbgi_solid_torus(float cx, float cy, float cz, float major_r, float minor_r, int rings, int sides, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw a torus (donut) centred at (cx, cy, cz) in the XY plane.
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_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, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Extrude a 2-D polygon profile along a direction vector.
BGI_API void BGI_CALL wxbgi_solid_box(float cx, float cy, float cz, float width, float depth, float height, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw an axis-aligned box centred at (cx, cy, cz).
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.
BGI_API void BGI_CALL wxbgi_solid_cylinder(float cx, float cy, float cz, float radius, float height, int slices, int caps, int rb BGI_DEFAULT_ARG(0), const char *layerName BGI_DEFAULT_ARG(nullptr))
Draw a Z-aligned cylinder centred at (cx, cy, cz).