RayMarching  0.0.1
Simple 3D engine based on a ray marching rendering
Classes | Typedefs | Functions | Variables
RayMarching Namespace Reference

Namespace containing all tools implemented within RayMarching package. More...

Classes

class  Line
 Marching Ray implementation. More...
 
class  Camera
 Class representing camera object. More...
 
struct  color
 3 byte color representation structure More...
 
class  SDFObject
 Virtual class describing abstract shapes. More...
 
class  SDFCombination
 SDFObject combining two elements. More...
 
class  Shape
 Abstract Shape description. More...
 
class  Sphere
 Sphere Shape. More...
 
class  Cube
 Cube Shape. More...
 
class  Cylinder
 Cylinder Shape. More...
 
class  TransformataObject
 Class representing SDFObject transformation in space. More...
 
class  Scene
 Scene containing all objects. More...
 
class  ControlNum
 Atomic unsigned int with condition variable waiter. More...
 
struct  Settings
 Container for const Camera Settings. More...
 
class  SyncQueue
 Basic synchronized Queue template. More...
 

Typedefs

using pixel = unsigned char
 
typedef struct RayMarching::color color_t
 3 byte color representation structure
 
using json = nlohmann::json
 
using shapeDist = std::pair< double, SDFObject * >
 
typedef struct RayMarching::Settings Settings_t
 Container for const Camera Settings. More...
 

Functions

unsigned int posToBuf (const unsigned int &x, const unsigned int &y, Settings_t set)
 
Vector3d getPerpendicular (Vector3d vec, const Vector3d &onLine, const Vector3d &direction)
 

Variables

constexpr double HALF_CIRCLE = M_PI / 180
 
constexpr color_t WHITE = {0xff, 0xff, 0xff}
 
constexpr color_t GRAY = {0xbf, 0xbf, 0xbf}
 
constexpr color_t BLACK = {0x00, 0x00, 0x00}
 
constexpr color_t RED = {0xff, 0x00, 0x00}
 
constexpr color_t GREEN = {0x00, 0xff, 0x00}
 
constexpr color_t BLUE = {0x00, 0x00, 0xff}
 
constexpr unsigned int WIDTH = 1280
 
constexpr unsigned int HEIGHT = 720
 
constexpr double VIEW_ANGLE = 80
 
constexpr double EPSILON = 0.001
 
constexpr double MAX_DISTANCE = 5
 
constexpr unsigned int MAX_STEPS = 64
 
constexpr unsigned int MAX_REFLECTIONS = 5
 

Detailed Description

Namespace containing all tools implemented within RayMarching package.

Typedef Documentation

◆ Settings_t

Container for const Camera Settings.

Structure used for defining Camera settings in one place. Create default settings and then customize for your needs

Variable Documentation

◆ BLACK

constexpr color_t RayMarching::BLACK = {0x00, 0x00, 0x00}
constexpr

Black color macro

◆ BLUE

constexpr color_t RayMarching::BLUE = {0x00, 0x00, 0xff}
constexpr

Blue color macro

◆ GRAY

constexpr color_t RayMarching::GRAY = {0xbf, 0xbf, 0xbf}
constexpr

Gray color macro

◆ GREEN

constexpr color_t RayMarching::GREEN = {0x00, 0xff, 0x00}
constexpr

Green color macro

◆ RED

constexpr color_t RayMarching::RED = {0xff, 0x00, 0x00}
constexpr

Red color macro

◆ WHITE

constexpr color_t RayMarching::WHITE = {0xff, 0xff, 0xff}
constexpr

White color macro