public Joint(Link parentLink, Vector3 position, double minValue, double maxValue, double velocity) { this.parentLink = parentLink; this.position = position; this.minValue = minValue; this.maxValue = maxValue; this.velocity = velocity; setPending(); }
private void DrawLink(Link link) { Matrix[] transforms = new Matrix[link.Model.Bones.Count]; link.Model.CopyBoneTransformsTo(transforms); foreach (ModelMesh mesh in link.Model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.View = camera.View; effect.Projection = camera.Projection; effect.World = transforms[mesh.ParentBone.Index] * link.Transform; mesh.Draw(); } } }
public RevoluteJoint(Link parentLink, Vector3 position, float angle, Vector3 axis, double minValue, double maxValue, double velocity) : base(parentLink, position, minValue, maxValue, velocity) { this.Value = angle; this.axis = axis; }
public bool IsColliding(Link link) { if (link.Intersects(obb)) { if (octree != null) { foreach (OctreeNode oct in octree) { bool collision = oct.IsColliding(link); if (collision) return true; } } else { foreach (TriangleData tri in triangles) { if (link.Intersects(tri)) { return true; } } } } return false; }
public PrismaticJoint(Link parentLink, Vector3 position, float displacement, Vector3 axis, double minValue, double maxValue, double velocity) : base(parentLink, position, minValue, maxValue, velocity) { this.Value = displacement; this.axis = axis; }