MCPcopy Create free account
hub / github.com/RenderKit/embree / getRandomTransform

Function getRandomTransform

tutorials/verify/verify.cpp:3124–3130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3122
3123 template<>
3124 AffineSpace3fa getRandomTransform(VerifyApplication::Test* test)
3125 {
3126 Vec3fa dx = 25.f * (Vec3fa(-1.f, -1.f, -1.f) + test->random_Vec3fa() * Vec3fa(2.f, 2.f, 2.f));
3127 Vec3fa scale = Vec3fa( 0.5f, 0.5f, 0.5f) + test->random_Vec3fa() * Vec3fa(1.5f, 1.5f, 1.5f);
3128 Vec3fa rotate = normalize(Vec3fa(-1.f, -1.f, -1.f) + test->random_Vec3fa() * Vec3fa(2.f, 2.f, 2.f));
3129 return AffineSpace3fa::translate(Vec3fa(dx)) * AffineSpace3fa::scale(scale) * AffineSpace3fa::rotate(rotate, test->random_float() * 2.f * M_PI);
3130 }
3131
3132 template<>
3133 AffineSpace3f getRandomTransform(VerifyApplication::Test* test)

Callers

nothing calls this directly

Calls 12

rotateFunction · 0.85
random_Vec3faMethod · 0.80
random_floatMethod · 0.80
Vec3faClass · 0.50
normalizeFunction · 0.50
sqrtFunction · 0.50
sinFunction · 0.50
cosFunction · 0.50

Tested by

no test coverage detected