wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
bgi_dds.h File Reference

Internal CHDOP (Class Hierarchy of Drawing Object Primitives) and DdsScene container for the Drawing Description Data Structure (DDS). More...

#include "bgi_types.h"
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <glm/glm.hpp>
Include dependency graph for bgi_dds.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bgi::DdsArc
struct  bgi::DdsBar
struct  bgi::DdsBar3D
struct  bgi::DdsBox
class  bgi::DdsCamera
 Camera stored in the DDS. More...
struct  bgi::DdsCircle
struct  bgi::DdsCone
struct  bgi::DdsCylinder
struct  bgi::DdsEllipse
struct  bgi::DdsExternalAttributes
struct  bgi::DdsExtrusion
struct  bgi::DdsFillEllipse
struct  bgi::DdsFillPoly
struct  bgi::DdsHeightMap
struct  bgi::DdsImage
struct  bgi::DdsLayer
struct  bgi::DdsLine
class  bgi::DdsObject
struct  bgi::DdsParamSurface
struct  bgi::DdsPieSlice
struct  bgi::DdsPoint
struct  bgi::DdsPolygon
struct  bgi::DdsRectangle
class  bgi::DdsScene
 In-memory DDS scene graph. More...
struct  bgi::DdsSector
class  bgi::DdsSetDifference
class  bgi::DdsSetIntersection
class  bgi::DdsSetUnion
struct  bgi::DdsSolid3D
 Base for all Phase 4/5/6 solid/surface/extrusion objects. More...
struct  bgi::DdsSphere
struct  bgi::DdsStyle
 Baked rendering state captured at draw-call time. More...
struct  bgi::DdsText
struct  bgi::DdsTorus
class  bgi::DdsTransform
class  bgi::DdsUcs
 UCS stored in the DDS. More...
class  bgi::DdsWorldExtentsObj
 World-extents AABB stored in the DDS. More...

Namespaces

namespace  bgi

Enumerations

enum class  bgi::CoordSpace { bgi::BgiPixel , bgi::World3D , bgi::UcsLocal }
 Indicates the coordinate space in which a drawing object's coordinates are expressed when it was recorded. More...
enum class  bgi::DdsObjectType {
  bgi::Camera , bgi::Ucs , bgi::WorldExtentsObj , bgi::Transform ,
  bgi::SetUnion , bgi::SetIntersection , bgi::SetDifference , bgi::Point ,
  bgi::Line , bgi::Circle , bgi::Arc , bgi::Ellipse ,
  bgi::FillEllipse , bgi::PieSlice , bgi::Sector , bgi::Rectangle ,
  bgi::Bar , bgi::Bar3D , bgi::Polygon , bgi::FillPoly ,
  bgi::Text , bgi::Image , bgi::Box , bgi::Sphere ,
  bgi::Cylinder , bgi::Cone , bgi::Torus , bgi::HeightMap ,
  bgi::ParamSurface , bgi::Extrusion
}
enum class  bgi::ParamSurfaceFormula {
  bgi::Sphere = 0 , bgi::Cylinder = 1 , bgi::Torus = 2 , bgi::Saddle = 3 ,
  bgi::Mobius = 4
}
enum class  bgi::SolidDrawMode { bgi::Wireframe = 0 , bgi::Flat = 1 , bgi::Smooth = 2 , bgi::Solid = 1 }

Functions

bool bgi::appendDdsObject (std::shared_ptr< DdsObject > obj, int rb, const char *layerName)
void bgi::renderDdsPreview (const DdsObject &obj, const glm::mat4 &transform)

Detailed Description

Internal CHDOP (Class Hierarchy of Drawing Object Primitives) and DdsScene container for the Drawing Description Data Structure (DDS).

The DDS is an in-memory, retained-mode scene graph. Every draw call in the library creates a DdsObject derived class in addition to rendering immediately to the pixel buffer (hybrid retained + immediate mode).

Key design properties:

  • Sequential access: DdsScene::order vector preserves insertion order.
  • O(1) direct access: DdsScene::index unordered_map keys by auto-assigned ID.
  • World-space coordinates: ALL drawing objects store floating-point world coordinates. Classic BGI pixel integers are recorded as (x, y, Z=0) with CoordSpace::BgiPixel tag. Through the default pixel-space ortho camera they project identically; through any other camera they reproject correctly.
  • DDS is the source of truth for cameras and UCS: BgiState::cameras holds shared_ptr<DdsCamera> — the Camera3D data lives inside the DdsCamera object. Modifying a camera via wxbgi_cam_set_eye() updates the DdsCamera in-place with no sync step.

This header is internal — not part of the public API.