c# - How to mirror a Matrix3D? -
i want mirror drawing.
i need mirror matrix3d think... don't have clue this.
i tried this:
var transformation = scenecamera.transformationmatrix; var invertedtransformation = transformation; invertedtransformation.invert(); var trans = transform3d.identity.value * transformation * invertedtransformation;
but doesn't work.
as see in image drawing in report has mirrored.
thanks in advance!
to "mirror" model can either mirror camera transformation, or mirror objects transformation. mirroring in camera give effect of mirroring picture. mirroring model mirror object in world, regardless of @ from.
to mirror camera in x-direction, multiply camera transform matrix has -1 x component , 1 other scalings. may have offset camera since mirroring may have moved object out of view, depending on how camera transform set begin with.
var cameratrans = scenecamera.transformationmatrix; cameratrans.scale(new vector3d(-1, 1, 1));
Comments
Post a Comment