World to View matrix from Z up right-hand to Y up left-hand

position.x = (-1) * rightVector.dotProduct( orgin );
position.y = (-1) * lookVector.dotProduct( orgin );
position.z = (-1) * upVector.dotProduct( orgin );

_viewMtx.identity();

var data:Vector. = _rotateMtx.rawData;

// inverse mtx, and then Z up Y-Z plane to Y up Z-Y plane.
_viewMtx.copyRawDataFrom(
                Vector.(
                    [    data[0], data[8],  data[4], 0.0,
                        data[1], data[9],  data[5], 0.0,
                        data[2], data[10],  data[6], 0.0,
                        position.x, position.z,  position.y, 1.0 ] )
            );       

Comments

Popular posts from this blog

董事長您好

After reading Steve Jobs Autobiography

Drawing textured cube with Vulkan on Android