https://github.com/sinanislekdemir/ansic3d
Ansi-C 3D Library
https://github.com/sinanislekdemir/ansic3d
3d c math matrix matrix-calculations vector vector-math
Last synced: about 2 months ago
JSON representation
Ansi-C 3D Library
- Host: GitHub
- URL: https://github.com/sinanislekdemir/ansic3d
- Owner: sinanislekdemir
- License: gpl-3.0
- Created: 2017-07-15T20:12:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-27T11:29:58.000Z (over 6 years ago)
- Last Synced: 2025-03-24T05:01:43.431Z (2 months ago)
- Topics: 3d, c, math, matrix, matrix-calculations, vector, vector-math
- Language: C
- Size: 73.2 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansi C 3D Math Library
[](https://travis-ci.org/sinanislekdemir/ansic3d)
Some codes are derived from GLScene project (glscene.org)
I needed a basic ansi-c 3D library for another project of mine so I started
this project. I implemented my own needs within the library.Documenting the library in README is a heavy job so instead, best documentation
is the code itself. So you may find the needed information in header files.And for the use cases, you can refer to `tests/test.c`
## Installing
BBee Build tool is already inside the repo (https://github.com/sinanislekdemir/bbee)To compile the library (to build/libansic3d.a):
python bbee
To install the library:
python bbee --install
To compile and run the tests
python bbee --i=test.json
Or just run to compule and install the library and run the tests.
./build.sh
## Tests
$ bbee --i=test.json
Building using gcc
Collecting files
Building ./tests/test.c
Running build/test
TestCloneVector [OK]
TestAddVector [OK]
TestSubVector [OK]
TestScaleVector [OK]
TestCrossProduct [OK]
TestNormalizeVector [OK]
TestDivideVector [OK]
TestPerpendicularVector [OK]
TestRotateAroundX [OK]
TestRotateAroundY [OK]
TestRotateAroundZ [OK]
TestVectorLength [OK]
TestDotProduct [OK]
TestVectorNorm [OK]
TestVectorDistance [OK]
TestPlaceNormal [OK]
TestInitVectorList [OK]
TestPushVector [OK]
TestFreeVectorList [OK]
TestPopVector [OK]
TestRemoveLastVector [OK]
TestTrimVectorList [OK]
TestHomogeneousMatrix [OK]
TestCreateScaleMatrix [OK]
TestCreateTranslationMatrix [OK]
TestCreateScaleAndTranslationMatrix [OK]
TestCreateRotationMatrixX [OK]
TestCreateRotationMatrixY [OK]
TestCreateRotationMatrixZ [OK]
TestCreateRotationMatrix [OK]
TestMultiplyMatrix [OK]
TestVectorTransform [OK]
TestMatrixDeterminant [OK]
TestAdjointMatrix [OK]
TestScaleMatrix [OK]
TestInvertMatrix [OK]
TestTransposeMatrix [OK]
TestLookAtMatrix [OK]## Creator
sinan islekdemir | [email protected]
## Note
I only compiled the code under MacOs so let me know if it works for you too.