#if defined (_MSC_VER) && (_MSC_VER >= 1000) #pragma once #endif #ifndef _INC_SPRINGMASSDEFORMATION #define _INC_SPRINGMASSDEFORMATION #include "stdafx.h" #include "Deformation.h" namespace mial { //!This class extends the basic deformation class with specific functionality for spring mass systems. /*! All spring-mass deformations should inherit from this class. \param DataType the type of container \param nDims the dimensionality of the deformation \param MType The matrix type used \param VType The vector type used */ template , class VType = vnl_vector > class SpringMassDeformation: public Deformation { public: typedef MType MatrixType; typedef VType VectorType; //! A customized argument set. struct DefArgSet: public Deformation::DefArgSet { //! The nodes of the physics layer MatrixType * nodes; //! The velocities of the physics layer MatrixType * nodesV; //! The forces of the physics layer MatrixType * nodesF; //! The deformation forces of the physics layer MatrixType * nodesFDef; //! The spring rest lengths of the physics layer VectorType * springsRest; //! The spring node connections of the physics layer MatrixType * springsNodes; //! The spring lengths of the physics layer. VectorType * springLengths; }; }; } // end namespace mial #include "SpringMassDeformation.cxx" #endif /* _INC_DEFORMATION*/