Vector


class description - source file - inheritance tree

class Vector


    public:
Vector Vector(double x = 0, double y = 0, double z = 0) Vector Cross(const Vector& v) const Vector operator+(const Vector& v) Vector operator-(const Vector& v) Vector operator=(const Vector& v) Vector Vector(Vector&) void ~Vector() TClass* Class() double Dot(const Vector& v) const double GetX() const double GetY() const double GetZ() const virtual TClass* IsA() const double Length() const void SetX(double x) void SetY(double y) void SetZ(double z) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

private:
double fX double fY double fZ

Class Description

 Class Vector

 Representation of 3D vectors in mini-geant. One can get the three
 componets of the vector, Length (or magnitude), Dot, Cross, and
 scalar products are defined, as well as addition and subtraction.

 This class is used in all the other objects, and is quite
 important!

 Developed as a part of the HEHI C++ programming course.


Vector(double x, double y, double z)
 Vector contructor. Sets the three coordinates

Length(void) const
 Return Length of Vector

Cross(const Vector& v) const
 Cross product between this Vector ansd its argument Vector.

Dot(const Vector& v) const
 Dot (scalar)  product between this Vector ansd its argument
 Vector.



Inline Functions


               void SetX(double x)
               void SetY(double y)
               void SetZ(double z)
             double GetX() const
             double GetY() const
             double GetZ() const
             Vector operator+(const Vector& v)
             Vector operator-(const Vector& v)
             Vector operator=(const Vector& v)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
             Vector Vector(Vector&)
               void ~Vector()


Author: cholm $
Last update: 1999/11/25 15:58:49 $


ROOT page - Home page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.