If camera location is (0,0,150) in world space. And if I try to transform world origin(0,0,0,1) to view space with .applyMatrix4(shadowCamera.matrixWorldInverse);
I am getting transformed vector as(0,0,-300,1). However the world origin in view space should be (0,0,-150,1.0). the z value of -300 will only be possible if view matrix is written & thus applied row major. In documentation it is written that matrix are written column major. Then why I am getting wrong results.
Code :
org2 = new THREE.Vector4(0,0,0,1.0);
shadowCamera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1., 2000 );
shadowCamera.position.set(0,0,150);
//below code is in animate() function
org2.applyMatrix4(shadowCamera.matrixWorldInverse);
console.log(shadowCamera.matrixWorldInverse);
console.log(org2);
Console log:
also why are z values different for vector when shown as vector (0,0,-300,1) and when shown individually as w,x,y,z where z is -252900 on console is different.
What am I missing here or doing wrong?