/// <summary>
    /// Either selects the node or sets a point for drawing depending on what the current pointer mode is
    /// </summary>
    public void VRTKUse()
    {
        Debug.Log("Gridnode USE");
        if (canUse)
        {
            switch (myPointerController.getPointerMode())
            {
            case pointerModes.draw: {
                bool shouldDeselect = myConstructorController.setPoint(this.transform.position, buildingObjects.Frame);
                if (shouldDeselect)
                {
                    //deselect all the nodes
                    mySelectionController.clearDrawNode();
                }
                else
                {
                    mySelectionController.setDrawNode(myGridNode);
                }
                canUse = false;
                break;
            }

            case pointerModes.selectNode: {
                myPointerController.selectionController.select(myGridNode);
                break;
            }
            }
        }
    }
Exemplo n.º 2
0
 void drawFrame(Vector3 p1, Vector3 p2, buildingObjects obj)
 {
     myConstructorController.setPoint(p1, obj);
     myConstructorController.setPoint(p2, obj);
 }
Exemplo n.º 3
0
    private void Update()
    {
        if (Input.GetKeyDown("d"))
        {
            Debug.Log("START DEBUG");
            drawGrid();
            populateDropdowns();
            Debug.Log("DEBUG Populated Dropdowns.");
            //testSections();
            mySectionController.SetCurrentFrameSection("Sec_Steel_I");
            Debug.Log("Current frame section: " + mySectionController.GetCurrentFrameSection().GetName());
            myConstructorController.setPoint(p4, buildingObjects.Frame);
            myConstructorController.setPoint(p5, buildingObjects.Frame);

            Debug.Log("DEBUG Tested Sections.");
            //testJoints();
            myConstructorController.createJointRestraint(p4, 'f');
            myConstructorController.createJointRestraint(p5, 'f');

            Debug.Log("DEBUG Tested Joints.");
            //testFrameDeletion();
            //Debug.Log("DEBUG Tested Frame Deletion.");
        }

        if (Input.GetKeyDown("r"))
        {
            frameName = "Frame_i=[" + p4.x + ":" + p4.z + ":" + p4.y + "]-j=[" + p5.x + ":" + p5.z + ":" + p5.y + "]";
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsSetupDeselectAllCasesAndCombosForOutput()");
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsSetupSetCaseSelectedForOutput(DEAD, true)");
            //mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsFrameJointForce(" + frameName + ", 0)");
            //mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsFrameForce(" + frameName + ", 0)");
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: customResultsGetFrameSpecialPointDispl(" + frameName + ")");
        }

        if (Input.GetKeyDown("v"))
        {
            myAnalysisController.visualizeDeformation(frameName, myAnalysisController.getLatestJointDisplResult());
        }
    }