home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Tools for 3D Cyberspace
/
VRML_Tools_For_3D_Cyberspace.iso
/
amber
/
include
/
kine.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-01
|
2KB
|
89 lines
//**********************************************************************
// DIVE Laboratories, Inc.
// Copyright(c) 1995
// All rights reserved.
//
// FILE: KINE.HPP
//
// DESCRIPTION
// This header provides the class definition for the
// kinematicClass class.
//
//**********************************************************************
#ifndef KINEMATIC
#define KINEMATIC
#include "vrtypes.hpp"
#include "vector.hpp"
#include "position.hpp"
class geometryClass;
//---------------------------------------------------------------------
// This is the class definition for the kinematicClass.
//
class kinematicClass {
// Private Data
private:
double tauFactor;
int computeTau;
geometryClass *geo;
float currentTime, previousTime;
protected:
// Public Data
public:
positionClass position, prevPosition;
vectorClass velocity, acceleration, force;
float mass, cElasticity;
// Data control
void setPos(positionClass pos);
void setPos(V3 pos);
void setVel(vectorClass vel);
void setVel(V3 vel);
void setAccel(vectorClass accel);
void setAccel(V3 accel);
void applyAccel(vectorClass accel);
void applyAccel(V3 accel);
void applyForce(vectorClass f);
void applyForce(V3 f);
// Visible geometry
void setGeo(geometryClass *g);
geometryClass *getGeo();
// Kinematics
void kinematic(void);
// Constructor Functions
kinematicClass(V3 pos, V3 vel, V3 accel);
kinematicClass(positionClass pos, vectorClass vel, vectorClass accel);
kinematicClass (int computeTauValueFromClock = 0,
double tau = 0.1);
// Destructor Function
~kinematicClass();
};
#endif