--- trunk/OOPSE-2.0/src/types/ShapeType.hpp 2004/10/18 15:21:00 1589 +++ trunk/OOPSE-2.0/src/types/ShapeType.hpp 2004/10/18 16:29:53 1590 @@ -14,69 +14,69 @@ using namespace std; #include "math/Matrix3x3d.hpp" namespace oopse { -using namespace std; - -class ShapeType { - -public: - - ShapeType(void); - ~ShapeType(void); - - char *getName(void) {return shapeName;} - void setName(char * name) {shapeName = strdup(name);} - - double getMass(void) {return mass;} - void setMass(double m) {mass = m;} - - Matrix3x3d getI(void) {return I;} - void setI(SquareMatrix3 theI) {I = theI} - - vector getContactFuncs(void) {return contactFuncs;} - vector getRangeFuncs(void) {return rangeFuncs;} - vector getStrengthFuncs(void) {return strengthFuncs;} - - void setContactFuncs(vector cf) { - contactFuncs = cf; - } - void setRangeFuncs(vector rf) { - rangeFuncs = rf; - } - void setStrengthFuncs(vector sf) { - strengthFuncs = sf; - } - - /** - * Gets the value of the contact function at a particular orientation - * @param costheta - * @param phi - */ - double getContactValueAt(double costheta, double phi); - - /** - * Gets the value of the range function at a particular orientation - * @param costheta - * @param phi - */ - double getRangeValueAt(double costheta, double phi); - - /** - * Gets the value of the strength function at a particular orientation - * @param costheta - * @param phi - */ - double getStrengthValueAt(double costheta, double phi); - -private: - - char *shapeName; // The name of the shape - double mass; // The mass - Matrix3x3d I; // The moment of inertia tensor - vector contactFuncs; // The contact functions - vector rangeFuncs; // The range functions - vector strengthFuncs; // The strength functions + using namespace std; -}; - + class ShapeType { + + public: + + ShapeType(void); + ~ShapeType(void); + + char *getName(void) {return shapeName;} + void setName(char * name) {shapeName = strdup(name);} + + double getMass(void) {return mass;} + void setMass(double m) {mass = m;} + + Matrix3x3d* getI(void) {return I;} + void setI(Matrix3x3d* theI) {I = theI;} + + vector getContactFuncs(void) {return contactFuncs;} + vector getRangeFuncs(void) {return rangeFuncs;} + vector getStrengthFuncs(void) {return strengthFuncs;} + + void setContactFuncs(vector cf) { + contactFuncs = cf; + } + void setRangeFuncs(vector rf) { + rangeFuncs = rf; + } + void setStrengthFuncs(vector sf) { + strengthFuncs = sf; + } + + /** + * Gets the value of the contact function at a particular orientation + * @param costheta + * @param phi + */ + double getContactValueAt(double costheta, double phi); + + /** + * Gets the value of the range function at a particular orientation + * @param costheta + * @param phi + */ + double getRangeValueAt(double costheta, double phi); + + /** + * Gets the value of the strength function at a particular orientation + * @param costheta + * @param phi + */ + double getStrengthValueAt(double costheta, double phi); + + private: + + char *shapeName; // The name of the shape + double mass; // The mass + Matrix3x3d* I; // The moment of inertia tensor + vector contactFuncs; // The contact functions + vector rangeFuncs; // The range functions + vector strengthFuncs; // The strength functions + + }; +} #endif