- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

springsystem.h

00001 //****************************************************************************//
00002 // springsystem.h                                                             //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_SPRINGSYSTEM_H
00012 #define CAL_SPRINGSYSTEM_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 #include "cal3d/global.h"
00019 
00020 //****************************************************************************//
00021 // Forward declarations                                                       //
00022 //****************************************************************************//
00023 
00024 class CalModel;
00025 class CalSubmesh;
00026 
00027 //****************************************************************************//
00028 // Class declaration                                                          //
00029 //****************************************************************************//
00030 
00031  /*****************************************************************************/
00035 class CAL3D_API CalSpringSystem
00036 {
00037 // member variables
00038 public:
00039   CalModel *m_pModel;
00040 
00041 // constructors/destructor
00042 public:
00043   CalSpringSystem();
00044   virtual ~CalSpringSystem();
00045 
00046 // member functions 
00047 public:
00048   void calculateForces(CalSubmesh *pSubmesh, float deltaTime);
00049   void calculateVertices(CalSubmesh *pSubmesh, float deltaTime);
00050   bool create(CalModel *pModel);
00051   void destroy();
00052   void update(float deltaTime);
00053 
00054   /* DEBUG CODE ********************
00055   struct
00056   {
00057     float x, y, z, radius;
00058   } Sphere;
00059   void setSphere(float x, float y, float z, float radius) { Sphere.x = x; Sphere.y = y; Sphere.z = z; Sphere.radius = radius; };
00060   *********************************/
00061 };
00062 
00063 #endif
00064 
00065 //****************************************************************************//

Generated at Sun Oct 12 18:38:48 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch