auts/object.v

37 lines
504 B
Coq
Raw Normal View History

2020-04-30 00:20:08 +02:00
module main
2020-04-30 14:02:14 +02:00
// Object bit
// size: 10x10x10 (?)
//
// XXX cannot be compound?
struct ObjectBit {
elem_type ElemType
}
2020-04-30 00:20:08 +02:00
struct Object {
mut:
name string
2020-04-30 00:34:02 +02:00
dim_x int // Approx.
2020-04-30 00:20:08 +02:00
dim_y int
dim_z int
elem &Elem // XXX use id/enum
// Position in the world
//pos_x int
//pos_y int
//pos_z int
// Flixible position in the world
transform &Transform
2020-04-30 14:02:14 +02:00
// Bits of object's voxel model
//bits [10][10]ObjectBit
2020-04-30 00:20:08 +02:00
}
fn new_object() &Object {
o := &Object{
transform: new_transform(),
}
2020-04-30 00:20:08 +02:00
return o
}