Version 4.2.0

This commit is contained in:
Gary Scavone
2009-03-24 23:02:14 -04:00
committed by Stephen Sinclair
parent cf06b7598b
commit a6381b9d38
281 changed files with 17152 additions and 12000 deletions

View File

@@ -4,50 +4,53 @@
This class implements a three-dimensional vector.
by Perry R. Cook, 1995 - 2002.
by Perry R. Cook, 1995 - 2004.
*/
/***************************************************/
#if !defined(__VECTOR3D_H)
#define __VECTOR3D_H
#ifndef STK_VECTOR3D_H
#define STK_VECTOR3D_H
class Vector3D {
#include "Stk.h"
class Vector3D : public Stk
{
public:
//! Default constructor taking optional initial X, Y, and Z values.
Vector3D(double initX=0.0, double initY=0.0, double initZ=0.0);
Vector3D(StkFloat initX=0.0, StkFloat initY=0.0, StkFloat initZ=0.0);
//! Class destructor.
~Vector3D();
//! Get the current X value.
double getX();
StkFloat getX();
//! Get the current Y value.
double getY();
StkFloat getY();
//! Get the current Z value.
double getZ();
StkFloat getZ();
//! Calculate the vector length.
double getLength();
StkFloat getLength();
//! Set the X, Y, and Z values simultaniously.
void setXYZ(double anX, double aY, double aZ);
void setXYZ(StkFloat x, StkFloat y, StkFloat z);
//! Set the X value.
void setX(double aval);
void setX(StkFloat x);
//! Set the Y value.
void setY(double aval);
void setY(StkFloat y);
//! Set the Z value.
void setZ(double aval);
void setZ(StkFloat z);
protected:
double myX;
double myY;
double myZ;
StkFloat myX_;
StkFloat myY_;
StkFloat myZ_;
};
#endif