|
Blender V5.0
|
Go to the source code of this file.
Functions | |
| BLI_INLINE float | D (const float *data, const int res[3], int x, int y, int z) |
| BLI_INLINE int | FLOORI (float x) |
| BLI_INLINE int64_t | _clamp (int a, int b, int c) |
| float | BLI_voxel_sample_trilinear (const float *data, const int res[3], const float co[3]) |
| BLI_INLINE int64_t _clamp | ( | int | a, |
| int | b, | ||
| int | c ) |
clamp function, cannot use the CLAMPIS macro, it sometimes returns unwanted results apparently related to gcc optimization flag -fstrict-overflow which is enabled at -O2
this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't).
Definition at line 39 of file voxel.cc.
References b, and BLI_INLINE.
Referenced by BLI_voxel_sample_trilinear().
| BLI_INLINE float D | ( | const float * | data, |
| const int | res[3], | ||
| int | x, | ||
| int | y, | ||
| int | z ) |
Definition at line 14 of file voxel.cc.
References BLI_INLINE, BLI_VOXEL_INDEX, CLAMP, data, x, y, and z().
| BLI_INLINE int FLOORI | ( | float | x | ) |
Definition at line 25 of file voxel.cc.
References BLI_INLINE, and x.
Referenced by BLI_voxel_sample_trilinear().