30 template <
typename Real>
43 template <
typename Real>
51 std::function<Real(Real const*)> energy =
64 for (
int i = 0; i < 2; ++i)
67 diagonal[i] = box.
extent[i];
70 Real
angle = atan2(rotate(0, 1), rotate(0, 0));
72 diagonal[0] *
std::abs(rotate(0, 0)) +
73 diagonal[1] *
std::abs(rotate(1, 0));
75 diagonal[0] *
std::abs(rotate(0, 1)) +
76 diagonal[1] *
std::abs(rotate(1, 1));
80 ((Real)0.5)*diagonal[0],
81 ((Real)0.5)*diagonal[1],
89 ((Real)2)*diagonal[0],
90 ((Real)2)*diagonal[1],
106 minimizer.
GetMinimum(v0, v1, vInitial, vMin, error);
108 diagonal[0] = vMin[0];
109 diagonal[1] = vMin[1];
117 template <
typename Real>
131 Real energy = (Real)0;
132 for (
int i = 0; i < numPoints; ++i)
136 Real dist = peQuery(prod, ellipse).distance;
std::array< Vector< N, Real >, N > axis
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
bool GetContainer(int numPoints, Vector3< Real > const *points, Capsule3< Real > &capsule)
Real operator()(int numPoints, Vector2< Real > const *points, Vector2< Real > ¢er, Matrix2x2< Real > &rotate, Real diagonal[2])
static Real Energy(int numPoints, Vector2< Real > const *points, Real const *input)
void GetMinimum(Real const *t0, Real const *t1, Real const *tInitial, Real *tMin, Real &fMin)
GLfixed GLfixed GLint GLint GLfixed points
void MakeRotation(Real angle, Matrix2x2< Real > &rotation)
GLenum GLenum GLenum input
void SetRow(int r, Vector< NumCols, Real > const &vec)
static Vector Unit(int d)