private static CompoundCollisionShape createCompoundShape( Node rootNode, CompoundCollisionShape shape, boolean meshAccurate) { return createCompoundShape(rootNode, rootNode, shape, meshAccurate, false); }
private static CompoundCollisionShape createCompoundShape( Node rootNode, CompoundCollisionShape shape, boolean meshAccurate) { return createCompoundShape(rootNode, rootNode, shape, meshAccurate, false); }
/** * This type of collision shape creates a CompoundShape made out of boxes * that are based on the bounds of the Geometries in the tree. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createBoxCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), false); }
/** * This type of collision shape creates a CompoundShape made out of boxes * that are based on the bounds of the Geometries in the tree. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createBoxCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), false); }
/** * This type of collision shape is mesh-accurate and meant for immovable * "world objects". Examples include terrain, houses or whole shooter * levels. * <p> * Objects with "mesh" type collision shape will not collide with each * other. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createMeshCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), true); }
/** * This type of collision shape is mesh-accurate and meant for immovable * "world objects". Examples include terrain, houses or whole shooter * levels. * <p> * Objects with "mesh" type collision shape will not collide with each * other. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createMeshCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), true); }
/** * Create a hull shape for the given Spatial. * <p> * For mesh-accurate animated meshes (CPU intense!) use GImpact shapes. * * @param spatial the spatial on which to base the shape (not null) * @return a HullCollisionShape (if spatial is a Geometry) or a * CompoundCollisionShape with HullCollisionShapes as children (if spatial * is a Node) */ public static CollisionShape createDynamicMeshShape(Spatial spatial) { if (spatial instanceof Geometry) { return createSingleDynamicMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { return createCompoundShape((Node) spatial, (Node) spatial, new CompoundCollisionShape(), true, true); } else { throw new IllegalArgumentException("Supplied spatial must either be Node or Geometry!"); } }
/** * Create a hull shape for the given Spatial. * <p> * For mesh-accurate animated meshes (CPU intense!) use GImpact shapes. * * @param spatial the spatial on which to base the shape (not null) * @return a HullCollisionShape (if spatial is a Geometry) or a * CompoundCollisionShape with HullCollisionShapes as children (if spatial * is a Node) */ public static CollisionShape createDynamicMeshShape(Spatial spatial) { if (spatial instanceof Geometry) { return createSingleDynamicMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { return createCompoundShape((Node) spatial, (Node) spatial, new CompoundCollisionShape(), true, true); } else { throw new IllegalArgumentException("Supplied spatial must either be Node or Geometry!"); } }
trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) { createCompoundShape(realRootNode, (Node) spatial, shape, meshAccurate, dynamic); } else if (spatial instanceof TerrainPatch) { Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);
trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) { createCompoundShape(realRootNode, (Node) spatial, shape, meshAccurate, dynamic); } else if (spatial instanceof TerrainPatch) { Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);
private static CompoundCollisionShape createCompoundShape( Node rootNode, CompoundCollisionShape shape, boolean meshAccurate) { return createCompoundShape(rootNode, rootNode, shape, meshAccurate, false); }
private static CompoundCollisionShape createCompoundShape( Node rootNode, CompoundCollisionShape shape, boolean meshAccurate) { return createCompoundShape(rootNode, rootNode, shape, meshAccurate, false); }
/** * This type of collision shape creates a CompoundShape made out of boxes * that are based on the bounds of the Geometries in the tree. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createBoxCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), false); }
/** * 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. */ private static CompoundCollisionShape createMeshCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), true); }
/** * This type of collision shape creates a CompoundShape made out of boxes that * are based on the bounds of the Geometries in the tree. * @param rootNode * @return */ private static CompoundCollisionShape createBoxCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), false); }
/** * This type of collision shape is mesh-accurate and meant for immovable * "world objects". Examples include terrain, houses or whole shooter * levels. * <p> * Objects with "mesh" type collision shape will not collide with each * other. * * @param rootNode the node on which to base the shape (not null) * @return a new shape (not null) */ private static CompoundCollisionShape createMeshCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), true); }
/** * This method creates a hull shape for the given Spatial.<br> * If you want to have mesh-accurate dynamic shapes (CPU intense!!!) use GImpact shapes, its probably best to do so with a low-poly version of your model. * @return A HullCollisionShape or a CompoundCollisionShape with HullCollisionShapes as children if the supplied spatial is a Node. */ public static CollisionShape createDynamicMeshShape(Spatial spatial) { if (spatial instanceof Geometry) { return createSingleDynamicMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { return createCompoundShape((Node) spatial, (Node) spatial, new CompoundCollisionShape(), true, true); } else { throw new IllegalArgumentException("Supplied spatial must either be Node or Geometry!"); } }
/** * Create a hull shape for the given Spatial. * <p> * For mesh-accurate animated meshes (CPU intense!) use GImpact shapes. * * @param spatial the spatial on which to base the shape (not null) * @return a HullCollisionShape (if spatial is a Geometry) or a * CompoundCollisionShape with HullCollisionShapes as children (if spatial * is a Node) */ public static CollisionShape createDynamicMeshShape(Spatial spatial) { if (spatial instanceof Geometry) { return createSingleDynamicMeshShape((Geometry) spatial, spatial); } else if (spatial instanceof Node) { return createCompoundShape((Node) spatial, (Node) spatial, new CompoundCollisionShape(), true, true); } else { throw new IllegalArgumentException("Supplied spatial must either be Node or Geometry!"); } }
trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) { createCompoundShape(realRootNode, (Node) spatial, shape, meshAccurate, dynamic); } else if (spatial instanceof TerrainPatch) { Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);
trans.getRotation().toRotationMatrix()); } else if (spatial instanceof Node) { createCompoundShape(realRootNode, (Node) spatial, shape, meshAccurate, dynamic); } else if (spatial instanceof TerrainPatch) { Boolean bool = spatial.getUserData(UserData.JME_PHYSICSIGNORE);