コード例 #1
0
ファイル: mathutil.cpp プロジェクト: jaxzin/firebox
QVector3D MathUtil::Slerp(QVector3D p1, QVector3D p2, float i)
{

    p1.normalize();
    p2.normalize();

    QVector3D c = QVector3D::crossProduct(p1, p2);
    if (c.length() < 0.001f)
        c = QVector3D(0, 1, 0);
    c.normalize();

    float angle = acosf(QVector3D::dotProduct(p1, p2));

    return GetRotatedAxis(i * angle, p1, c);

}
コード例 #2
0
ファイル: cVec4.cpp プロジェクト: pilkch/library
 void cVec4::RotateAxis(double angle, const cVec3 & axis)
 {
   (*this)=GetRotatedAxis(angle, axis);
 }
コード例 #3
0
ファイル: PxVector.cpp プロジェクト: priyananda/projects
void PxVector::RotateAxis(double angle, const PxVector & axis)
{
	(*this)=GetRotatedAxis(angle, axis);
}
コード例 #4
0
ファイル: VECTOR4D.cpp プロジェクト: twslankard/BSPrenderer
void VECTOR4D::RotateAxis(double angle, const VECTOR3D & axis)
{
	(*this)=GetRotatedAxis(angle, axis);
}
コード例 #5
0
ファイル: Vector3.cpp プロジェクト: janisozaur/foto-results
void Vector3::RotateAxis(double angle, const Vector3 & axis) {
    (*this)=GetRotatedAxis(angle, axis);
}
コード例 #6
0
ファイル: cVec3.cpp プロジェクト: pilkch/library
 cVec3 cVec3::GetRotatedByQuaternion(const cQuaternion& rhs) const
 {
   return cVec3(GetRotatedAxis(rhs.GetAngleRadians(), rhs.GetAxis()));
 }