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

BalloonMesh.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_BALLOONMESH_H 00012 #define OPENCAL_BALLOONMESH_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/MassSpringSystem.h> 00017 00018 #include <OpenCAL/Vector3.h> 00019 using OpenCAL::Utils::Vector3; 00020 00021 #include <map> 00022 using std::map; 00023 00024 namespace OpenCAL 00025 { 00026 // Forward declarations 00027 class Vertex; 00028 class PointMass; 00029 class Triangle; 00030 00034 class OPENCAL_API BalloonMesh: public MassSpringSystem 00035 { 00036 protected: 00037 // Typedefs 00038 typedef map<Vertex *, PointMass *> ConnectionMap; 00039 typedef map<Vertex *, Vertex *> SpringMap; 00040 00041 // Member variables 00042 string m_filename; 00043 ConnectionMap m_connections; 00044 SpringMap m_springConnections; 00045 00046 public: 00047 // Constructors and destructor 00048 BalloonMesh(System *parent, const string &filename, const Vector3 &position = Vector3::zero); 00049 virtual ~BalloonMesh(); 00050 00051 // Get functions 00052 PointMass *getPointFromVertex(Vertex *vertex) { return m_connections[vertex]; } 00053 00054 // Set functions 00055 00056 // Other functions 00057 /* 00058 #ifdef USE_OPENGL 00059 void drawGL(); 00060 #endif // USE_OPENGL 00061 */ 00062 00063 protected: 00064 // Protected functions 00065 void constructMesh(const Vector3 &position); 00066 void addSprings(Triangle *triangle, float stiffness, float damping); 00067 bool isConnected(Vertex *v1, Vertex *v2); 00068 }; 00069 } 00070 00071 #endif // OPENCAL_BALLOONMESH_H

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