RayTracer 1.0
Ray tracing is a technique used to generate realistic digital images by simulating the inverse path of light. Our goal is to create a program able to generate an image from a file describing the scene.
 
Loading...
Searching...
No Matches
Math::Point3D Class Reference

#include <Math3D.hpp>

Public Member Functions

 Point3D ()
 
 Point3D (double x_, double y_, double z_)
 
Point3D operator+ (const Vector3D &v) const
 
Point3D operator- (const Vector3D &v) const
 
Vector3D operator- (const Point3D &p) const
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Definition at line 34 of file Math3D.hpp.

Constructor & Destructor Documentation

◆ Point3D() [1/2]

Math::Point3D::Point3D ( )

Definition at line 70 of file Math3D.cpp.

70 : x(0), y(0), z(0)
71{}

References x, y, and z.

◆ Point3D() [2/2]

Math::Point3D::Point3D ( double x_,
double y_,
double z_ )

Definition at line 73 of file Math3D.cpp.

73: x(x_), y(y_), z(z_) {}

References x, y, and z.

Member Function Documentation

◆ operator+()

Math::Point3D Math::Point3D::operator+ ( const Vector3D & v) const

Definition at line 75 of file Math3D.cpp.

76{
77 return Point3D(x + v.x, y + v.y, z + v.z);
78}

References Point3D(), x, Math::Vector3D::x, y, Math::Vector3D::y, z, and Math::Vector3D::z.

◆ operator-() [1/2]

Math::Vector3D Math::Point3D::operator- ( const Point3D & p) const

Definition at line 85 of file Math3D.cpp.

86{
87 return Vector3D(x - p.x, y - p.y, z - p.z);
88}

References Point3D(), x, y, and z.

◆ operator-() [2/2]

Math::Point3D Math::Point3D::operator- ( const Vector3D & v) const

Definition at line 80 of file Math3D.cpp.

81{
82 return Point3D(x - v.x, y - v.y, z - v.z);
83}

References Point3D(), x, Math::Vector3D::x, y, Math::Vector3D::y, z, and Math::Vector3D::z.

Member Data Documentation

◆ x

double Math::Point3D::x

Definition at line 36 of file Math3D.hpp.

◆ y

double Math::Point3D::y

Definition at line 36 of file Math3D.hpp.

◆ z

double Math::Point3D::z

Definition at line 36 of file Math3D.hpp.


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