mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
@@ -103,6 +103,10 @@ namespace bx
|
||||
|
||||
inline void generateSphereHammersley(void* _data, uint32_t _stride, uint32_t _num, float _scale)
|
||||
{
|
||||
// Reference(s):
|
||||
// - Sampling with Hammersley and Halton Points
|
||||
// https://web.archive.org/web/20190207230709/http://www.cse.cuhk.edu.hk/~ttwong/papers/udpoint/udpoints.html
|
||||
|
||||
uint8_t* data = (uint8_t*)_data;
|
||||
|
||||
for (uint32_t ii = 0; ii < _num; ii++)
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
|
||||
namespace bx
|
||||
{
|
||||
// http://drdobbs.com/article/print?articleId=210604448&siteSectionName=
|
||||
// Reference(s):
|
||||
// - Writing Lock-Free Code: A Corrected Queue
|
||||
// https://web.archive.org/web/20190207230604/http://www.drdobbs.com/parallel/writing-lock-free-code-a-corrected-queue/210604448
|
||||
//
|
||||
inline SpScUnboundedQueue::SpScUnboundedQueue(AllocatorI* _allocator)
|
||||
: m_allocator(_allocator)
|
||||
, m_first(BX_NEW(m_allocator, Node)(NULL) )
|
||||
|
||||
@@ -115,7 +115,11 @@
|
||||
|
||||
/// The return value of the function is solely a function of the arguments.
|
||||
///
|
||||
#define BX_CONSTEXPR_FUNC constexpr BX_CONST_FUNC
|
||||
#if BX_COMPILER_MSVC && (BX_COMPILER_MSVC <= 1900)
|
||||
# define BX_CONSTEXPR_FUNC BX_CONST_FUNC
|
||||
#else
|
||||
# define BX_CONSTEXPR_FUNC constexpr BX_CONST_FUNC
|
||||
#endif // BX_COMPILER_MSVC && (BX_COMPILER_MSVC <= 1900)
|
||||
|
||||
///
|
||||
#define BX_STATIC_ASSERT(_condition, ...) static_assert(_condition, "" __VA_ARGS__)
|
||||
|
||||
@@ -67,9 +67,7 @@ namespace bx
|
||||
template <typename Ty>
|
||||
bx::Vec3 randUnitHemisphere(Ty* _rng, const bx::Vec3& _normal);
|
||||
|
||||
/// Sampling with Hammersley and Halton Points
|
||||
/// http://www.cse.cuhk.edu.hk/~ttwong/papers/udpoint/udpoints.html
|
||||
///
|
||||
/// Sampling with Hammersley and Halton Points.
|
||||
void generateSphereHammersley(void* _data, uint32_t _stride, uint32_t _num, float _scale = 1.0f);
|
||||
|
||||
/// Fisher-Yates shuffle.
|
||||
|
||||
Reference in New Issue
Block a user