Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrismaticUniversal"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public PrismaticUniversal(World world, JointGroup group)
     : base(NativeMethods.dJointCreatePU(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotor1 = new PrismaticUniversalLimitMotor(this, 0);
     limitMotor2 = new PrismaticUniversalLimitMotor(this, 1);
     limitMotor3 = new PrismaticUniversalLimitMotor(this, 2);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinearMotor"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public LinearMotor(World world, JointGroup group)
     : base(NativeMethods.dJointCreateLMotor(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotor1 = new LinearMotorLimitMotor(this, 0);
     limitMotor2 = new LinearMotorLimitMotor(this, 1);
     limitMotor3 = new LinearMotorLimitMotor(this, 2);
 }
Esempio n. 3
0
        internal Joint(dJointID joint, World world, JointGroup group)
        {
            id     = joint;
            handle = GCHandle.Alloc(this);
            NativeMethods.dJointSetData(id, GCHandle.ToIntPtr(handle));
            id.Owner = world;

            if (group != null)
            {
                group.Add(this);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Piston"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Piston(World world, JointGroup group)
     : base(NativeMethods.dJointCreatePiston(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotorP = new PistonLimitMotor(this, 0);
     limitMotorR = new PistonLimitMotor(this, 1);
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Contact"/> class.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="contact">
 /// A structure containing information about the contact point and
 /// colliding surfaces.
 /// </param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Contact(World world, ContactInfo contact, JointGroup group)
     : base(NativeMethods.dJointCreateContact(world.Id, dJointGroupID.Null, ref contact), world, group)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrismaticRotoide"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public PrismaticRotoide(World world, JointGroup group)
     : base(NativeMethods.dJointCreatePR(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotor1 = new PrismaticRotoideLimitMotor(this, 0);
     limitMotor2 = new PrismaticRotoideLimitMotor(this, 1);
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Plane2D"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Plane2D(World world, JointGroup group)
     : base(NativeMethods.dJointCreatePlane2D(world.Id, dJointGroupID.Null), world, group)
 {
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Ball"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Ball(World world, JointGroup group)
     : base(NativeMethods.dJointCreateBall(world.Id, dJointGroupID.Null), world, group)
 {
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Slider"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Slider(World world, JointGroup group)
     : base(NativeMethods.dJointCreateSlider(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotor = new SliderLimitMotor(this, 0);
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DoubleHinge"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public DoubleHinge(World world, JointGroup group)
     : base(NativeMethods.dJointCreateDHinge(world.Id, dJointGroupID.Null), world, group)
 {
 }
Esempio n. 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Hinge"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Hinge(World world, JointGroup group)
     : base(NativeMethods.dJointCreateHinge(world.Id, dJointGroupID.Null), world, group)
 {
     limitMotor = new HingeLimitMotor(this, 0);
 }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Transmission"/> class on
 /// the specified <see cref="JointGroup"/>.
 /// </summary>
 /// <param name="world">The world on which to place the joint.</param>
 /// <param name="group">The joint group that will contain the joint.</param>
 public Transmission(World world, JointGroup group)
     : base(NativeMethods.dJointCreateTransmission(world.Id, dJointGroupID.Null), world, group)
 {
 }