org.jbox2d.util.blob
Class BlobMaker
java.lang.Object
org.jbox2d.util.blob.BlobMaker
public class BlobMaker
- extends java.lang.Object
BlobMaker offers a static API for the creation of blobs.
Method Summary |
static void |
createBlob(BlobStructure s,
BlobContainer c,
World w)
Creates a blob in a given physics world. |
static void |
createBlob(BlobStructure s,
BlobContainer c,
World w,
float scaleX,
float scaleY)
Creates a blob in a given physics world. |
static void |
createBlob(BlobStructure s,
BlobContainer c,
World w,
float scaleX,
float scaleY,
float transX,
float transY)
Creates a blob in a given physics world. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pointRadius
public static float pointRadius
pointDensity
public static float pointDensity
pointFriction
public static float pointFriction
BlobMaker
public BlobMaker()
createBlob
public static void createBlob(BlobStructure s,
BlobContainer c,
World w)
- Creates a blob in a given physics world.
Does not apply any scaling or translation to the structure
before filling the container with it.
The fill procedure aligns the structure with the upper
left corner of the container AABB, then repeats the structure
until the AABB is filled, testing at each point whether
the container is supposed to have geometry there.
- Parameters:
s
- The BlobStructure definitionc
- The BlobContainer that specifies the geometry to fillw
- The World to create the blob in
createBlob
public static void createBlob(BlobStructure s,
BlobContainer c,
World w,
float scaleX,
float scaleY)
- Creates a blob in a given physics world.
Applies the specified x/y scaling to the structure before fill.
The fill procedure aligns the structure with the upper
left corner of the container AABB, applies the scaling,
then repeats the structure until the AABB is filled,
testing at each point whether the container is supposed
to have geometry there.
- Parameters:
s
- The BlobStructure definitionc
- The BlobContainer that specifies the geometry to fillw
- The World to create the blob inscaleX
- The world width of one repeating cell of the structurescaleY
- The world height of one repeating cell of the structure
createBlob
public static void createBlob(BlobStructure s,
BlobContainer c,
World w,
float scaleX,
float scaleY,
float transX,
float transY)
- Creates a blob in a given physics world.
Applies the specified x/y scaling to the structure before fill.
The fill procedure aligns the structure with the upper
left corner of the container AABB, applies the scaling,
shifts the cell by the requested translation amounts,
then repeats the structure until the AABB is filled,
testing at each point whether the container is supposed
to have geometry there.
- Parameters:
s
- The BlobStructure definitionc
- The BlobContainer that specifies the geometry to fillw
- The World to create the blob inscaleX
- The world width of one repeating cell of the structurescaleY
- The world height of one repeating cell of the structuretransX
- The world x offset of the cells from the AABB edgetransY
- The world y offset of the cells from the AABB edge