S_ObjectNormalized.hxx
Go to the documentation of this file.
1 inline Point3 S_ObjectNormalized::support(const Vector3 & v) const
2 {
3  Vector3 vp(v);
4  vp = v * mRot_; // ie : mRot.transpose*v (applying inverse transformation on the support vector)
5  Scalar norm = vp.norm();
6  if(norm > sch::epsilon)
7  {
8  vp /= norm;
9  }
10  else
11  {
12  vp.Set(1, 0, 0);
13  }
14  int k = -1;
15  Point3 p(mRot_ * l_Support(vp, k));
16  return p + trans_;
17 }
18 
19 inline Point3 S_ObjectNormalized::support(const Vector3 & v, int & LastFeature) const
20 {
21  Vector3 vp(v);
22  vp = v * mRot_; // ie : mRot.transpose*v (applying inverse transformation on the support vector)
23  Scalar norm = vp.norm();
24  if(norm > sch::epsilon)
25  {
26  vp /= norm;
27  }
28  else
29  {
30  vp.Set(1, 0, 0);
31  }
32 
33  Point3 p(mRot_ * l_Support(vp, LastFeature));
34  return p + trans_;
35 }
CD_Matrix::Vector3T::norm
T norm() const
Definition: SmallVector3T.h:290
CD_Matrix::Vector3T::Set
void Set(const T &x, const T &y, const T &z)
Definition: SmallVector3T.h:95
CD_Matrix::Vector3T< Scalar, false >
sch::Scalar
double Scalar
Definition: SCH_Types.h:23