[vtkusers] Weird 3D result deducted by setting actor.UserMatrix manually.

superzz jxdw_zlf at yahoo.com.cn
Mon Jan 11 23:53:22 EST 2010


My program is servered as a 3D renderer with actor wold calculated by another
program. So I need to manually set actor world by actor->SetUserMatrix.

But it results a weird result. The screenshot is taken by rendering a sphere
with the world specified.

It seems that only part of sphere edge is shown. When applying the world to
vtkVolume, it completely renders nothing to screen.

The world value is specified by 

            vtkMatrix4x4 worldMatrix = vtkMatrix4x4::New();
            worldMatrix->SetElement(0, 3, 0.1121497);
            worldMatrix->SetElement(1, 3, 0.08815035);
            worldMatrix->SetElement(2, 3, -0.08844081);
            worldMatrix->SetElement(3, 3, 1);


            worldMatrix->SetElement(0, 0, -0.0008999974);
            worldMatrix->SetElement(1, 0, -2.600985E-09);
            worldMatrix->SetElement(2, 0, 1.529991E-06);
            worldMatrix->SetElement(3, 0, 0);

            worldMatrix->SetElement(0, 1, 1.69999E-06);
            worldMatrix->SetElement(1, 1, -1.69999E-06);
            worldMatrix->SetElement(2, 1, 0.0009999943);
            worldMatrix->SetElement(3, 1, 0);

            worldMatrix->SetElement(0, 2, -2.889984E-09);
            worldMatrix->SetElement(1, 2, -0.0009999971);
            worldMatrix->SetElement(2, 2, -1.69999E-06);
            worldMatrix->SetElement(3, 2, 0);

            worldMatrix->SetElement(0, 3, 0.09686619);
            worldMatrix->SetElement(1, 3, 0.08823382);
            worldMatrix->SetElement(2, 3, -0.07871468);
            worldMatrix->SetElement(3, 3, 1);

http://old.nabble.com/file/p27122648/sphere.JPG sphere.JPG 

Thanks!

superZZ
-- 
View this message in context: http://old.nabble.com/Weird-3D-result-deducted-by-setting-actor.UserMatrix-manually.-tp27122648p27122648.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list