Ejemplo n.º 1
0
    /// <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;
            }
            }
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Called when a frame is selected with the selection tool
    /// </summary>
    public void onVRTKUse()
    {
        if (canUse)
        {
            switch (myPointerController.getPointerMode())
            {
            case pointerModes.draw:
            case pointerModes.selectNode: {
                break;
            }

            case pointerModes.selectFrame: {
                mySelectionController.select(myFrame);
                break;
            }
            }
        }
    }