dchip.cpSpace

Undocumented in source.

Members

Aliases

cpPostStepFunc
alias cpPostStepFunc = void function(cpSpace* space, void* key, void* data)

Post Step callback function type.

cpSpaceArbiterApplyImpulseFunc
alias cpSpaceArbiterApplyImpulseFunc = void function(cpArbiter* arb)
Undocumented in source.
cpSpaceBBQueryFunc
alias cpSpaceBBQueryFunc = void function(cpShape* shape, void* data)

Rectangle Query callback function type.

cpSpaceBodyIteratorFunc
alias cpSpaceBodyIteratorFunc = void function(cpBody* bdy, void* data)

Space/body_ iterator callback function type.

cpSpaceConstraintIteratorFunc
alias cpSpaceConstraintIteratorFunc = void function(cpConstraint* constraint, void* data)

Space/constraint iterator callback function type.

cpSpaceNearestPointQueryFunc
alias cpSpaceNearestPointQueryFunc = void function(cpShape* shape, cpFloat distance, cpVect point, void* data)

Nearest point query callback function type.

cpSpacePointQueryFunc
alias cpSpacePointQueryFunc = void function(cpShape* shape, void* data)

Point query callback function type.

cpSpaceSegmentQueryFunc
alias cpSpaceSegmentQueryFunc = void function(cpShape* shape, cpFloat t, cpVect n, void* data)

Segment query callback function type.

cpSpaceShapeIteratorFunc
alias cpSpaceShapeIteratorFunc = void function(cpShape* shape, void* data)

Space/body_ iterator callback function type.

cpSpaceShapeQueryFunc
alias cpSpaceShapeQueryFunc = void function(cpShape* shape, cpContactPointSet* points, void* data)

Shape query callback function type.

Functions

