/** * Creates a cylinder shape around the given axis from the given halfextents * @param halfExtents the halfextents to use * @param axis (0=X,1=Y,2=Z) */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; this.axis = axis; createShape(); }
/** * creates a cylinder shape from the given halfextents * @param halfExtents the halfextents to use */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; this.axis = 2; createShape(); }
/** * Instantiate a Z-axis cylinder shape with the specified half extents. * * @param halfExtents the desired unscaled half extents (not null, no * negative component, alias created) */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; this.axis = 2; createShape(); }
/** * Instantiate a cylinder shape around the specified axis. * * @param halfExtents the desired unscaled half extents (not null, no * negative component, alias created) * @param axis which local axis: 0→X, 1→Y, 2→Z */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; this.axis = axis; createShape(); }
/** * Instantiate the configured shape in Bullet. */ protected void createShape() { objectId = createShape(axis, halfExtents); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // switch (axis) { // case 0: // objectId = new CylinderShapeX(Converter.convert(halfExtents)); // break; // case 1: // objectId = new CylinderShape(Converter.convert(halfExtents)); // break; // case 2: // objectId = new CylinderShapeZ(Converter.convert(halfExtents)); // break; // } // 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); halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f)); axis = capsule.readInt("axis", 1); createShape(); }
/** * 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); halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f)); axis = capsule.readInt("axis", 1); createShape(); }
/** * creates a cylinder shape from the given halfextents * @param halfExtents the halfextents to use */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; this.axis = 2; createShape(); }
/** * creates a cylinder shape from the given halfextents * @param halfExtents the halfextents to use */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; this.axis = 2; createShape(); }
/** * Creates a cylinder shape around the given axis from the given halfextents * @param halfExtents the halfextents to use * @param axis (0=X,1=Y,2=Z) */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; this.axis = axis; createShape(); }
/** * Creates a cylinder shape around the given axis from the given halfextents * @param halfExtents the halfextents to use * @param axis (0=X,1=Y,2=Z) */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; this.axis = axis; createShape(); }
/** * creates a cylinder shape from the given halfextents * @param halfExtents the halfextents to use */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; this.axis = 2; createShape(); }
/** * Creates a cylinder shape around the given axis from the given halfextents * @param halfExtents the halfextents to use * @param axis (0=X,1=Y,2=Z) */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; this.axis = axis; createShape(); }
protected void createShape() { objectId = createShape(axis, halfExtents); Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Created Shape {0}", Long.toHexString(objectId)); // switch (axis) { // case 0: // objectId = new CylinderShapeX(Converter.convert(halfExtents)); // break; // case 1: // objectId = new CylinderShape(Converter.convert(halfExtents)); // break; // case 2: // objectId = new CylinderShapeZ(Converter.convert(halfExtents)); // break; // } // objectId.setLocalScaling(Converter.convert(getScale())); // objectId.setMargin(margin); setScale(scale); setMargin(margin); }
protected void createShape() { objectId = createShape(axis, halfExtents); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // switch (axis) { // case 0: // objectId = new CylinderShapeX(Converter.convert(halfExtents)); // break; // case 1: // objectId = new CylinderShape(Converter.convert(halfExtents)); // break; // case 2: // objectId = new CylinderShapeZ(Converter.convert(halfExtents)); // break; // } // 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); halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f)); axis = capsule.readInt("axis", 1); createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f)); axis = capsule.readInt("axis", 1); createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); halfExtents = (Vector3f) capsule.readSavable("halfExtents", new Vector3f(0.5f, 0.5f, 0.5f)); axis = capsule.readInt("axis", 1); createShape(); }