C CASTLE / MODULE NOTES
CASTLE/Modules/Math

MODULE 11 / 15

Geometry

An aggregate include for Castle geometry building blocks in the castle::math namespace.

#include "castle/math/geometry/geometry.hpp"

Overview

Aggregate include for all Castle geometry building blocks. Use it when you want the full geometry surface from the castle::math namespace without spelling every individual header.

Dependencies

  • algorithms
  • circle2d
  • circle3d
  • intersections
  • line2d
  • line3d
  • plane3d
  • point2d
  • point3d
  • polygon2d
  • vector2d
  • vector3d

Public API

This header has no direct declarations. It re-exports all geometry primitives, algorithms, and intersection helpers listed above.

Usage example

See samples/sample_geometry_all.cpp.

#include "castle/math/geometry/geometry.hpp"

castle::math::circle2d<float> c(castle::math::point2d<float>(0.0f, 0.0f), 5.0f);
auto hits = castle::math::intersect_line_circle(
    castle::math::line2d<float>(castle::math::point2d<float>(-6.0f, 0.0f), castle::math::vector2d<float>(1.0f, 0.0f)),
    c);

Constraints & notes

  • Header-only aggregate.
  • Prefer individual headers when dependency size matters.
  • All included components remain deterministic and allocation-free.