RayMarching  0.0.1
Simple 3D engine based on a ray marching rendering
Public Member Functions | List of all members
RayMarching::Cube Class Reference

Cube Shape. More...

#include <models3.h>

Inheritance diagram for RayMarching::Cube:
RayMarching::Shape RayMarching::SDFObject

Public Member Functions

 Cube (Eigen::Vector3d p, double bound, color_t color=BLACK)
 
 ~Cube () override=default
 
double getDist (const Eigen::Vector3d &p) const override
 
double getBound () const
 
- Public Member Functions inherited from RayMarching::Shape
 Shape (color_t color=BLACK)
 
 Shape (Eigen::Vector3d p, color_t color=BLACK)
 
virtual Eigen::Vector3d getPos () const
 
color_t getColor (const Eigen::Vector3d &p) const override
 
void setColor (color_t color)
 
- Public Member Functions inherited from RayMarching::SDFObject
virtual ~SDFObject ()=default
 
Line getReflection (const Line &ray) const
 

Additional Inherited Members

- Protected Attributes inherited from RayMarching::Shape
Eigen::Vector3d _pos
 
color_t _color
 

Detailed Description

Cube Shape.

Constructor & Destructor Documentation

◆ Cube()

RayMarching::Cube::Cube ( Eigen::Vector3d  p,
double  bound,
color_t  color = BLACK 
)
inline

Creates new Cube

Parameters
pcenter of the Cube
boundside length of the Cube

◆ ~Cube()

RayMarching::Cube::~Cube ( )
overridedefault

Default destructor

Member Function Documentation

◆ getBound()

double RayMarching::Cube::getBound ( ) const
inline

Bound getter

Returns
Cube's side length

◆ getDist()

double RayMarching::Cube::getDist ( const Eigen::Vector3d &  p) const
overridevirtual

SDF function

Parameters
pRequesting point
Returns
distance to the SDFObject

Implements RayMarching::SDFObject.


The documentation for this class was generated from the following files: