dymokomi/luce-geocore
Source of release 0.7.1
0.7.1 / src / core / geometry.lucb
import interop
from math.vector import Vector3
pub struct Vertex:
pub let position: Vector3
pub let normal: Vector3
pub let u: f64
pub let v: f64
## Optional linear RGB multiplier; white preserves existing materials.
pub let color: Vector3 = Vector3(1.0, 1.0, 1.0)
pub struct Bounds:
pub let minimum: Vector3
pub let maximum: Vector3
## Geometry storage is immutable after construction. Interface results own any
## backing storage required by a managed implementation; Base borrows until release.
pub interface Geometry:
func vertex_count() -> i64
func index_count() -> i64
func vertex(index: i64) -> interop.Outcome[Vertex]
func index(offset: i64) -> interop.Outcome[i64]
func bounds() -> Bounds