False if no valid position found.
55 {
56 radius = 2.0;
57
58 if (
m_Parent.MemoryPointExists(namedSelection))
59 {
61 string memRadiusSelection = "" + namedSelection + "_radius";
62 if (
m_Parent.MemoryPointExists(memRadiusSelection))
63 {
66 }
67
68 return true;
69 }
70 else
71 {
73 m_Parent.GetActionComponentsForSelectionName(
m_Parent.GetViewGeometryLevel(),namedSelection,ost);
74
75 if (ost.Count() == 0)
76 return false;
77
78 bool validPosFilled = false;
80 foreach (int comp : ost)
81 {
82 if (!validPosFilled)
83 {
85 validPosFilled = true;
86 }
87 else
88 {
90 }
91 }
92
93 position = tmpPos * (1 / ost.Count());
94 return true;
95 }
96 }
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.