Complex question for hard core 3D programmers !
I am manually drawing 3D lines on screens. I am NOT using the native X Y Z properties of Sprite.
private var displayCoordinates:Vector.<Number> = new Vector.<Number>;
private var displayMatrix:Matrix3D = new Matrix3D();
var pp:PerspectiveProjection = new PerspectiveProjection();
pp.projectionCenter = new Point(sizeX/2,sizeY/2);
displayMatrix = pp.toMatrix3D();
Utils3D.projectVectors(displayMatrix, worldVertices, displayCoordinates,uvts);
// draw on screen based displaycoordinates
No matter what values I put in pp.projectionCenter the Lines always center towards 0,0.
Put another way projectionCenterdoes not change the return value of pp.toMatrix3D()…ever;
I can manually correct this by looping over displayCoordinates and adding the X/2 and Y/2 but seems that I’m missing something important.
Any clues?
Stéphane