Example #1
0
 protected void SelectAction(bool isHit, RaycastHit hitInfo)
 {
     if (isHit == true) {
         hitTr = hitInfo.transform;
         if (isExtruding == false) {
             if (selectionState == SelectionState.Vertex) {
                 hitPoint = hitTr.GetComponent<Point>();
                 if (hitPoint != null) {
                     hitPoint.SetPointEnabled(true);
                 }
             }
             if (selectionState == SelectionState.Face) {
                 hitPrimitiveObject = hitTr.GetComponent<PrimitiveObject>();
                 if (hitPrimitiveObject != null && hitPrimitiveObject.IsSelected == false) {
                     hitPrimitiveObject.SetColor(Color.red);
                 }
             } else if (selectionState == SelectionState.Object) {
                 hitPrimitiveObject = hitTr.GetComponent<PrimitiveObject>();
                 if (hitPrimitiveObject != null && hitPrimitiveObject.IsSelected == false) {
                     hitPrimitiveObject.GetCompound().SetColor(Color.red);
                 }
             }
         }
     }
 }
Example #2
0
    public void SetColor(Color c)
    {
        for (int i = 0; i < primObjectList.Count; i++)
        {
            PrimitiveObject po = primObjectList[i];

            po.SetColor(c);
        }
    }