alwaysCollide
cpBool alwaysCollide(cpArbiter* arb, cpSpace* space, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
arbiterSetEql
cpBool arbiterSetEql(cpShape** shapes, cpArbiter* arb)
Undocumented in source. Be warned that the author may not have intended to support it.
bodyFreeWrap
void bodyFreeWrap(void* ptr, void* unused)
Undocumented in source. Be warned that the author may not have intended to support it.
cachedArbitersFilter
cpBool cachedArbitersFilter(cpArbiter* arb, arbiterFilterContext* context)
Undocumented in source. Be warned that the author may not have intended to support it.
constraintFreeWrap
void constraintFreeWrap(void* ptr, void* unused)
Undocumented in source. Be warned that the author may not have intended to support it.
copyShapes
void copyShapes(cpShape* shape, cpSpatialIndex* index)
Undocumented in source. Be warned that the author may not have intended to support it.
cpAssertSpaceUnlocked
void cpAssertSpaceUnlocked(S space)
Undocumented in source. Be warned that the author may not have intended to support it.
cpConstraintFreeWrap
void cpConstraintFreeWrap(void* constraint)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAddBody
cpBody* cpSpaceAddBody(cpSpace* space, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAddCollisionHandler
void cpSpaceAddCollisionHandler(cpSpace* space, cpCollisionType a, cpCollisionType b, cpCollisionBeginFunc begin, cpCollisionPreSolveFunc preSolve, cpCollisionPostSolveFunc postSolve, cpCollisionSeparateFunc separate, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAddConstraint
cpConstraint* cpSpaceAddConstraint(cpSpace* space, cpConstraint* constraint)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAddShape
cpShape* cpSpaceAddShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAddStaticShape
cpShape* cpSpaceAddStaticShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceAlloc
cpSpace* cpSpaceAlloc()
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceContainsBody
cpBool cpSpaceContainsBody(cpSpace* space, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceContainsConstraint
cpBool cpSpaceContainsConstraint(cpSpace* space, cpConstraint* constraint)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceContainsShape
cpBool cpSpaceContainsShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceConvertBodyToDynamic
void cpSpaceConvertBodyToDynamic(cpSpace* space, cpBody* body_, cpFloat m, cpFloat i)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceConvertBodyToStatic
void cpSpaceConvertBodyToStatic(cpSpace* space, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceDestroy
void cpSpaceDestroy(cpSpace* space)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceEachBody
void cpSpaceEachBody(cpSpace* space, cpSpaceBodyIteratorFunc func, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceEachConstraint
void cpSpaceEachConstraint(cpSpace* space, cpSpaceConstraintIteratorFunc func, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceEachShape
void cpSpaceEachShape(cpSpace* space, cpSpaceShapeIteratorFunc func, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceFilterArbiters
void cpSpaceFilterArbiters(cpSpace* space, cpBody* body_, cpShape* filter)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceFree
void cpSpaceFree(cpSpace* space)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceInit
cpSpace* cpSpaceInit(cpSpace* space)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceIsLocked
cpBool cpSpaceIsLocked(cpSpace* space)

returns true from inside a callback and objects cannot be added/removed.

cpSpaceNew
cpSpace* cpSpaceNew()
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceReindexShape
void cpSpaceReindexShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceReindexShapesForBody
void cpSpaceReindexShapesForBody(cpSpace* space, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceReindexStatic
void cpSpaceReindexStatic(cpSpace* space)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceRemoveBody
void cpSpaceRemoveBody(cpSpace* space, cpBody* body_)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceRemoveCollisionHandler
void cpSpaceRemoveCollisionHandler(cpSpace* space, cpCollisionType a, cpCollisionType b)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceRemoveConstraint
void cpSpaceRemoveConstraint(cpSpace* space, cpConstraint* constraint)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceRemoveShape
void cpSpaceRemoveShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceRemoveStaticShape
void cpSpaceRemoveStaticShape(cpSpace* space, cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceSetDefaultCollisionHandler
void cpSpaceSetDefaultCollisionHandler(cpSpace* space, cpCollisionBeginFunc begin, cpCollisionPreSolveFunc preSolve, cpCollisionPostSolveFunc postSolve, cpCollisionSeparateFunc separate, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
cpSpaceUseSpatialHash
void cpSpaceUseSpatialHash(cpSpace* space, cpFloat dim, int count)
Undocumented in source. Be warned that the author may not have intended to support it.
freeWrap
void freeWrap(void* ptr, void* unused)

Workarounds for https://github.com/slembcke/Chipmunk2D/issues/56.

handlerSetEql
cpBool handlerSetEql(cpCollisionHandler* check, cpCollisionHandler* pair)
Undocumented in source. Be warned that the author may not have intended to support it.
handlerSetTrans
void* handlerSetTrans(cpCollisionHandler* handler, void* unused)
Undocumented in source. Be warned that the author may not have intended to support it.
nothing
void nothing(cpArbiter* arb, cpSpace* space, void* data)
Undocumented in source. Be warned that the author may not have intended to support it.
shapeFreeWrap
void shapeFreeWrap(void* ptr, void* unused)
Undocumented in source. Be warned that the author may not have intended to support it.
shapeVelocityFunc
cpVect shapeVelocityFunc(cpShape* shape)
Undocumented in source. Be warned that the author may not have intended to support it.
spaceEachShapeIterator
void spaceEachShapeIterator(cpShape* shape, spaceShapeContext* context)
Undocumented in source. Be warned that the author may not have intended to support it.
updateBBCache
void updateBBCache(cpShape* shape, void* unused)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin CP_DefineSpaceStructProperty!(int, "iterations", "Iterations")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpVect, "gravity", "Gravity")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpFloat, "damping", "Damping")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpFloat, "idleSpeedThreshold", "IdleSpeedThreshold")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpFloat, "sleepTimeThreshold", "SleepTimeThreshold")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpFloat, "collisionSlop", "CollisionSlop")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpFloat, "collisionBias", "CollisionBias")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpTimestamp, "collisionPersistence", "CollisionPersistence")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpBool, "enableContactGraph", "EnableContactGraph")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructProperty!(cpDataPointer, "data", "UserData")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructGetter!(cpBody*, "staticBody", "StaticBody")
Undocumented in source.
__anonymous
mixin CP_DefineSpaceStructGetter!(cpFloat, "curr_dt", "CurrentTimeStep")
Undocumented in source.

Mixin templates

CP_DefineSpaceStructGetter
mixintemplate CP_DefineSpaceStructGetter(type, string member, string name)
Undocumented in source.
CP_DefineSpaceStructProperty
mixintemplate CP_DefineSpaceStructProperty(type, string member, string name)
Undocumented in source.
CP_DefineSpaceStructSetter
mixintemplate CP_DefineSpaceStructSetter(type, string member, string name)
Undocumented in source.

Static variables

cpDefaultCollisionHandler
cpCollisionHandler cpDefaultCollisionHandler;
Undocumented in source.

Structs

arbiterFilterContext
struct arbiterFilterContext
Undocumented in source.
cpSpace
struct cpSpace

Basic Unit of Simulation in Chipmunk

spaceShapeContext
struct spaceShapeContext
Undocumented in source.

Meta