public final class ImGuizmo
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
allowAxisFlip(boolean value)
Allow axis to flip.
|
static void |
beginFrame()
Call BeginFrame right after ImGui_XXXX_NewFrame();
|
static void |
decomposeMatrixToComponents(float[] matrix,
float[] translation,
float[] rotation,
float[] scale)
Helper function for manually editing Translation/Rotation/Scale with an input float.
|
static void |
drawCubes(float[] view,
float[] projection,
float[]... matrices)
Drawing an arbitrary cube in the world.
|
static void |
drawCubes(float[] view,
float[] projection,
float[] matrices)
Drawing an arbitrary cube in the world.
|
static void |
drawCubes(float[] view,
float[] projection,
float[] matrices,
int matrixCount)
Drawing an arbitrary cube in the world.
|
static void |
drawGrid(float[] view,
float[] projection,
float[] matrix,
float gridSize)
Drawing a grid to the world (should only be used for debugging purposes).
|
static void |
enable(boolean enable)
Enable/disable the gizmo.
|
static boolean |
isOver()
Return true if mouse cursor is over any gizmo control (axis, plan or screen component)
|
static boolean |
isOver(int operation)
Return true if the cursor is over the operation's gizmo
|
static boolean |
isUsing()
Return true if mouse IsOver or if the gizmo is in moving state
|
static void |
manipulate(float[] view,
float[] projection,
int operation,
int mode,
float[] matrix)
Manipulating the given model matrix with delta matrix
|
static void |
manipulate(float[] view,
float[] projection,
int operation,
int mode,
float[] matrix,
float[] deltaMatrix)
Manipulating the given model matrix with delta matrix
|
static void |
manipulate(float[] view,
float[] projection,
int operation,
int mode,
float[] matrix,
float[] deltaMatrix,
float[] snap)
Manipulating the given model matrix with delta matrix
|
static void |
manipulate(float[] view,
float[] projection,
int operation,
int mode,
float[] matrix,
float[] deltaMatrix,
float[] snap,
float[] localBounds)
Manipulating the given model matrix with delta matrix
|
static void |
manipulate(float[] view,
float[] projection,
int operation,
int mode,
float[] matrix,
float[] deltaMatrix,
float[] snap,
float[] localBounds,
float[] boundsSnap)
Manipulating the given model matrix with delta matrix
|
static void |
recomposeMatrixFromComponents(float[] translation,
float[] rotation,
float[] scale,
float[] matrix)
Helper function for manually editing Translation/Rotation/Scale with an input float.
|
static void |
setDrawList()
Call inside your own window and before Manipulate() in order to draw gizmo to that window.
|
static void |
setDrawList(ImDrawList drawList)
Call inside your own window and before Manipulate() in order to draw gizmo to that window.
|
static void |
setGizmoSizeClipSpace(float value) |
static void |
setID(int id)
This will update the current id
|
static void |
setImGuiContext(ImGuiContext ctx)
This is necessary because when imguizmo is compiled into a dll, and imgui into another
Globals are not shared between them.
|
static void |
setOrthographic(boolean isOrthographic)
Making sure if we're set to ortho or not.
|
static void |
setRect(float x,
float y,
float width,
float height)
This will set the rect position.
|
static void |
viewManipulate(float[] view,
float length,
float positionX,
float positionY,
float sizeX,
float sizeY,
int backgroundColor)
Manipulating the view
|
static void |
viewManipulate(float[] view,
float length,
ImVec2 position,
ImVec2 size,
int backgroundColor)
Manipulating the view
|
public static void setDrawList()
public static void setDrawList(ImDrawList drawList)
public static void beginFrame()
public static void setImGuiContext(ImGuiContext ctx)
public static boolean isOver()
public static boolean isUsing()
public static void enable(boolean enable)
public static void decomposeMatrixToComponents(float[] matrix, float[] translation, float[] rotation, float[] scale)
matrix
- the model matrixtranslation
- the model translationrotation
- the model rotationscale
- the model scalepublic static void recomposeMatrixFromComponents(float[] translation, float[] rotation, float[] scale, float[] matrix)
translation
- the model translationrotation
- the model rotationscale
- the model scalematrix
- the model matrixpublic static void setRect(float x, float y, float width, float height)
x
- x coordinate of the rectangley
- y coordinate of the rectanglewidth
- width of the rectangleheight
- height of the rectanglepublic static void setOrthographic(boolean isOrthographic)
public static void drawCubes(float[] view, float[] projection, float[] matrices)
view
- target camera viewprojection
- target camera projectionmatrices
- cube matrices (max. 4 cubes allowed)public static void drawCubes(float[] view, float[] projection, float[] matrices, int matrixCount)
view
- target camera viewprojection
- target camera projectionmatrices
- cube matrices (max. 4 cubes allowed)matrixCount
- number of matricespublic static void drawCubes(float[] view, float[] projection, float[]... matrices)
view
- target camera viewprojection
- target camera projectionmatrices
- cube matrices (max. 4 cubes allowed)public static void drawGrid(float[] view, float[] projection, float[] matrix, float gridSize)
view
- target camera viewprojection
- target camera projectionmatrix
- grid matrixgridSize
- grid sizepublic static void manipulate(float[] view, float[] projection, int operation, int mode, float[] matrix)
view
- target camera viewprojection
- target camera projectionoperation
- target operationmode
- target modematrix
- model matrixpublic static void manipulate(float[] view, float[] projection, int operation, int mode, float[] matrix, float[] deltaMatrix)
view
- target camera viewprojection
- target camera projectionoperation
- target operationmode
- target modematrix
- model matrixdeltaMatrix
- delta matrixpublic static void manipulate(float[] view, float[] projection, int operation, int mode, float[] matrix, float[] deltaMatrix, float[] snap)
view
- target camera viewprojection
- target camera projectionoperation
- target operationmode
- target modematrix
- model matrixdeltaMatrix
- delta matrixsnap
- snap valuepublic static void manipulate(float[] view, float[] projection, int operation, int mode, float[] matrix, float[] deltaMatrix, float[] snap, float[] localBounds)
view
- target camera viewprojection
- target camera projectionoperation
- target operationmode
- target modematrix
- model matrixdeltaMatrix
- delta matrixsnap
- snap valuelocalBounds
- bounds valuepublic static void manipulate(float[] view, float[] projection, int operation, int mode, float[] matrix, float[] deltaMatrix, float[] snap, float[] localBounds, float[] boundsSnap)
view
- target camera viewprojection
- target camera projectionoperation
- target operationmode
- target modematrix
- model matrixdeltaMatrix
- delta matrixsnap
- snap valuelocalBounds
- bounds valueboundsSnap
- bounds snap valuepublic static void viewManipulate(float[] view, float length, ImVec2 position, ImVec2 size, int backgroundColor)
view
- target camera viewlength
- camera distance/lengthpublic static void viewManipulate(float[] view, float length, float positionX, float positionY, float sizeX, float sizeY, int backgroundColor)
view
- target camera viewlength
- camera distance/lengthpublic static void setID(int id)
public static boolean isOver(int operation)
public static void setGizmoSizeClipSpace(float value)
public static void allowAxisFlip(boolean value)