Suppose I have the following Camera class (Kotlin):

data class Camera2D(val matrix: Matrix) {
    
    fun translation(): Vector2F { /* ... */ }
    
    fun rotation(): Vector2F { /* ... */ }
    
    fun scale(): Vector2F { /* ... */ }
    
    fun translate(vector: Vector2F): Camera2D { /* ... */ }
    
    fun rotate(vector: Vector2F): Camera2D { /* ... */ }
    
    fun scale(vector: Vector2F): Camera2D { /* ... */ }
}

How can I store, update and retrieve the transformation values of that camera just so they are correctly reflected in the matrix field?

0

There are 0 answers