Releases: recp/cglm
v0.7.3: Print Functions Update
Bugfixes and Improvements:
- suppress documentation warnings
- remove redundant typedef
- fix print functions to align column correctly
New Features:
Print Functions Improvements
-
While printing, mis-alignment of columns are fixed: larger numbers are printed via %g and others are printed via %f Column withs are calculated before print.
-
Now values are colorful ;)
-
New options with default values:
#define CGLM_PRINT_PRECISION 5
#define CGLM_PRINT_MAX_TO_SHORT 1e5
#define CGLM_PRINT_COLOR "\033[36m"
#define CGLM_PRINT_COLOR_RESET "\033[0m"
- Inline prints are only enabled in DEBUG mode and if CGLM_DEFINE_PRINTS is defined.
- You can still call library-print functions e.g. glmc_print...
To make codes unbroken, cglm makes inline print functions to be empty-body (if DEBUG and CGLM_DEFINE_PRINTS are not defined):
CGLM_INLINE void glm_mat4_print(mat4 matrix, FILE *o) { }
compiler must eliminate this empty inline function calls. This also can be disabled by defining CGLM_NO_PRINTS_NOOP
macro. 🎉
Define CGLM_PRINT_PRECISION
to change print precision, default is increased to 5 from 4 ...
v0.7.2: CMake Integration and Ray Intersection Update
Bugfixes and Improvements:
- fix glms_sphere_transform by using mat4s instead of mat4 (#121) ( thanks to @Zollerboy1 )
- fix glms_vec2_rotate() by using a dest vec2s instead of taking an axis ( thanks to @Zollerboy1 )
- fix some documentation mistakes ( thanks to @Uwila )
- remove redundant forward decelerations
- use glm_clamp_zo in some places to clamp between 0 and 1
- make Github recognize header language as C (#127) ( thanks to @Uwila )
- [README] link contributors' avatars to the correct page ( thanks to @Uwila )
- and some forgotten big or small fixes maybe :) ( thanks to all )
New Features:
-
ray-triangle intersection ( many thanks to @Uwila )
-
CMake build support ( many thanks to @FMMazur and @realaltffour )
Now we can build cglm with CMake and can integrate with other CMake projects.CMake options:
option(CGLM_SHARED "Shared build" ON)
option(CGLM_STATIC "Static build" OFF)
option(CGLM_USE_C99 "" OFF) # C11
option(CGLM_USE_TEST "Enable Tests" OFF) # for make check - make test
there may be some bugs in CMake configurations, it will be improved by time.
feel free to suggest new features, improvements and fix things by creating issues or pull requests.
v0.7.1: Critical Build Bugfix
- build: add missing headers
- helper to swap two float values
v0.7.0: vec2 and mat2 update
New Features:
- Now vec2 and mat2 are officially supported (including struct api) 🎉 ( #97 )
- add forward vector as macro (vec3, RH)
Bugfixes and Improvements:
- quat: fix
quat_for
andquat_forp
implementations; These are identical toQuaternionLook
/LookRotation
in other frameworks/engines... - add notes for versor/quaternion type to describe memory layout
- merge test sources into one C source
- make plane zero if norm is zero after normalization
- Add more tests
Since vec2 and mat2 are new features, bugs may occurs. Any feedback or help would be appreciated.
v0.6.2: Bug-fixes for Windows MSC compiler
- Now tests can be run on Windows too. Just run cglm-test project.
- Anonymous structs are enabled for MSC >=1900 (Visual Studio 2015+)
- win: fix glms_quat_imagn if use_struct option is disabled
v0.6.1: Custom/Built-in Test Suite and Improvements
New Features:
- Custom Built-in Unit Test Suite: Now we have custom test suite which don't require external dependencies. It is very cool and simple to implement
- Helpers for apple's simd library (#107)
- mat4: add zero for call
Bugfixes and Improvements:
- Add more tests
- Remove build-deps.sh
- Remove cmocka from submodules and update docs
- quat: fix glmc_quat_normalize()
- vec: fix min/max for compiled vec3
- arm: fix type castings for ARM Neon
- vec4: fix parameter name for NEON
- build: remove duplicate entry in makefile
- Change empty prototypes to (void) ( @hartenfels )
- Add a vec2s struct type for consistency ( @hartenfels )
- Don't add default autoconf flags to build ( @hartenfels )
- [major change] Use gnu11 instead of gnu99 ( @hartenfels )
- and some other bugfixes and improvements made by @hartenfels
- Fix spelling error in name of glms_rotate_x ( @jdolan )
Now cglm don't require external dependencies and it has very cool test suite 🎉
v0.6.0: Struct API and New Features
New API: Structs ( thanks to @acoto87 ) (#80)
cglm now supports structs. To use struct api, just include cglm/struct.h
header. You can also use struct api with array api. Struct api provides type-safety. Currently struct parameters are pass-by-value but in the future it may be pass-by-reference by using pointers (feedbacks are welcome by creating issues).
New Features and Improvements:
- swizzling api: now cglm supports swizzling
- Find post-build.sh even when not building in. ( @hartenfels )
- quat: fix
glm_quat_axis
axis parameter type - win: remove optional DLLMain entry point
- new name for euler sequence (#94) ( @superbigio )
- squared distance with SIMD support (#96) ( @superbigio )
- glm_lerpc(), glm_step(), glm_smoothstep(), glm_smoothinterp() (#98) ( @superbigio )
- added glm_vec_fill() (#100) ( @superbigio )
- swapped argument order in glmm_store3() (#102) ( @superbigio )
- vec: some useful functions (#103) ( @superbigio )
- quat: fix identity quat in
glm_quat_normalize_to
(#88) ( @yushli ) - and some minor changes...
New glmm (SIMD) functions: (thanks to @superbigio )
glmm_norm2(v)
squared l2 normglmm_vhmin(v)
horizontal minglmm_vhmax(v)
horizontal maxglmm_norm_one(v)
l1 normglmm_norm_inf(v)
infinity norm
v0.5.4: Bug fixes and Improvements
Bug fixes and Improvements:
- improve vec3 alignment ( @haxpor )
- Add missing header for size_t ( @acoto87 )
- move common headers to
common.h
- Fix
glm_vec4_distance
for armv7 and improve for SSE2 ( @haxpor ) - ci: print test logs after failure
- fix
glm_quat_normalize_to
( @yushli ) - improve docs
- fix build scripts
- fix linking cmocka
- fix build script if folder names contain spaces
v0.5.3: memory and improvements
Improvements:
- drop
glm__memcpy
,glm__memset
andglm__memzero
- copy matrix items manually in _ucopy functions
- update docs
New Functions:
float glm_mat3_rmc(vec3 r, mat3 m, vec3 c)
multiplies row vector, matrix and column vector and returns scalar.glm_mat3_zero(mat3 mat)
,glm_mat4_zero(mat4 mat)
make given matrix zero.
v0.5.2: SIMD Update + New Features
New Options:
CGLM_SSE4_DOT
: Enable SSE4 dot productCGLM_SSE3_DOT
: Enable SSE3 dot product
New Functions:
glm_persp_move_far()
extend frustum's far distancevoid glm_vec4_cubic(float s, vec4 dest)
fills vec4 as [s^3, s^2, s, 1.0]float glm_mat4_rmc(vec4 r, mat4 m, vec4 c)
multiplies row vector, matrix and column vector and returns scalar. This is good helper to get SMC result easily for curves.float glm_smc(float s, mat4 m, vec4 c)
calculates SMC multiplication by usingglm_mat4_rmc()
andglm_vec4_cubic()
float glm_bezier()
cubic bezier equationfloat glm_hermite()
cubic hermite equationfloat glm_decasteljau()
solve cubic bezier equation using decasteljau
New glmm (SIMD) functions:
glmm_vhadds(v)
horizontal add, returns registerglmm_hadd(v)
horizontal add, returns scalarglmm_vdots(a, b)
dot product, single lane contain dot product to convert result to scalarglmm_vdot(a, b)
dot product, all lanes contain dot product to use result with other vector operations
Improvements:
glmm_
functions are moved to platform specific headers.- Now some glmm_ functions supports NEON
- CGLM_SIMD_x86, CGLM_SIMD_ARM and CGLM_SIMD are defined if it is supported.