CVS commit by domi: implement LocusImp's ctor.. M +11 -0 locus_imp.cc 1.1.2.3 --- kdeedu/kig/objects/locus_imp.cc #1.1.2.2:1.1.2.3 @@ -21,4 +21,5 @@ #include "bogus_imp.h" #include "point_imp.h" +#include "object.h" #include "../misc/object_hierarchy.h" #include "../misc/kigpainter.h" @@ -80,4 +81,14 @@ const Coordinate LocusImp::getPoint( dou delete imp; return ret; +} + +LocusImp::LocusImp( const Object* movingpoint, const Object* tracingpoint ) + : mcurve( 0 ), mhier( new ObjectHierarchy( Objects( const_cast( movingpoint ) ), + tracingpoint ) ) +{ + // the ObjectType should make sure we have a ConstrainedPointImp + // parent, we just assert it.. + assert( movingpoint->has( ObjectImp::ID_PointImp ) && movingpoint->parents().size() == 0 ); + mcurve = static_cast( movingpoint->parents().front()->imp() ); }