I’m trying to learn more about transforming objects in OptiX. I’m following the example from OptiX Advanced Samples, optixIntro_03.
Referrring to the sphere in Application.cpp (around line 924), I’ve changed the values in the transformation matrix to an arbitrary rotation value (say 90 deg), thinking that would cause the sphere to be rotated 90 deg when the program is run. But it isn’t.
So instead of the transform matrix looking like this:
float trafoSphere[16] =
{
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 1.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
)
I’m changing it to look like this (90 deg rotation around the y-axis):
float trafoSphere[16] =
{
<b>0.0f</b>, 0.0f, <b>-1.0f</b>, 0.0f,
0.0f, 1.0f, 0.0f, 1.0f,
<b>1.0f</b>, 0.0f, <b>0.0f</b>, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
)
Am I going about this the wrong way? Can’t I simply modify the transformation matrix? Or should I look into rtGeometrySetMotionRange() & rtGeometrySetMotionSteps()?