42 #include <visp/vpMomentCommon.h>
43 #include <visp/vpMomentObject.h>
57 momentGravityNormalized(),
58 momentSurfaceNormalized(dstSurface,dstZ),
60 momentAlpha(ref,refAlpha),
64 momentGravity.
linkTo(*
this);
65 momentCentered.
linkTo(*
this);
66 momentGravityNormalized.
linkTo(*
this);
67 momentSurfaceNormalized.
linkTo(*
this);
68 momentCInvariant.
linkTo(*
this);
135 momentSurfaceNormalized.
compute();
136 momentGravityNormalized.
compute();
139 }
catch(
const char* ex){
140 std::cout <<
"exception:" << ex <<std::endl;
163 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
187 return momentAlpha.
get();
205 std::vector<double> mu(4);
207 for (
unsigned int i=0; i<4; i++) {
208 for (
unsigned int j=0; j<4; j++) {
210 mu[idx] = momentCentered.
get(j,i);
vpMomentCommon(double dstSurface, std::vector< double > ref, double refAlpha, double dstZ=1.0)
static double getAlpha(vpMomentObject &objec)
void linkTo(vpMomentDatabase &moments)
double get(unsigned int i, unsigned int j)
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...
static double getSurface(vpMomentObject &object)
Class describing 2D gravity center moment.
void updateAll(vpMomentObject &object)