/** * Instantiate a point collision shape based on the specified points. * * @param point1 the coordinates of point (not null, alias created) */ public SimplexCollisionShape(Vector3f point1) { vector1 = point1; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { vector1 = point1; vector2 = point2; vector3 = point3; vector4 = point4; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { vector1 = point1; vector2 = point2; vector3 = point3; createShape(); }
/** * Instantiate a line-segment collision shape based on the specified points. * * @param point1 the coordinates of 1st point (not null, alias created) * @param point2 the coordinates of 2nd point (not null, alias created) */ public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); }
/** * Instantiate a triangular collision shape based on the specified points. * * @param point1 the coordinates of 1st point (not null, alias created) * @param point2 the coordinates of 2nd point (not null, alias created) * @param point3 the coordinates of 3rd point (not null, alias created) */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { vector1 = point1; vector2 = point2; vector3 = point3; createShape(); }
public SimplexCollisionShape(Vector3f point1) { vector1 = point1; createShape(); }
/** * Instantiate a tetrahedral collision shape based on the specified points. * * @param point1 the coordinates of 1st point (not null, alias created) * @param point2 the coordinates of 2nd point (not null, alias created) * @param point3 the coordinates of 3rd point (not null, alias created) * @param point4 the coordinates of 4th point (not null, alias created) */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { vector1 = point1; vector2 = point2; vector3 = point3; vector4 = point4; createShape(); }
/** * Instantiate the configured shape in Bullet. */ protected void createShape() { if (vector4 != null) { objectId = createShape(vector1, vector2, vector3, vector4); // objectId = new BU_Simplex1to4(Converter.convert(vector1), Converter.convert(vector2), Converter.convert(vector3), Converter.convert(vector4)); } else if (vector3 != null) { objectId = createShape(vector1, vector2, vector3); // objectId = new BU_Simplex1to4(Converter.convert(vector1), Converter.convert(vector2), Converter.convert(vector3)); } else if (vector2 != null) { objectId = createShape(vector1, vector2); // objectId = new BU_Simplex1to4(Converter.convert(vector1), Converter.convert(vector2)); } else { objectId = createShape(vector1); // objectId = new BU_Simplex1to4(Converter.convert(vector1)); } Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); // 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); vector1 = (Vector3f) capsule.readSavable("simplexPoint1", null); vector2 = (Vector3f) capsule.readSavable("simplexPoint2", null); vector3 = (Vector3f) capsule.readSavable("simplexPoint3", null); vector4 = (Vector3f) capsule.readSavable("simplexPoint4", null); 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); vector1 = (Vector3f) capsule.readSavable("simplexPoint1", null); vector2 = (Vector3f) capsule.readSavable("simplexPoint2", null); vector3 = (Vector3f) capsule.readSavable("simplexPoint3", null); vector4 = (Vector3f) capsule.readSavable("simplexPoint4", null); createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { vector1 = point1; vector2 = point2; vector3 = point3; vector4 = point4; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { vector1 = point1; vector2 = point2; vector3 = point3; vector4 = point4; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { vector1 = point1; vector2 = point2; vector3 = point3; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { vector1 = point1; vector2 = point2; vector3 = point3; createShape(); }
public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); vector1 = (Vector3f) capsule.readSavable("simplexPoint1", null); vector2 = (Vector3f) capsule.readSavable("simplexPoint2", null); vector3 = (Vector3f) capsule.readSavable("simplexPoint3", null); vector4 = (Vector3f) capsule.readSavable("simplexPoint4", null); createShape(); }
public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); vector1 = (Vector3f) capsule.readSavable("simplexPoint1", null); vector2 = (Vector3f) capsule.readSavable("simplexPoint2", null); vector3 = (Vector3f) capsule.readSavable("simplexPoint3", null); vector4 = (Vector3f) capsule.readSavable("simplexPoint4", null); createShape(); }