Package com.jme3.bullet.collision.shapes
Class HeightfieldCollisionShape
java.lang.Object
com.jme3.bullet.collision.shapes.CollisionShape
com.jme3.bullet.collision.shapes.HeightfieldCollisionShape
- All Implemented Interfaces:
- Savable
Uses Bullet Physics Heightfield terrain collision system. This is MUCH faster
 than using a regular mesh.
 There are a couple tricks though:
    -No rotation or translation is supported.
    -The collision bbox must be centered around 0,0,0 with the height above and below the y-axis being
    equal on either side. If not, the whole collision box is shifted vertically and things don't collide
    as they should.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected float[]protected floatprotected intprotected intprotected floatprotected floatprotected intFields inherited from class com.jme3.bullet.collision.shapes.CollisionShapecShape, margin, scale
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHeightfieldCollisionShape(float[] heightmap) HeightfieldCollisionShape(float[] heightmap, Vector3f scale) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcreateCollisionHeightfield(float[] heightmap, Vector3f worldScale) protected voidvoidread(JmeImporter im) voidwrite(JmeExporter ex) Methods inherited from class com.jme3.bullet.collision.shapes.CollisionShapecalculateLocalInertia, getCShape, getDefaultMargin, getMargin, getScale, setCShape, setDefaultMargin, setMargin, setScale
- 
Field Details- 
heightStickWidthprotected int heightStickWidth
- 
heightStickLengthprotected int heightStickLength
- 
heightfieldDataprotected float[] heightfieldData
- 
heightScaleprotected float heightScale
- 
minHeightprotected float minHeight
- 
maxHeightprotected float maxHeight
- 
upAxisprotected int upAxis
- 
flipQuadEdgesprotected boolean flipQuadEdges
 
- 
- 
Constructor Details- 
HeightfieldCollisionShapeprotected HeightfieldCollisionShape()
- 
HeightfieldCollisionShapepublic HeightfieldCollisionShape(float[] heightmap) 
- 
HeightfieldCollisionShape
 
- 
- 
Method Details- 
createCollisionHeightfield
- 
createShapeprotected void createShape()
- 
createJmeMesh
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- CollisionShape
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- CollisionShape
- Throws:
- IOException
 
 
-