38 #include <visp3/core/vpMomentCommon.h>
39 #include <visp3/core/vpMomentObject.h>
51 :
vpMomentDatabase(), momentBasic(), momentGravity(), momentCentered(), momentGravityNormalized(),
52 momentSurfaceNormalized(dstSurface,dstZ), momentCInvariant(), momentAlpha(ref,refAlpha),
58 momentGravity.
linkTo(*
this);
59 momentCentered.
linkTo(*
this);
60 momentGravityNormalized.
linkTo(*
this);
61 momentSurfaceNormalized.
linkTo(*
this);
62 momentCInvariant->
linkTo(*
this);
129 momentSurfaceNormalized.
compute();
130 momentGravityNormalized.
compute();
133 }
catch(
const char* ex){
134 std::cout <<
"exception:" << ex <<std::endl;
156 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
179 return momentAlpha.
get();
197 std::vector<double> mu(4);
199 for (
unsigned int j=0; j<4; j++) {
200 for (
unsigned int i=0; i<4; i++) {
202 mu[idx] = momentCentered.
get(i,j);
211 if (momentCInvariant)
212 delete momentCInvariant;
vpMomentCommon(double dstSurface, std::vector< double > ref, double refAlpha, double dstZ=1.0, bool flg_sxsyfromnormalized=false)
void linkTo(vpMomentDatabase &moments)
virtual ~vpMomentCommon()
Class for generic objects.
This class allows to register all vpMoments so they can access each other according to their dependen...
static std::vector< double > getMu3(vpMomentObject &object)
virtual void updateAll(vpMomentObject &object)
This class defines the double-indexed centered moment descriptor .
This class defines the orientation of the object inside the plane parallel to the object...
double get(unsigned int i, unsigned int j) const
static double getSurface(vpMomentObject &object)
Class describing 2D gravity center moment.
void updateAll(vpMomentObject &object)
static double getAlpha(vpMomentObject &object)