ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/types/ShapeType.hpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/types/ShapeType.hpp (file contents):
Revision 1589 by gezelter, Mon Oct 18 15:21:00 2004 UTC vs.
Revision 1590 by gezelter, Mon Oct 18 16:29:53 2004 UTC

# Line 14 | Line 14 | using namespace std;
14   #include "math/Matrix3x3d.hpp"
15  
16   namespace oopse {
17 < using namespace std;
18 <
19 < class ShapeType {
20 <
21 < public:
22 <
23 <  ShapeType(void);
24 <  ~ShapeType(void);  
25 <
26 <  char *getName(void) {return shapeName;}
27 <  void setName(char * name) {shapeName = strdup(name);}
28 <
29 <  double getMass(void) {return mass;}
30 <  void setMass(double m) {mass = m;}
31 <
32 <  Matrix3x3d getI(void) {return I;}
33 <  void setI(SquareMatrix3 theI) {I = theI}
34 <
35 <  vector<RealSphericalHarmonic*> getContactFuncs(void) {return contactFuncs;}
36 <  vector<RealSphericalHarmonic*> getRangeFuncs(void) {return rangeFuncs;}
37 <  vector<RealSphericalHarmonic*> getStrengthFuncs(void) {return strengthFuncs;}
38 <
39 <  void setContactFuncs(vector<RealSphericalHarmonic*> cf) {
40 <    contactFuncs = cf;
41 <  }
42 <  void setRangeFuncs(vector<RealSphericalHarmonic*> rf) {
43 <    rangeFuncs = rf;
44 <  }
45 <  void setStrengthFuncs(vector<RealSphericalHarmonic*> sf) {
46 <    strengthFuncs = sf;
47 <  }
48 <
49 <  /**
50 <   * Gets the value of the contact function at a particular orientation
51 <   * @param costheta
52 <   * @param phi
53 <   */
54 <  double getContactValueAt(double costheta, double phi);
55 <
56 <  /**
57 <   * Gets the value of the range function at a particular orientation
58 <   * @param costheta
59 <   * @param phi
60 <   */
61 <  double getRangeValueAt(double costheta, double phi);
62 <
63 <  /**
64 <   * Gets the value of the strength function at a particular orientation
65 <   * @param costheta
66 <   * @param phi
67 <   */
68 <  double getStrengthValueAt(double costheta, double phi);
69 <
70 < private:
71 <
72 <  char *shapeName;             // The name of the shape
73 <  double mass;                 // The mass
74 <  Matrix3x3d I;                // The moment of inertia tensor
75 <  vector<RealSphericalHarmonic*> contactFuncs;  // The contact functions
76 <  vector<RealSphericalHarmonic*> rangeFuncs;    // The range functions
77 <  vector<RealSphericalHarmonic*> strengthFuncs; // The strength functions
17 >  using namespace std;
18    
19 < };
20 <
19 >  class ShapeType {
20 >    
21 >  public:
22 >    
23 >    ShapeType(void);
24 >    ~ShapeType(void);  
25 >    
26 >    char *getName(void) {return shapeName;}
27 >    void setName(char * name) {shapeName = strdup(name);}
28 >    
29 >    double getMass(void) {return mass;}
30 >    void setMass(double m) {mass = m;}
31 >    
32 >    Matrix3x3d* getI(void) {return I;}
33 >    void setI(Matrix3x3d* theI) {I = theI;}
34 >    
35 >    vector<RealSphericalHarmonic*> getContactFuncs(void) {return contactFuncs;}
36 >    vector<RealSphericalHarmonic*> getRangeFuncs(void) {return rangeFuncs;}
37 >    vector<RealSphericalHarmonic*> getStrengthFuncs(void) {return strengthFuncs;}
38 >    
39 >    void setContactFuncs(vector<RealSphericalHarmonic*> cf) {
40 >      contactFuncs = cf;
41 >    }
42 >    void setRangeFuncs(vector<RealSphericalHarmonic*> rf) {
43 >      rangeFuncs = rf;
44 >    }
45 >    void setStrengthFuncs(vector<RealSphericalHarmonic*> sf) {
46 >      strengthFuncs = sf;
47 >    }
48 >    
49 >    /**
50 >     * Gets the value of the contact function at a particular orientation
51 >     * @param costheta
52 >     * @param phi
53 >     */
54 >    double getContactValueAt(double costheta, double phi);
55 >    
56 >    /**
57 >     * Gets the value of the range function at a particular orientation
58 >     * @param costheta
59 >     * @param phi
60 >     */
61 >    double getRangeValueAt(double costheta, double phi);
62 >    
63 >    /**
64 >     * Gets the value of the strength function at a particular orientation
65 >     * @param costheta
66 >     * @param phi
67 >     */
68 >    double getStrengthValueAt(double costheta, double phi);
69 >    
70 >  private:
71 >    
72 >    char *shapeName;             // The name of the shape
73 >    double mass;                 // The mass
74 >    Matrix3x3d* I;                // The moment of inertia tensor
75 >    vector<RealSphericalHarmonic*> contactFuncs;  // The contact functions
76 >    vector<RealSphericalHarmonic*> rangeFuncs;    // The range functions
77 >    vector<RealSphericalHarmonic*> strengthFuncs; // The strength functions
78 >    
79 >  };
80 > }
81   #endif
82  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines