Ed_
f76ba4e9ba
There is now a 2D camera in the workspace! We have a basic 'Frame' definition. It doesn't have any interaction yet... I started to define spacial math, mostly for doing conversion and getting a grounding on pixel/points/cm reference. The world space is in cm.
39 lines
437 B
Odin
39 lines
437 B
Odin
package sectr
|
|
|
|
import "core:math/linalg"
|
|
|
|
Vec2 :: linalg.Vector2f32
|
|
Vec3 :: linalg.Vector3f32
|
|
|
|
|
|
|
|
|
|
|
|
when false {
|
|
// TODO(Ed) : Evaluate if this is needed
|
|
|
|
Vec2 :: Vec2_f32
|
|
Vec2_f32 :: struct #raw_union {
|
|
basis : [2] f32,
|
|
using components : struct {
|
|
x, y : f32
|
|
}
|
|
}
|
|
|
|
// make_vec2 :: proc ( x, y : f32 ) {
|
|
|
|
// }
|
|
|
|
Vec3 :: Vec3_f32
|
|
Vec3_f32 :: struct #raw_union {
|
|
basis : [3] f32,
|
|
using components : struct {
|
|
x, y, z : f32
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|