Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Namespace Members   Compound Members   File Members   Related Pages  

/msg/src/geom/vector3d.h

This is the verbatim text of the vector3d.h include file.
/* -*- C -*-
 * vector3d.h
 * $Id: vector3d.h,v 1.1.1.1 2000/07/20 20:54:13 ghali Exp $
 */

#ifndef VECTOR3D_H
#define VECTOR3D_H

#include <stdlib.h>
#include <iostream.h>
#include <math.h>

namespace MSG {

  class Point3d;
  class Segment3d;

  class Vector3d {
  protected:
    double x, y, z;
  public:
    Vector3d();
    Vector3d(double xx, double yy, double zz);
    virtual double X() const;
    virtual double Y() const;
    virtual double Z() const;
    virtual void setX(double a);
    virtual void setY(double a);
    virtual void setZ(double a);

    Vector3d(const Point3d& p);
    Vector3d(const Point3d& from, const Point3d& to);

    // only in Direction3d
    // Vector3d getAPerpDir() const; // calc a sideDir given this viewDir 

    char getDominant() const;

    double length() const;

    double dot_product( Vector3d a ) const;

    Vector3d operator+(Vector3d a);

    Vector3d operator*(Vector3d a) const;

    Vector3d operator*(double d);

    friend ostream& operator<<( ostream& out, const Vector3d& p);

    friend istream& operator>>( istream& in, Vector3d& p );

    virtual void print() const;
  };
}

#endif

Generated at Sat Jul 22 00:32:17 2000 for MSG by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999