Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

RigidBodyPoint.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_RIGIDBODYPOINT_H 00012 #define OPENCAL_RIGIDBODYPOINT_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/PhysicalObject.h> 00017 #include <OpenCAL/Vector3.h> 00018 using OpenCAL::Utils::Vector3; 00019 00020 namespace OpenCAL 00021 { 00022 // Forward declarations 00023 class RigidBody; 00024 00030 class OPENCAL_API RigidBodyPoint: public PhysicalObject 00031 { 00032 protected: 00033 // Member variables 00034 RigidBody *m_object; 00035 Vector3 m_bodyPosition; 00036 00037 public: 00038 // Constructors and destructor 00039 RigidBodyPoint(RigidBody *object, const Vector3 &bodyPosition); 00040 virtual ~RigidBodyPoint(); 00041 00042 // Get functions 00043 const Vector3 &getPosition() const { calcPosition(); return m_position; } 00044 Vector3 *getPositionP() { calcPosition(); return &m_position; } 00045 const Vector3 &getVelocity() const { calcVelocity(); return m_velocity; } 00046 Vector3 *getVelocityP() { calcVelocity(); return &m_velocity; } 00047 00048 // Force functions 00049 void addForce(const Vector3 &force); 00050 00052 00053 // Other functions 00054 void render(); 00055 00056 // State functions 00057 void addToState(PhaseSpace *state) {} 00058 void addToDerivative(PhaseSpace *deriv) {} 00059 void fromState(PhaseSpace *state) {} 00060 00061 protected: 00062 // Protected functions 00063 void calcPosition() const; 00064 void calcVelocity() const; 00065 }; 00066 } 00067 00068 #endif // OPENCAL_RIGIDBODYPOINT_H

Generated on Sun Aug 15 19:19:23 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8