Hipmunk- A Haskell binding for Chipmunk.

Portabilityportable (needs FFI)
Safe HaskellNone




All functions on this module are UNSAFE in the sense that they may reduce the physical accuracy or numerical stability of the simulation if you use them correctly, or may crash your system if you are not careful enough. Read their documentation carefully and use them only if you really need and know what you are doing.



unsafeShapeRedefine :: Shape -> ShapeType -> Position -> IO ()Source

unsafeShapeRedefine shape type off redefines shape to have new parameters described on type and to be at offset off. Be careful, you should not change the shape type. For example, it is unsafe to change a circle shape's radius, but it is an error to try to change a circle into a segment or a polygon. Note also that these errors are not checked, meaning they will probably crash Chipmunk.


unsafeRememberC :: ConstraintType a => Constraint Unknown -> Constraint aSource

Unsafe function that changes the constraint type to anything. It is unsafe because you should call redefine only on the same kind of constraint you created, and this function allows you to bypass the type system checks. Note also that, unlike Chipmunk, we don't check at run-time that redefine is being called on the right type!