Expression<Vector>::Ptr UnitX_Rotation::derivativeExpression(int i) {
        int nr = getDep<Rotation>(i,argument);
        if (nr==1) {
            return Constant<Vector>(Vector::Zero());
        } else {
            return argument->derivativeExpression(i) * unit_x( argument );
        }
}
Esempio n. 2
0
TEST(TVector3Test, CrossProductCheck)
{
	TVector3<float> unit_x(1,0,0);
	TVector3<float> unit_y(0,1,0);
	TVector3<float> unit_z(0,0,1);

	EXPECT_EQ(unit_z.Cross(unit_x), unit_y);
}