src/mathfunctions.cpp

changeset 1079
67c6e5d32e68
parent 1073
a0a0d581309b
child 1147
a26568aa3cce
equal deleted inserted replaced
1078:c72e3115a297 1079:67c6e5d32e68
93 93
94 // Calculate center vertex 94 // Calculate center vertex
95 for (LDObject* obj : objs) 95 for (LDObject* obj : objs)
96 { 96 {
97 if (obj->hasMatrix()) 97 if (obj->hasMatrix())
98 {
98 box << static_cast<LDMatrixObject*> (obj)->position(); 99 box << static_cast<LDMatrixObject*> (obj)->position();
100 }
99 else 101 else
100 box << obj; 102 {
103 for (int i = 0; i < obj->numVertices(); ++i)
104 box << obj->vertex(i);
105 }
101 } 106 }
102 107
103 return box.center(); 108 return box.center();
104 } 109 }
105 110

mercurial