Vector3D - #ifndef _VECTOR_3D_ # #define _VECTOR_3D_ / /...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef __VECTOR_3D__ #define __VECTOR_3D__ # // This file contains the defintion of the class Vector3D / #include "Matrix.h" # class Normal; class Point3D; c //----------------------------------------- class Vector3D / class Vector3D { public: p double x, y, z; x public: p Vector3D(void); // default constructor Vector3D(double a); // constructor Vector3D(double _x, double _y, double _z); // constructor Vector3D(const Vector3D& v); // copy constructor Vector3D(const Normal& n); // constructs a vector from a Normal Vector3D(const Point3D& p); // constructs a vector from a point / ~Vector3D (void); // destructor / Vector3D& // assignment operator operator= (const Vector3D& rhs); o Vector3D& // assign a Normal to a vector operator= (const Normal& rhs); o Vector3D& // assign a Point3D to a vector operator= (const Point3D& rhs); o Vector3D // unary minus operator- (void) const; o double // length length(void); l double // square of the length len_squared(void); l
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Vector3D // multiplication by a double on the right operator* (const double a) const; o Vector3D
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Vector3D - #ifndef _VECTOR_3D_ # #define _VECTOR_3D_ / /...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online