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