(float r)
| 259 | return s; |
| 260 | } |
| 261 | |
| 262 | public State translateUp(float r) { |
| 263 | State s = copy(); |
| 264 | Vec3 left = up; |
| 265 | left = left.normalize(); |
| 266 | left.mul((float) position.distance(target)); |
| 267 | s.position.x += left.x * r; |
| 268 | s.position.y += left.y * r; |
| 269 | s.position.z += left.z * r; |
| 270 | s.target.x += left.x * r; |
| 271 | s.target.y += left.y * r; |
| 272 | s.target.z += left.z * r; |
| 273 | return s; |
| 274 | } |
| 275 | |
| 276 | public Vec3 position(float stereoSide) { |