#ifndef RTSPOINT3D_H #define RTSPOINT3D_H #include "rtsVector3d.h" ///This class is used to store information about a 3D point. It is designed to work with the class vector3D for linear algebra operations. template class point3D { //friend class vector3D; public: //data values T x; T y; T z; point3D(); /// param); /// param); /// operator+(vector3D param); /// operator-(vector3D param); /// operator-(point3D param); /// operator point3D(); /// &rhs) { os<<"("< & operator=(const point3D & rhs) { if(this != &rhs) { x = rhs.x; y = rhs.y; z = rhs.z; } return *this; }*/ void print(); }; template template point3D::operator point3D() { point3D cast_result(x, y, z); return cast_result; } template point3D::point3D() { x=0; y=0; z=0; } template point3D::point3D(T new_x, T new_y, T new_z) { x=new_x; y=new_y; z=new_z; } template point3D point3D::operator -(vector3D param) { point3D result; //create the result result.x = x-param.x; //perform the computation result.y = y-param.y; result.z = z-param.z; return result; } template vector3D point3D::operator -(point3D param) { vector3D result; result.x = x - param.x; result.y = y - param.y; result.z = z - param.z; return result; } template point3D point3D::operator+(vector3D param) { point3D result; //create the result result.x = x+param.x; //perform the computation result.y = y+param.y; result.z = z+param.z; return result; } template bool point3D::operator ==(point3D param) { if(x == param.x && y == param.y && z == param.z) return true; else return false; } template bool point3D::operator !=(point3D param) { if(x != param.x || y != param.y || z != param.z) return true; else return false; } template void point3D::print() { cout<<"("< ostream& point3D::operator<<(ostream& os, point3D &rhs) { os<<"("<