/** * Instantiate the configured shape in Bullet. */ protected void createShape() { objectId = createShape(plane.getNormal(), plane.getConstant()); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // objectId = new StaticPlaneShape(Converter.convert(plane.getNormal()),plane.getConstant()); // objectId.setLocalScaling(Converter.convert(getScale())); // objectId.setMargin(margin); setScale(scale); setMargin(margin); }
/** * Instantiate a plane shape defined by the specified plane. * * @param plane the desired plane (not null, alias created) */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); }
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
protected void createShape() { cShape = new StaticPlaneShape(Converter.convert(plane.getNormal()),plane.getConstant()); cShape.setLocalScaling(Converter.convert(getScale())); cShape.setMargin(margin); }
/** * Creates a plane Collision shape * @param plane the plane that defines the shape */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); }
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
protected void createShape() { cShape = new StaticPlaneShape(Converter.convert(plane.getNormal()),plane.getConstant()); cShape.setLocalScaling(Converter.convert(getScale())); cShape.setMargin(margin); }
protected void createShape() { objectId = createShape(plane.getNormal(), plane.getConstant()); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // objectId = new StaticPlaneShape(Converter.convert(plane.getNormal()),plane.getConstant()); // objectId.setLocalScaling(Converter.convert(getScale())); // objectId.setMargin(margin); setScale(scale); setMargin(margin); }
/** * De-serialize this shape, for example when loading from a J3O file. * * @param im importer (not null) * @throws IOException from importer */ public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); plane = (Plane) capsule.readSavable("collisionPlane", new Plane()); createShape(); }
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
protected void createShape() { objectId = createShape(plane.getNormal(), plane.getConstant()); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // objectId = new StaticPlaneShape(Converter.convert(plane.getNormal()),plane.getConstant()); // objectId.setLocalScaling(Converter.convert(getScale())); // objectId.setMargin(margin); setScale(scale); setMargin(margin); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); plane = (Plane) capsule.readSavable("collisionPlane", new Plane()); createShape(); }
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); node3.getControl(RigidBodyControl.class).setApplyPhysicsLocal(true);
/** * Creates a plane Collision shape * @param plane the plane that defines the shape */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); }
public VirtualFloor(BasicGoodyCtx bgc, Ident floorUri, Vector3f position, ColorRGBA color, boolean rigidBodyPhysFlag) { super(bgc, floorUri); setPosition(position, VWorldEntity.QueueingStyle.QUEUE_AND_RETURN); // Constants and collision shape below taken from PhysicsStuffBuilder. // How much of this stuff do we want to come from repo instead? Mesh floorBox = new Box(140f, 0.25f, 140f); Plane plane = new Plane(); plane.setOriginNormal(new Vector3f(0, 0.25f, 0), Vector3f.UNIT_Y); if (color == null) { color = DEFAULT_COLOR; } addGeometry(floorBox, null, color, new Quaternion(), new PlaneCollisionShape(plane), 0f); }
/** * Creates a plane Collision shape * @param plane the plane that defines the shape */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); }
/** * Creates a plane Collision shape * @param plane the plane that defines the shape */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); plane = (Plane) capsule.readSavable("collisionPlane", new Plane()); createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); plane = (Plane) capsule.readSavable("collisionPlane", new Plane()); createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); plane = (Plane) capsule.readSavable("collisionPlane", new Plane()); createShape(); }