Skip to content

ashalkhakov/atscntrb-as-ats3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATS3D

ATS3D is a low-dimensional vector algebra library for ATS2. With a small rasterizer based on it.

Features

  • 2- 3- and 4-dimensional vectors
  • 3x3- and 4x4-dimensional matrices
  • function templates for iterating over components of a vector
  • quaternion

Usage examples

Working with 3D vectors:

var a : vec3f
val () = a.init (~1.0f)
var b : vec3f
val () = b.init (1.0f, 0.0f, 0.0f)
val () = println!("a.x = ", a.x())
var c = a + b
val () = println!("c = ", c)

Running tests

Simply run make in src/TEST.

Some results

Gouraud-shaded, untextured Wavefront OBJ meshes rendered using test04.exe:

  • cow2
  • african_head

License

Distributed under the 3-clause BSD (see the LICENSE file)

Mesh files are copyright their respective owners.

--Artyom Shalkhakov

About

3D vector algebra library for ATS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published