MyGit

v0.8.6

recp/cglm

版本发布时间: 2022-10-24 01:35:23

recp/cglm最新发布版本:v0.9.4(2024-04-01 23:10:19)

Now we have post transform functions which is similar to existing transform function but with different multiplication order.

New Features


new affine functions:


Current implementations apply transforms to vector first, but sometimes we may need to apply rotations as last transform, cglm introduces post-transform operations e.g. apply rotation/translate last instead of first to vector.

Post transform function have similar names with existing ones with ed suffix:


new project functions:


new ivec functions ( thanks to @Chris-F5 ):

void  glm_ivec2(int * __restrict v, ivec2 dest);
void  glm_ivec2_copy(ivec2 a, ivec2 dest);
void  glm_ivec2_zero(ivec2 v);
void  glm_ivec2_one(ivec2 v);
void  glm_ivec2_add(ivec2 a, ivec2 b, ivec2 dest);
void  glm_ivec2_adds(ivec2 v, int s, ivec2 dest);
void  glm_ivec2_sub(ivec2 a, ivec2 b, ivec2 dest);
void  glm_ivec2_subs(ivec2 v, int s, ivec2 dest);
void  glm_ivec2_mul(ivec2 a, ivec2 b, ivec2 dest);
void  glm_ivec2_scale(ivec2 v, int s, ivec2 dest);
int   glm_ivec2_distance2(ivec2 a, ivec2 b);
float glm_ivec2_distance(ivec2 a, ivec2 b);
void  glm_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest);
void  glm_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest);
void  glm_ivec2_clamp(ivec2 v, int minVal, int maxVal);

void  glm_ivec3(ivec4 v4, ivec3 dest);
void  glm_ivec3_copy(ivec3 a, ivec3 dest);
void  glm_ivec3_zero(ivec3 v);
void  glm_ivec3_one(ivec3 v);
void  glm_ivec3_add(ivec3 a, ivec3 b, ivec3 dest);
void  glm_ivec3_adds(ivec3 v, int s, ivec3 dest);
void  glm_ivec3_sub(ivec3 a, ivec3 b, ivec3 dest);
void  glm_ivec3_subs(ivec3 v, int s, ivec3 dest);
void  glm_ivec3_mul(ivec3 a, ivec3 b, ivec3 dest);
void  glm_ivec3_scale(ivec3 v, int s, ivec3 dest);
int   glm_ivec3_distance2(ivec3 a, ivec3 b);
float glm_ivec3_distance(ivec3 a, ivec3 b);
void  glm_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest);
void  glm_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest);
void  glm_ivec3_clamp(ivec3 v, int minVal, int maxVal);

void  glm_ivec4(ivec3 v3, int last, ivec4 dest);
void  glm_ivec4_copy(ivec4 a, ivec4 dest);
void  glm_ivec4_zero(ivec4 v);
void  glm_ivec4_one(ivec4 v);
void  glm_ivec4_add(ivec4 a, ivec4 b, ivec4 dest);
void  glm_ivec4_adds(ivec4 v, int s, ivec4 dest);
void  glm_ivec4_sub(ivec4 a, ivec4 b, ivec4 dest);
void  glm_ivec4_subs(ivec4 v, int s, ivec4 dest);
void  glm_ivec4_mul(ivec4 a, ivec4 b, ivec4 dest);
void  glm_ivec4_scale(ivec4 v, int s, ivec4 dest);
int   glm_ivec4_distance2(ivec4 a, ivec4 b);
float glm_ivec4_distance(ivec4 a, ivec4 b);
void  glm_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest);
void  glm_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest);
void  glm_ivec4_clamp(ivec4 v, int minVal, int maxVal);

Bugfixes and Improvements:

Sponsorship: Consider become a sponsor for cglm

Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:

https://github.com/sponsors/recp https://opencollective.com/cglm#backer https://patreon.com/recp

相关地址:原始地址 下载(tar) 下载(zip)

查看:2022-10-24发行的版本