| 40 | : Component{game_object, gl_canvas} {} |
| 41 | |
| 42 | Camera::~Camera() noexcept { |
| 43 | // Clear local transform state only. Do not reset the owning GameObject's |
| 44 | // pose here: temporary Camera copies (e.g. icon rendering) share the |
| 45 | // same GameObject and must not clobber its matrix on destruction. |
| 46 | zoom_power_ = 0.0f; |
| 47 | camera_pos_x_ = 0.0f; |
| 48 | camera_pos_y_ = 0.0f; |
| 49 | canvas_width_ = 0; |
| 50 | canvas_height_ = 0; |
| 51 | mouse_position_ = vec4::zero(); |
| 52 | projection_.set_identity(); |
| 53 | scale_.set_identity(); |
| 54 | } |
| 55 | |
| 56 | Camera::Camera(const Camera& cam) |
| 57 | : Component{cam}, projection_{cam.projection_}, |
nothing calls this directly
no test coverage detected