public void AppendLinearJoint(LinearJoint.Specs specs, Cluster body0, Body body1) { btSoftBody_appendLinearJoint4(_native, specs._native, body0._native, body1._native); }
public void AppendLinearJoint(LinearJoint.Specs specs, Body body) { btSoftBody_appendLinearJoint3(_native, specs._native, body._native); }
public void AppendAngularJoint(AngularJoint.Specs specs, Body body) { StoreAngularJointControlRef(specs); btSoftBody_appendAngularJoint2(_native, specs._native, body._native); }
public void AppendAngularJoint(AngularJoint.Specs specs, Cluster body0, Body body1) { StoreAngularJointControlRef(specs); btSoftBody_appendAngularJoint4(_native, specs._native, body0._native, body1._native); }
void Init_ClusterRobot() { Vector3 basePos = new Vector3(0, 25, 8); SoftBody psb0 = Init_ClusterRobot_CreateBall(basePos + new Vector3(-8, 0, 0)); SoftBody psb1 = Init_ClusterRobot_CreateBall(basePos + new Vector3(+8, 0, 0)); SoftBody psb2 = Init_ClusterRobot_CreateBall(basePos + new Vector3(0, 0, +8 * (float)Math.Sqrt(2))); Vector3 ctr = (psb0.ClusterCom(0) + psb1.ClusterCom(0) + psb2.ClusterCom(0)) / 3; CylinderShape pshp = new CylinderShape(new Vector3(8, 1, 8)); RigidBody prb = LocalCreateRigidBody(50, Matrix.Translation(ctr + new Vector3(0, 5, 0)), pshp); LJoint.Specs ls = new LJoint.Specs(); ls.Erp = 0.5f; Body prbBody = new Body(prb); ls.Position = psb0.ClusterCom(0); psb0.AppendLinearJoint(ls, prbBody); ls.Position = psb1.ClusterCom(0); psb1.AppendLinearJoint(ls, prbBody); ls.Position = psb2.ClusterCom(0); psb2.AppendLinearJoint(ls, prbBody); BoxShape pbox = new BoxShape(20, 1, 40); RigidBody pgrn = LocalCreateRigidBody(0, Matrix.RotationZ(-(float)Math.PI / 4), pbox); }