Chipmunk2D Pro API Reference  7.0.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Instance Methods | Properties | List of all members
ChipmunkCGContextSampler Class Reference

Sampler built on top of a CGBitmapContext to allow deformable geometry. More...

#import <ChipmunkImageSampler.h>

Inherits ChipmunkBitmapSampler.

Inherited by ChipmunkImageSampler.

Instance Methods

(id) - initWithWidth:height:colorSpace:bitmapInfo:component:
 Initialize a context based sampler. More...
 
- Instance Methods inherited from ChipmunkBitmapSampler
(id) - initWithWidth:height:stride:bytesPerPixel:component:flip:pixelData:
 Init a sampler from bitmap data. More...
 
(void) - setBorderRepeat
 Set the border of the bitmap to repeat the edge pixels.
 
(void) - setBorderValue:
 Set the border of the bitmap to be a specific value.
 
(ChipmunkPolylineSet *) - marchAllWithBorder:hard:
 March the entire image.
 
- Instance Methods inherited from ChipmunkAbstractSampler
(id) - initWithSamplingFunction:
 Designated initializer.
 
(cpFloat- sample:
 Sample at a specific point.
 
(ChipmunkPolylineSet *) - march:xSamples:ySamples:hard:
 March a certain area of the sampler.
 

Properties

CGContextRef context
 CGBitmapContext for this sampler.
 
NSMutableData * pixelData
 NSMutableData object holding the pixel data.
 
- Properties inherited from ChipmunkBitmapSampler
NSUInteger width
 Width of the bitmap in pixels.
 
NSUInteger height
 Height of the bitmap in pixels.
 
NSUInteger bytesPerPixel
 Bytes per pixel of the bitmap. (ex: RGBA8888 would be 4)
 
NSUInteger component
 Zero-based ndex of the component to sample. (ex: alpha of RGBA would be 3)
 
NSData * pixelData
 NSData object holding the pixel data.
 
cpBB outputRect
 Rect that the image maps to. More...
 
- Properties inherited from ChipmunkAbstractSampler
cpFloat marchThreshold
 The threshold passed to the cpMarch*() functions. More...
 
cpMarchSampleFunc sampleFunc
 Get the primitive cpMarchSampleFunc used by this sampler.
 

Detailed Description

Sampler built on top of a CGBitmapContext to allow deformable geometry.

Very efficient when paired with a ChipmunkTileCache.

Method Documentation

- (id) initWithWidth: (unsigned long)  width
height: (unsigned long)  height
colorSpace: (CGColorSpaceRef)  colorSpace
bitmapInfo: (CGBitmapInfo)  bitmapInfo
component: (NSUInteger)  component 

Initialize a context based sampler.

Must provide options for a valid context. Find out more here in the Quartz 2D Programming Guide.


The documentation for this class was generated from the following file: