double DistanceAtAngle(PointVector& points, TemplatePtr& T, double theta)
    {
        PointVector newpoints(points);
        RotateBy(newpoints, theta);

        return PathDistance(newpoints, T->Points);
    }
Пример #2
0
const BAffineTransform&
BAffineTransform::RotateBy(const BPoint& center, double angle)
{
    TranslateBy(-center.x, -center.y);
    RotateBy(angle);
    return TranslateBy(center.x, center.y);
}
 void RotateToZero(PointVector& points)
 {
     PointPtr c = Centroid(points);
     double theta = atan2(c->Y - points[0]->Y, c->X - points[0]->X);
     RotateBy(points, -theta);
 }
Пример #4
0
void TransformNode::Pitch(float angle)
{
	RotateBy(angle, m_right);
}
Пример #5
0
	void Draw(BRect invalidate)
	{
		RotateBy(-M_PI / 5);
		TranslateBy(0, Bounds().Height() / 3);
		BStringView::Draw(invalidate);
	}
Пример #6
0
void TransformNode::Yaw(float angle)
{
	RotateBy(angle, Vector3(0.0f, 1.0f, 0.0f));
}
Пример #7
0
void TransformNode::Roll(float angle)
{
	RotateBy(angle, m_forward);
}
Пример #8
0
void CSkyBox::Update(float fElapseTime)
{
	RotateBy(0, m_fRotateSpeed * fElapseTime, 0);
}
Пример #9
0
		//----------------------------------------------------------------
		/// Rotate By
		///
		/// Rotate around the arbitary axis
		///
		/// @param X-axis Component
		/// @param Y-axis Component
		/// @param Z-axis Component
		/// @param Angle in radians
		//----------------------------------------------------------------
		void Transform::RotateBy(f32 inXAxis, f32 inYAxis, f32 inZAxis, f32 infAngleRads)
		{			
			RotateBy(Vector3(inXAxis,inYAxis,inZAxis), infAngleRads);
		}
Пример #10
0
		//----------------------------------------------------------------
		/// Rotate Z By
		///
		/// Rotate around the z-axis
		///
		/// @param Angle to rotate in radians
		//----------------------------------------------------------------
		void Transform::RotateZBy(f32 infAngleRads)
		{
			RotateBy(Vector3::k_unitPositiveZ, infAngleRads);
		}