# Copyright (c) 2007 SIEGE Development Team
# All rights reserved.
#
# This file is part of libSIEGE.
#
# This software is copyrighted work licensed under the terms of the
# 2-clause BSD license. Please consult the file "license.txt" for
# details.
#
# If you did not recieve the file with this program, please email
# Tim Chas <darkuranium@gmail.com>.

from siege.common cimport *

cdef extern from "siege/physics/body.h":
    struct SGPhysicsBody:
        void* handle

cdef extern from "siege/physics/space.h":
    struct SGPhysicsSpace:
        void* handle
    
    SGPhysicsSpace* sgPhysicsSpaceCreate()
    void sgPhysicsSpaceDestroy(SGPhysicsSpace* space)
    
    void sgPhysicsSpaceStep(SGPhysicsSpace* space, float time)
    
    void sgPhysicsSpaceSetIterations(SGPhysicsSpace* space, SGuint iterations)
    void sgPhysicsSpaceSetGravity(SGPhysicsSpace* space, float x, float y)
    #void sgPhysicsSpaceGetGravity(SGPhysicsSpace* space, float* x, float* y)
    void sgPhysicsSpaceSetDamping(SGPhysicsSpace* space, float damping)
    #float sgPhysicsSpaceGetDamping(SGPhysicsSpace* space)

    void sgPhysicsSpaceSetData(SGPhysicsSpace* space, void* data)
    void* sgPhysicsSpaceGetData(SGPhysicsSpace* space)

    SGPhysicsBody* sgPhysicsSpaceGetStaticBody(SGPhysicsSpace* space)
    SGPhysicsSpace* sgPhysicsSpaceGetDefault()

cdef class Space:
    cdef SGPhysicsSpace* handle
    cdef object pydata
    
    cpdef destroy(self)
cdef class DefaultSpace(Space):
    cpdef destroy(self)
