Munk2D Documentation  8.x.x
Loading...
Searching...
No Matches
Basic Types

Most of these types can be configured at compile time. More...

Macros

#define cpTrue   1
 true value.
 
#define cpFalse   0
 false value.
 
#define CP_NO_GROUP   ((cpGroup)0)
 Value for cpShape.group signifying that a shape is in no group.
 
#define CP_ALL_CATEGORIES   (~(cpBitmask)0)
 Value for cpShape.layers signifying that a shape is in every layer.
 
#define CP_WILDCARD_COLLISION_TYPE   (~(cpCollisionType)0)
 cpCollisionType value internally reserved for hashing wildcard handlers.
 

Typedefs

typedef double cpFloat
 Chipmunk's floating point type.
 
typedef uintptr_t cpHashValue
 Hash value type.
 
typedef uint32_t cpCollisionID
 Type used internally to cache colliding object info for cpCollideShapes().
 
typedef unsigned char cpBool
 Chipmunk's boolean type.
 
typedef void * cpDataPointer
 Type used for user data pointers.
 
typedef uintptr_t cpCollisionType
 Type used for cpSpace.collision_type.
 
typedef uintptr_t cpGroup
 Type used for cpShape.group.
 
typedef unsigned int cpBitmask
 Type used for cpShapeFilter category and mask.
 
typedef unsigned int cpTimestamp
 Type used for various timestamps in Chipmunk.
 

Functions

static cpFloat cpfmax (cpFloat a, cpFloat b)
 Return the max of two cpFloats.
 
static cpFloat cpfmin (cpFloat a, cpFloat b)
 Return the min of two cpFloats.
 
static cpFloat cpfabs (cpFloat f)
 Return the absolute value of a cpFloat.
 
static cpFloat cpfclamp (cpFloat f, cpFloat min, cpFloat max)
 Clamp f to be between min and max.
 
static cpFloat cpfclamp01 (cpFloat f)
 Clamp f to be between 0 and 1.
 
static cpFloat cpflerp (cpFloat f1, cpFloat f2, cpFloat t)
 Linearly interpolate (or extrapolate) between f1 and f2 by t percent.
 
static cpFloat cpflerpconst (cpFloat f1, cpFloat f2, cpFloat d)
 Linearly interpolate from f1 to f2 by no more than d.
 

Detailed Description

Most of these types can be configured at compile time.

Typedef Documentation

◆ cpCollisionID

typedef uint32_t cpCollisionID

Type used internally to cache colliding object info for cpCollideShapes().

Should be at least 32 bits.

◆ cpFloat

typedef double cpFloat

Chipmunk's floating point type.

Can be reconfigured at compile time.