Source

pygamekit / gkmath.pxd

Full commit

from prerequisites cimport *

cdef extern from "OgreVector2.h" namespace "Ogre":
    cppclass Vector2:
        Real x
        Real y
        bool isZeroLength()
        #Real *ptr()
    cppclass Vector3:
        Vector3()
        Vector3(Real,Real,Real)
        Real x
        Real y
        Real z
        Real normalise()
        Vector3 *normalised()
        Real length()
        Real getitem "operator[]"(size_t)
        Vector3& assign "operator="(Vector3)
        Vector3 neg "operator-"()
        Vector3& iadd "operator+="(Vector3)
        Vector3& isub "operator-="(Vector3)
        Vector3& imul "operator*="(Real)
        Vector3& imul "operator*="(Vector3)
        Vector3& idiv "operator/="(Real)
        Vector3& idiv "operator/="(Vector3)
        Real *ptr()
        Radian angleBetween(Vector3)
        Quaternion getRotationTo(Vector3)
        Quaternion getRotationTo(Vector3, Vector3)
        Real dotProduct (Vector3 &vec)
        Vector3 crossProduct (Vector3 &vec)
    cppclass Vector4:
        Real x
        Real y
        Real z
        Real w
    cppclass Quaternion:
        Quaternion()
        Quaternion(Real*)
        Quaternion(Real,Real,Real,Real)
        Quaternion(Vector3 &,Vector3 &,Vector3 &)
        Real x
        Real y
        Real z
        Real w
        Real normalise()
        Quaternion *normalised()
        Real getitem "operator[]"(size_t)
        Quaternion& assign "operator="(Quaternion)
        Quaternion neg "operator-"()
        Quaternion& add "operator+"(Quaternion)
        Quaternion& sub "operator-"(Quaternion)
        Quaternion& mul "operator*"(Real)
        Quaternion& mul "operator*"(Quaternion)
        Quaternion& div "operator/"(Real)
        Quaternion& div "operator/"(Quaternion)
        Vector3 mul "operator*"(Vector3)
        Real *ptr()
    Quaternion quat_nlerp "Ogre::Quaternion::nlerp"(Real fT, Quaternion &rkP, Quaternion &rkQ, bool shortestPath)
    Quaternion quat_Slerp "Ogre::Quaternion::Slerp"(Real fT, Quaternion &rkP, Quaternion &rkQ, bool shortestPath)
    Quaternion quat_SlerpExtraSpins "Ogre::Quaternion::SlerpExtraSpins"(Real fT, Quaternion &rkP, Quaternion &rkQ, int iExtraSpins)
        
    cppclass Matrix3:
        Vector3 mCol0
        Vector3 mCol1
        Vector3 mCol2
        
    cppclass Matrix4:
        Vector4 mCol0
        Vector4 mCol1
        Vector4 mCol2
        Vector4 mCol3
    
    cppclass Radian:
        Radian(Real)
        Real mRad
        Real valueRadians()
        Real valueDegrees()
        
    cppclass Degree:
        Real mDeg

        
    
    
cdef extern from "gkMathUtils.h":
    cppclass Euler "gkEuler":
        Euler()
        Radian x
        Radian y
        Radian z

    cppclass TransformState "gkTransformState":
        TransformState()
        TransformState(Vector3, Quaternion, Vector3)
        Vector3           loc
        Quaternion        rot
        Vector3           scl