36#define WXBGI_CAM_ORTHO 0
38#define WXBGI_CAM_PERSPECTIVE 1
92 float x,
float y,
float z);
99 float x,
float y,
float z);
106 float x,
float y,
float z);
110 float *x,
float *y,
float *z);
114 float *x,
float *y,
float *z);
118 float *x,
float *y,
float *z);
149 float left,
float right,
150 float bottom,
float top,
151 float nearPlane,
float farPlane);
166 float worldUnitsHigh,
228 float wx,
float wy,
float wz,
229 float *screenX,
float *screenY);
243 float screenX,
float screenY,
244 float *rayOx,
float *rayOy,
float *rayOz,
245 float *rayDx,
float *rayDy,
float *rayDz);
310 float pivotX,
float pivotY);
340 float worldUnitsHigh);
400 float ox,
float oy,
float oz);
404 float *ox,
float *oy,
float *oz);
420 float xx,
float xy,
float xz,
421 float yx,
float yy,
float yz,
422 float zx,
float zy,
float zz);
430 float *xx,
float *xy,
float *xz,
431 float *yx,
float *yy,
float *yz,
432 float *zx,
float *zy,
float *zz);
446 float nx,
float ny,
float nz,
447 float ox,
float oy,
float oz);
471 float wx,
float wy,
float wz,
472 float *lx,
float *ly,
float *lz);
482 float lx,
float ly,
float lz,
483 float *wx,
float *wy,
float *wz);
507 float maxX,
float maxY,
float maxZ);
516 float *maxX,
float *maxY,
float *maxZ);
566 float ux,
float uy,
float uz,
567 float *screenX,
float *screenY);
577 float x2,
float y2,
float z2);
587 int startAngle,
int endAngle);
591 float x2,
float y2,
float z2);
608 float ux,
float uy,
float uz,
int color);
612 float ux1,
float uy1,
float uz1,
613 float ux2,
float uy2,
float uz2);
617 float cx,
float cy,
float cz,
float radius);
622 const float *xyzTriplets,
int pointCount);
626 float ux,
float uy,
float uz,
#define BGI_CALL
Definition bgi_types.h:20
#define BGI_API
Definition bgi_types.h:14
BGI_API void BGI_CALL wxbgi_cam2d_set_zoom(const char *name, float zoom)
Sets the zoom level (1 = nominal, 2 = 2× magnification).
BGI_API void BGI_CALL wxbgi_cam2d_set_pan(const char *name, float x, float y)
Sets the 2-D camera pan (world-space centre of the view).
BGI_API void BGI_CALL wxbgi_cam2d_set_world_height(const char *name, float worldUnitsHigh)
Sets the number of world-units visible vertically at zoom = 1.
BGI_API void BGI_CALL wxbgi_cam2d_get_zoom(const char *name, float *zoom)
Retrieves the current zoom level.
BGI_API void BGI_CALL wxbgi_cam2d_get_rotation(const char *name, float *angleDeg)
Retrieves the current rotation in degrees.
BGI_API int BGI_CALL wxbgi_cam2d_create(const char *name)
Creates a 2-D overhead camera.
BGI_API void BGI_CALL wxbgi_cam2d_zoom_at(const char *name, float factor, float pivotX, float pivotY)
Zooms around a pivot point in world space.
BGI_API void BGI_CALL wxbgi_cam2d_pan_by(const char *name, float dx, float dy)
Pans the 2-D camera by a world-space delta.
BGI_API void BGI_CALL wxbgi_cam2d_set_rotation(const char *name, float angleDeg)
Sets the 2-D view rotation around the Z axis.
BGI_API void BGI_CALL wxbgi_cam2d_get_pan(const char *name, float *x, float *y)
Retrieves the current pan position.
BGI_API void BGI_CALL wxbgi_cam_set_active(const char *name)
Sets the active camera used by wxbgi_cam_world_to_screen and related helpers when NULL is passed as t...
BGI_API int BGI_CALL wxbgi_cam_world_to_screen(const char *name, float wx, float wy, float wz, float *screenX, float *screenY)
Projects a world-space point to a screen pixel coordinate.
BGI_API void BGI_CALL wxbgi_cam_get_eye(const char *name, float *x, float *y, float *z)
Retrieves the current eye position.
BGI_API void BGI_CALL wxbgi_cam_set_perspective(const char *name, float fovYDeg, float nearPlane, float farPlane)
Switches a camera to perspective projection.
BGI_API void BGI_CALL wxbgi_cam_get_proj_matrix(const char *name, float *out16)
Writes the projection matrix into out16 (column-major float[16]).
BGI_API void BGI_CALL wxbgi_cam_destroy(const char *name)
Removes a named camera from the registry.
BGI_API void BGI_CALL wxbgi_cam_set_target(const char *name, float x, float y, float z)
Sets the look-at target in world space.
BGI_API int BGI_CALL wxbgi_cam_create(const char *name, int type)
Creates a named camera and adds it to the registry.
BGI_API void BGI_CALL wxbgi_cam_get_vp_matrix(const char *name, float *out16)
Writes the combined view-projection matrix into out16.
BGI_API void BGI_CALL wxbgi_cam_set_screen_viewport(const char *name, int x, int y, int w, int h)
Restricts the camera's output to a sub-rectangle of the window.
BGI_API const char *BGI_CALL wxbgi_cam_get_active(void)
Returns the name of the currently active camera.
BGI_API void BGI_CALL wxbgi_cam_get_up(const char *name, float *x, float *y, float *z)
Retrieves the current up vector.
BGI_API void BGI_CALL wxbgi_cam_set_up(const char *name, float x, float y, float z)
Sets the up vector.
BGI_API void BGI_CALL wxbgi_cam_screen_to_ray(const char *name, float screenX, float screenY, float *rayOx, float *rayOy, float *rayOz, float *rayDx, float *rayDy, float *rayDz)
Unprojects a screen pixel to a world-space ray.
BGI_API void BGI_CALL wxbgi_cam_set_eye(const char *name, float x, float y, float z)
Sets the eye (camera position) in world space.
BGI_API void BGI_CALL wxbgi_cam_set_ortho(const char *name, float left, float right, float bottom, float top, float nearPlane, float farPlane)
Sets explicit orthographic clip extents.
BGI_API void BGI_CALL wxbgi_cam_set_ortho_auto(const char *name, float worldUnitsHigh, float nearPlane, float farPlane)
Sets orthographic projection with automatic aspect-correct extents.
BGI_API void BGI_CALL wxbgi_cam_get_target(const char *name, float *x, float *y, float *z)
Retrieves the current look-at target.
BGI_API void BGI_CALL wxbgi_cam_get_view_matrix(const char *name, float *out16)
Writes the view matrix into out16 (column-major float[16]).
BGI_API void BGI_CALL wxbgi_ucs_set_axes(const char *name, float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz)
Sets all three axes of a UCS.
BGI_API void BGI_CALL wxbgi_ucs_get_world_to_local_matrix(const char *name, float *out16)
Writes the world-to-local matrix into out16 (column-major float[16]).
BGI_API void BGI_CALL wxbgi_ucs_set_active(const char *name)
Sets the active UCS used when NULL is passed as the UCS name.
BGI_API int BGI_CALL wxbgi_ucs_create(const char *name)
Creates a named UCS initialised to the world identity frame.
BGI_API void BGI_CALL wxbgi_ucs_get_origin(const char *name, float *ox, float *oy, float *oz)
Retrieves the current UCS origin.
BGI_API void BGI_CALL wxbgi_ucs_local_to_world(const char *name, float lx, float ly, float lz, float *wx, float *wy, float *wz)
Transforms a UCS local point into world-space coordinates.
BGI_API void BGI_CALL wxbgi_ucs_destroy(const char *name)
Removes a named UCS from the registry.
BGI_API void BGI_CALL wxbgi_ucs_get_local_to_world_matrix(const char *name, float *out16)
Writes the local-to-world matrix into out16 (column-major float[16]).
BGI_API void BGI_CALL wxbgi_ucs_world_to_local(const char *name, float wx, float wy, float wz, float *lx, float *ly, float *lz)
Transforms a world-space point into UCS local coordinates.
BGI_API void BGI_CALL wxbgi_ucs_get_axes(const char *name, float *xx, float *xy, float *xz, float *yx, float *yy, float *yz, float *zx, float *zy, float *zz)
Retrieves all three axes of a UCS as world-space unit vectors.
BGI_API void BGI_CALL wxbgi_ucs_set_origin(const char *name, float ox, float oy, float oz)
Sets the origin of a UCS in world space.
BGI_API void BGI_CALL wxbgi_ucs_align_to_plane(const char *name, float nx, float ny, float nz, float ox, float oy, float oz)
Aligns a UCS so that its local Z axis matches a given surface normal.
BGI_API const char *BGI_CALL wxbgi_ucs_get_active(void)
Returns the name of the currently active UCS.
BGI_API void BGI_CALL wxbgi_world_fillpoly(const float *xyzTriplets, int pointCount)
Draws and fills a closed polygon through world-space points.
BGI_API void BGI_CALL wxbgi_world_ellipse(float cx, float cy, float cz, float rx, float ry, int startAngle, int endAngle)
Draws an ellipse arc (world-space centre, world-unit semi-axes rx/ry).
BGI_API void BGI_CALL wxbgi_set_world_extents(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
Sets the world extents to an explicit AABB.
BGI_API void BGI_CALL wxbgi_world_polyline(const float *xyzTriplets, int pointCount)
Draws an open polyline through world-space points.
BGI_API void BGI_CALL wxbgi_ucs_polyline(const char *ucsName, const float *xyzTriplets, int pointCount)
Draws an open polyline through UCS-local points.
BGI_API void BGI_CALL wxbgi_expand_world_extents(float x, float y, float z)
Expands the world extents to include the point (x, y, z).
BGI_API int BGI_CALL wxbgi_get_world_extents(float *minX, float *minY, float *minZ, float *maxX, float *maxY, float *maxZ)
Retrieves the current world extents.
BGI_API int BGI_CALL wxbgi_cam_fit_to_extents(const char *camName)
Adjusts a camera's projection and position to frame the world extents.
BGI_API void BGI_CALL wxbgi_world_line(float x1, float y1, float z1, float x2, float y2, float z2)
Draws a line segment between two world-space points using the current colour/style.
BGI_API void BGI_CALL wxbgi_ucs_circle(const char *ucsName, float cx, float cy, float cz, float radius)
Draws a circle at a UCS-local centre with a UCS-unit radius.
BGI_API void BGI_CALL wxbgi_ucs_point(const char *ucsName, float ux, float uy, float uz, int color)
Draws a pixel at a UCS-local position.
BGI_API void BGI_CALL wxbgi_world_outtextxy(float x, float y, float z, const char *text)
Draws text at a world-space position using current BGI font/colour settings.
BGI_API void BGI_CALL wxbgi_world_point(float x, float y, float z, int color)
Draws a single pixel at a world-space position.
BGI_API void BGI_CALL wxbgi_world_circle(float cx, float cy, float cz, float radius)
Draws a circle (world-space centre, world-unit radius) via the active camera.
BGI_API void BGI_CALL wxbgi_world_rectangle(float x1, float y1, float z1, float x2, float y2, float z2)
Draws a screen-space rectangle outline from two projected world-space corners.
BGI_API int BGI_CALL wxbgi_ucs_to_screen(const char *ucsName, const char *camName, float ux, float uy, float uz, float *screenX, float *screenY)
Projects a UCS-local point through the named UCS and camera to screen-pixel coordinates.
BGI_API void BGI_CALL wxbgi_ucs_outtextxy(const char *ucsName, float ux, float uy, float uz, const char *text)
Draws text at a UCS-local anchor.
BGI_API void BGI_CALL wxbgi_ucs_line(const char *ucsName, float ux1, float uy1, float uz1, float ux2, float uy2, float uz2)
Draws a line between two UCS-local points.
BGI_API void BGI_CALL wxbgi_reset_world_extents(void)
Resets the world extents to the "empty / no data" state.