Exemplo n.º 1
0
    // Create the correct type of linkset for this child
    public static BSLinkset Factory(BSScene physScene, BSPrimLinkable parent)
    {
        BSLinkset ret = null;

        switch (parent.LinksetType)
        {
            case LinksetImplementation.Constraint:
                ret = new BSLinksetConstraints(physScene, parent);
                break;
            case LinksetImplementation.Compound:
                ret = new BSLinksetCompound(physScene, parent);
                break;
            case LinksetImplementation.Manual:
                // ret = new BSLinksetManual(physScene, parent);
                break;
            default:
                ret = new BSLinksetCompound(physScene, parent);
                break;
        }
        if (ret == null)
        {
            physScene.Logger.ErrorFormat("[BULLETSIM LINKSET] Factory could not create linkset. Parent name={1}, ID={2}", parent.Name, parent.LocalID);
        }
        return ret;
    }
Exemplo n.º 2
0
        // Create the correct type of linkset for this child
        public static BSLinkset Factory(BSScene physScene, BSPrimLinkable parent)
        {
            BSLinkset ret = null;

            switch (parent.LinksetType)
            {
            case LinksetImplementation.Constraint:
                ret = new BSLinksetConstraints(physScene, parent);
                break;

            case LinksetImplementation.Compound:
                ret = new BSLinksetCompound(physScene, parent);
                break;

            case LinksetImplementation.Manual:
                // ret = new BSLinksetManual(physScene, parent);
                break;

            default:
                ret = new BSLinksetCompound(physScene, parent);
                break;
            }
            if (ret == null)
            {
                physScene.Logger.ErrorFormat("[BULLETSIM LINKSET] Factory could not create linkset. Parent name={1}, ID={2}", parent.Name, parent.LocalID);
            }
            return(ret);
        }
Exemplo n.º 3
0
    // private static string LogHeader = "[BULLETSIM LINKSET]";

    // Create the correct type of linkset for this child
    public static BSLinkset Factory(BSScene physScene, BSPhysObject parent)
    {
        BSLinkset ret = null;
        /*
        if (parent.IsPhysical)
            ret = new BSLinksetConstraints(physScene, parent);
        else
            ret = new BSLinksetManual(physScene, parent);
         */

        // at the moment, there is only one
        ret = new BSLinksetConstraints(physScene, parent);

        return ret;
    }
Exemplo n.º 4
0
    // Create the correct type of linkset for this child
    public static BSLinkset Factory(BSScene physScene, BSPhysObject parent)
    {
        BSLinkset ret = null;

        switch ((int)BSParam.LinksetImplementation)
        {
            case (int)LinksetImplementation.Constraint:
                ret = new BSLinksetConstraints(physScene, parent);
                break;
            case (int)LinksetImplementation.Compound:
                ret = new BSLinksetCompound(physScene, parent);
                break;
            case (int)LinksetImplementation.Manual:
                // ret = new BSLinksetManual(physScene, parent);
                break;
            default:
                ret = new BSLinksetCompound(physScene, parent);
                break;
        }
        return ret;
    }
Exemplo n.º 5
0
        // Create the correct type of linkset for this child
        public static BSLinkset Factory(BSScene physScene, BSPhysObject parent)
        {
            BSLinkset ret = null;

            switch ((int)BSParam.LinksetImplementation)
            {
            case (int)LinksetImplementation.Constraint:
                ret = new BSLinksetConstraints(physScene, parent);
                break;

            case (int)LinksetImplementation.Compound:
                ret = new BSLinksetCompound(physScene, parent);
                break;

            case (int)LinksetImplementation.Manual:
                // ret = new BSLinksetManual(physScene, parent);
                break;

            default:
                ret = new BSLinksetCompound(physScene, parent);
                break;
            }
            return(ret);
        }