Tabnine Logo
HeightfieldCollisionShape.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.jme3.bullet.collision.shapes.HeightfieldCollisionShape
constructor

Best Java code snippets using com.jme3.bullet.collision.shapes.HeightfieldCollisionShape.<init> (Showing top 12 results out of 315)

origin: jMonkeyEngine/jmonkeyengine

public void tileAttached(Vector3f cell, TerrainQuad quad) {
  while(quad.getControl(RigidBodyControl.class)!=null){
    quad.removeControl(RigidBodyControl.class);
  }
  quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
  bulletAppState.getPhysicsSpace().add(quad);
}
origin: jMonkeyEngine/jmonkeyengine

public void tileAttached(Vector3f cell, TerrainQuad quad) {
  while(quad.getControl(RigidBodyControl.class)!=null){
    quad.removeControl(RigidBodyControl.class);
  }
  quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
  bulletAppState.getPhysicsSpace().add(quad);
}
origin: jMonkeyEngine/jmonkeyengine

public void tileAttached(Vector3f cell, TerrainQuad quad) {
  //workaround for bugged test j3o's
  while(quad.getControl(RigidBodyControl.class)!=null){
    quad.removeControl(RigidBodyControl.class);
  }
  quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
  bulletAppState.getPhysicsSpace().add(quad);
}
origin: jMonkeyEngine/jmonkeyengine

if (spatial instanceof TerrainQuad) {
  TerrainQuad terrain = (TerrainQuad) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof TerrainPatch) {
  TerrainPatch terrain = (TerrainPatch) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof Geometry) {
  return createSingleMeshShape((Geometry) spatial, spatial);
origin: jMonkeyEngine/jmonkeyengine

if (spatial instanceof TerrainQuad) {
  TerrainQuad terrain = (TerrainQuad) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof TerrainPatch) {
  TerrainPatch terrain = (TerrainPatch) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof Geometry) {
  return createSingleMeshShape((Geometry) spatial, spatial);
origin: jMonkeyEngine/jmonkeyengine

public void tileAttached(Vector3f cell, TerrainQuad quad) {
  Texture alpha = null;
  try {
    alpha = assetManager.loadTexture("TerrainAlphaTest/alpha_" + (int)cell.x+ "_" + (int)cell.z + ".png");
  } catch (Exception e) {
    alpha = assetManager.loadTexture("TerrainAlphaTest/alpha_default.png");
  }
  quad.getMaterial().setTexture("AlphaMap", alpha);
  if (usePhysics) {
    quad.addControl(new RigidBodyControl(new HeightfieldCollisionShape(quad.getHeightMap(), terrain.getLocalScale()), 0));
    bulletAppState.getPhysicsSpace().add(quad);
  }
  updateMarkerElevations();
}
origin: jMonkeyEngine/jmonkeyengine

shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
origin: jMonkeyEngine/jmonkeyengine

shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
origin: org.jmonkeyengine/jme3-bullet

/**
 * This type of collision shape is mesh-accurate and meant for immovable "world objects".
 * Examples include terrain, houses or whole shooter levels.<br/>
 * Objects with "mesh" type collision shape will not collide with each other.<br/>
 * Creates a HeightfieldCollisionShape if the supplied spatial is a TerrainQuad.
 * @return A MeshCollisionShape or a CompoundCollisionShape with MeshCollisionShapes as children if the supplied spatial is a Node. A HeightieldCollisionShape if a TerrainQuad was supplied.
 */
public static CollisionShape createMeshShape(Spatial spatial) {
  if (spatial instanceof TerrainQuad) {
    TerrainQuad terrain = (TerrainQuad) spatial;
    return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
  } else if (spatial instanceof TerrainPatch) {
    TerrainPatch terrain = (TerrainPatch) spatial;
    return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
  } else if (spatial instanceof Geometry) {
    return createSingleMeshShape((Geometry) spatial, spatial);
  } else if (spatial instanceof Node) {
    return createMeshCompoundShape((Node) spatial);
  } else {
    throw new IllegalArgumentException("Supplied spatial must either be Node or Geometry!");
  }
}
origin: org.jmonkeyengine/jme3-jbullet

if (spatial instanceof TerrainQuad) {
  TerrainQuad terrain = (TerrainQuad) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof TerrainPatch) {
  TerrainPatch terrain = (TerrainPatch) spatial;
  return new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());
} else if (spatial instanceof Geometry) {
  return createSingleMeshShape((Geometry) spatial, spatial);
origin: org.jmonkeyengine/jme3-bullet

shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
origin: org.jmonkeyengine/jme3-jbullet

shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), trans.getScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
shape.addChildShape(new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale()),
    trans.getTranslation(),
    trans.getRotation().toRotationMatrix());
com.jme3.bullet.collision.shapesHeightfieldCollisionShape<init>

Javadoc

No-argument constructor needed by SavableClassUtil. Do not invoke directly!

Popular methods of HeightfieldCollisionShape

  • createCollisionHeightfield
  • createShape
  • setMargin
  • setScale
  • getScale

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now