## Make2PointSlide

### Introduced

v4.0

### Description

Uses two guide objects to create a two-point slide setup. A two-point slide setup consists of 'Bind' object and two control objects, 'Top' and 'Base' that control the Bind object by a two point constraint. Optionally the orientation of the Bind object can be controlled with an upvector, and constrained to avoid an implicit volume object (bounding volume).

### Scripting Syntax

    oPointSlide = Make2PointSlide( [Prefix], GuidePoint1, GuidePoint2, Parent1, Parent2, [UpVector], [BoundingVolume] );

### Return Value

Returns a PointSlide JScript object.

### Parameters

Parameter | Type | Description
--- | --- | ---
Prefix | String | The name prefix for the newly created slide nulls.
GuidePoint1 | String | 3D Object, whose pose will be assumed by the first slide object.
GuidePoint2 | String | 3D Object, whose pose will be assumed by the second slide object.
Parent1 | String | The parent under which the first slide object will be placed.
Parent2 | String | The parent under which the second slide object will be placed.
UpVector | String | An upvector object to control the orientation of the Binding Point.
BoundingVolume | String | A bounding volume implicit to stay outside of when sliding.

### Examples

#### JScript Example

    /*
            This example creates a two point slide where the bind null is bounding
            volume constrained and controlled by an upvector.
    */
    var Target1     = GetPrim("Null", "Target1", null);
    var Target2     = GetPrim("Null", "Target2", null);
    var Parent1     = GetPrim("Null", "Parent1", null);
    var Parent2     = GetPrim("Null", "Parent2", null);
    var UpVector    = GetPrim("Null", "UpV", null);
    var BoundingVol = GetPrim("Sphere", "BoundingVol" , null);
    //
    // Position the guide objects
    //
    var lXfm = Target1.Kinematics.Global.Transform;
    lXfm.SetTranslationFromValues(-2,0,0);
    Target1.Kinematics.Global.Transform = lXfm;
    lXfm.SetTranslationFromValues(-2,5,0);
    Target2.Kinematics.Global.Transform = lXfm;
    // upvector
    lXfm.SetTranslationFromValues(0,3,0);
    UpVector.Kinematics.Global.Transform = lXfm;
    var TwoPtSlide = Make2PointSlide("ABC",Target1,Target2,Parent1,Parent2,UpVector,BoundingVol);
    logmessage ("Data in the returned two point slide object:");
    logmessage ("-------------------------------------------");
    logmessage ("Bind Null : " + TwoPtSlide.BindNull);
    logmessage ("Top  Null : " + TwoPtSlide.TopNull);
    logmessage ("Base Null : " + TwoPtSlide.BaseNull);
    logmessage ("Constraint: " + TwoPtSlide.Constraint);
    logmessage ("Hidden    : " + TwoPtSlide.Hidden);
    logmessage ("Envelope  : " + TwoPtSlide.Envelope);
    //results of running this script:
    //INFO : "Data in the returned two point slide object:"
    //INFO : "-------------------------------------------"
    //INFO : "Bind Null : ABCBind"
    //INFO : "Top  Null : ABCTop"
    //INFO : "Base Null : ABCBase"
    //INFO : "Constraint: ABCBind.kine.2ptscns"
    //INFO : "Hidden    : ABCTop,ABCBase"
    //INFO : "Envelope  : ABCBind"

### See Also

MakeThighSlide