public class MatrixMath extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.joml.Matrix4f |
affine(net.imglib2.realtransform.AffineTransform3D affine,
org.joml.Matrix4f matrix)
Apply a
AffineTransform3D to the specified matrix. |
static org.joml.Vector4f |
homogPlane(net.imglib2.algorithm.kdtree.HyperPlane plane) |
static net.imglib2.algorithm.kdtree.HyperPlane |
hyperPlane(org.joml.Vector4f plane) |
static org.joml.Matrix4f |
perspective(double dCam,
double dClipNear,
double dClipFar,
double screenWidth,
double screenHeight,
double screenPadding,
org.joml.Matrix4f matrix)
Setup projection frustum transformation such that the (BDV) screen plane at distance
dCam exactly touches the frustum sides. |
static org.joml.Matrix4f |
screen(double dCam,
double screenWidth,
double screenHeight,
org.joml.Matrix4f matrix)
Set
matrix to the "bdv screen transformation":
translate the origin from the upper-left corner to the center of the screen (in XY). |
static org.joml.Matrix4f |
screenPerspective(double dCam,
double dClipNear,
double dClipFar,
double screenWidth,
double screenHeight,
double screenPadding,
org.joml.Matrix4f matrix)
Setup view and projection frustum transformation such that a camera looks at (the center of) the (BDV) screen plane.
|
static org.joml.Matrix4f |
screenPerspective(double dCam,
double dClip,
double screenWidth,
double screenHeight,
double screenPadding,
org.joml.Matrix4f matrix)
Setup view and projection frustum transformation such that a camera looks at (the center of) the (BDV) screen plane.
|
public static org.joml.Vector4f homogPlane(net.imglib2.algorithm.kdtree.HyperPlane plane)
public static net.imglib2.algorithm.kdtree.HyperPlane hyperPlane(org.joml.Vector4f plane)
public static org.joml.Matrix4f screenPerspective(double dCam, double dClip, double screenWidth, double screenHeight, double screenPadding, org.joml.Matrix4f matrix)
dCam - distance camera to z=0 planedClip - visible depth away from z=0 in both directionsscreenWidth - the width of the screenscreenHeight - the height of the screenscreenPadding - additional padding on all sides of the screen planematrix - is set to the screenPerspective transformation and returnedpublic static org.joml.Matrix4f screenPerspective(double dCam, double dClipNear, double dClipFar, double screenWidth, double screenHeight, double screenPadding, org.joml.Matrix4f matrix)
dCam - distance camera to z=0 planedClipNear - visible depth away from z=0 towards cameradClipFar - visible depth away from z=0 away from camerascreenWidth - the width of the screenscreenHeight - the height of the screenscreenPadding - additional padding on all sides of the screen planematrix - is set to the screenPerspective transformation and returnedpublic static org.joml.Matrix4f screen(double dCam, double screenWidth, double screenHeight, org.joml.Matrix4f matrix)
matrix to the "bdv screen transformation":
dCam in Zz=dCam).dCam - distance camera to z=0 planescreenWidth - the width of the screenscreenHeight - the height of the screenmatrix - is set to the screen transformation and returnedpublic static org.joml.Matrix4f perspective(double dCam, double dClipNear, double dClipFar, double screenWidth, double screenHeight, double screenPadding, org.joml.Matrix4f matrix)
dCam exactly touches the frustum sides.
Also invert the Y and Z axes to rotate from BVV camera coordinates (right-handed, X left, Y down, Z into screen) to OpenGL (right-handed, X left, Y up, Z out of screen) coordinates.dCam - distance camera to z=0 planedClipNear - visible depth away from z=0 towards cameradClipFar - visible depth away from z=0 away from camerascreenWidth - the width of the screenscreenHeight - the height of the screenscreenPadding - additional padding on all sides of the screen planematrix - is set to the screenPerspective transformation and returnedpublic static org.joml.Matrix4f affine(net.imglib2.realtransform.AffineTransform3D affine, org.joml.Matrix4f matrix)
AffineTransform3D to the specified matrix.affine - the affine transformationmatrix - affine transformation is applied to this matrixCopyright © 2018–2025 BigDataViewer. All rights reserved.