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

A point cloud sampler allows you to perform deformable terrain like with a bitmap backed sampler, but without any bounds. More...

#import <ChipmunkPointCloudSampler.h>

Inherits ChipmunkAbstractSampler.

Instance Methods

(id) - initWithCellSize:
 Initialize the sampler with the given cell size, which should roughly match the size of the points added to the sampler. More...
 
(cpBB- addPoint:radius:fuzz:
 Add a point to the cloud and return the dirty rect for the point.
 
- 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.
 

Additional Inherited Members

- 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

A point cloud sampler allows you to perform deformable terrain like with a bitmap backed sampler, but without any bounds.

It only requires memory for the points you add instead of large RAM chewing bitmap. However, unlike a bitmap, the deformation can only go one way. (i.e. You can add or remove terrain, but not both). Without any points, the sampler will return 1.0. Adding points will put "holes" in it causing it to return lower values.

Method Documentation

- (id) initWithCellSize: (cpFloat cellSize

Initialize the sampler with the given cell size, which should roughly match the size of the points added to the sampler.


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