ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/constraints/ConstraintPair.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/constraints/ConstraintPair.hpp (file contents):
Revision 1901 by tim, Tue Jan 4 22:18:36 2005 UTC vs.
Revision 1907 by tim, Thu Jan 6 22:31:07 2005 UTC

# Line 27 | Line 27 | namespace oopse {
27   #define CONSTRAINTS_CONTRAINTPAIR_HPP
28  
29   #include "primitives/StuntDouble.hpp"
30 + #include "constraints/ConstraintElem.hpp"
31   namespace oopse {
32  
32 //for the time being, ConstraintElem is just StuntDouble class
33 //Laterly, ConstraintElem will be an adapter class of StuntDouble
34 typedef StuntDouble ConstraintElem;
33  
36
34   /**
35   * @class ConstraintPair
36   * @todo document
# Line 45 | Line 42 | class ConstraintPair {
42          ConstraintPair(ConstraintElem* elem1, ConstraintElem* elem2, double len)
43              : consElem1_(elem1), consElem2_(elem2), dist2(len*len) { }
44  
45 +        ~ConstraintPair() {
46 +            delete consElem1_;
47 +            delete consElem2_;
48 +        }
49          /** Return the first constraint elemet */
50          ConstraintElem* getConsElem1() {return consElem1_;}
51  
52          /** Retunr the second constraint element */
53          ConstraintElem* getConsElem2() {return consElem2_;}
54  
55 <        
55 >        bool isMoved() { return consElem1_->getMoved() || consElem2_->getMoved(); }        
56          double getConsDistSquare() {return dist2;}
57  
58      private:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines