Chipmunk2D Pro API Reference  6.1.5
 All Classes Functions Variables Typedefs Properties Groups Pages
Macros | Typedefs | Functions
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_LAYERS   (~(cpLayers)0)
 Value for cpShape.layers signifying that a shape is in every layer.
 

Typedefs

typedef double cpFloat
 Chipmunk's floating point type. More...
 
typedef uintptr_t cpHashValue
 Hash value type.
 
typedef int 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 cpLayers
 Type used for cpShape.layers.
 
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

typedef double cpFloat

Chipmunk's floating point type.

Can be reconfigured at compile time.