/** * @param pivotA local translation of the joint connection point in node A * @param pivotB local translation of the joint connection point in node B */ public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB); this.rotA=rotA; this.rotB=rotB; this.useLinearReferenceFrameA=useLinearReferenceFrameA; createJoint(); }
/** * Creates a new HingeJoint * @param pivotA local translation of the joint connection point in node A * @param pivotB local translation of the joint connection point in node B */ public HingeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Vector3f axisA, Vector3f axisB) { super(nodeA, nodeB, pivotA, pivotB); this.axisA = axisA; this.axisB = axisB; createJoint(); }
/** * @param pivotA local translation of the joint connection point in node A * @param pivotB local translation of the joint connection point in node B */ public Point2PointJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) { super(nodeA, nodeB, pivotA, pivotB); createJoint(); }
@Override public void write(JmeExporter ex) throws IOException { super.write(ex); OutputCapsule cap = ex.getCapsule(this); cap.write(getDamping(), "damping", 1.0f); cap.write(getTau(), "tau", 0.3f); cap.write(getImpulseClamp(), "impulseClamp", 0f); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); createJoint(); InputCapsule cap=im.getCapsule(this); setDamping(cap.readFloat("damping", 1.0f)); setDamping(cap.readFloat("tau", 0.3f)); setDamping(cap.readFloat("impulseClamp", 0f)); }
private native float getImpulseClamp(long objectId);
/** * @param pivotA local translation of the joint connection point in node A * @param pivotB local translation of the joint connection point in node B */ public ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB) { super(nodeA, nodeB, pivotA, pivotB); this.rotA = rotA; this.rotB = rotB; createJoint(); }
private native void setDamping(long objectId, float value);
private native void setTau(long objectId, float value);
private native float getUpperLinLimit(long objectId);
private native void setDampingDirLin(long objectId, float value);
private native void setRestitutionLimLin(long objectId, float value);
private native float getDampingLimLin(long objectId);
private native void setDampingLimAng(long objectId, float value);
private native void setDampingOrthoLin(long objectId, float value);
private native float getSoftnessOrthoAng(long objectId);
/** * Test whether this joint's motor is enabled. * * @return true if enabled, otherwise false */ public boolean getEnableMotor() { return getEnableAngularMotor(objectId); }
native void setEquilibriumPoint(long objctId); /**
private native void setAngularOnly(long objectId, boolean angularOnly);
private native float getMaxMotorImpulse(long objectId);