| 161 | _w = cls >> "w"; |
| 162 | _h = cls >> "h"; |
| 163 | } |
| 164 | |
| 165 | void Control::Move(float dx, float dy) |
| 166 | { |
| 167 | _x += dx; |
| 168 | _y += dy; |
| 169 | } |
| 170 | |
| 171 | DrawCoord SceneToScreen(Vector3Par pos); |
| 172 | |
| 173 | void Control::UpdateInfo(ControlObject* object, ControlInObject& info) |
| 174 | { |
| 175 | Vector3 posTL = object->PositionModelToWorld(info.posTL); |
| 176 | Vector3 posBR = object->PositionModelToWorld(info.posBR); |
| 177 | Vector3Val position = object->Position(); |
| 178 | Vector3Val posBase = object->GetBasePosition(); |
| 179 | |
| 180 | float dz = 0.5 * (posTL.Z() + posBR.Z() - 2.0 * position.Z()); |
| 181 | float scale = (posBase.Z() + dz) / (position.Z() + dz); |
| 182 |
no test coverage detected