public final class ImGuizmo
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
beginFrame()
Starts the next frame for the Gizmo.
|
static void |
decomposeMatrixToComponents(float[] modelMatrix,
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[]... cubeMatrices)
Drawing an arbitrary cube in the world.
|
static void |
drawGrid(float[] view,
float[] projection,
float[] matrix,
int gridSize)
Drawing a grid to the world (should only be used for debugging purposes).
|
static boolean |
isOver()
Checks to see if we're over the Gizmo.
|
static boolean |
isOver(int operation)
Checks if we're over the current operation.
|
static boolean |
isUsing()
Checks to see if we're using the Gizmo.
|
static void |
manipulate(float[] view,
float[] projection,
float[] modelMatrix,
float[] deltaMatrix,
int operation,
int mode,
float[] snap,
float[] bounds,
float[] boundsSnap)
Manipulating the given model matrix with delta matrix
|
static void |
manipulate(float[] view,
float[] projection,
float[] modelMatrix,
int operation,
int mode)
Manipulating the given model matrix.
|
static void |
manipulate(float[] view,
float[] projection,
float[] modelMatrix,
int operation,
int mode,
float[] snap)
Manipulating the given model matrix with snap feature enabled!
|
static void |
manipulate(float[] view,
float[] projection,
float[] modelMatrix,
int operation,
int mode,
float[] snap,
float[] bounds)
Manipulating the given model matrix with snap and bounds feature enabled!
|
static void |
manipulate(float[] view,
float[] projection,
float[] modelMatrix,
int operation,
int mode,
float[] snap,
float[] bounds,
float[] boundsSnap)
Manipulating the given model matrix with snap and bounds(snap) feature enabled!
|
static void |
nSetRect(float x,
float y,
float width,
float height) |
static void |
recomposeMatrixFromComponents(float[] modelMatrix,
float[] translation,
float[] rotation,
float[] scale)
Helper function for manually editing Translation/Rotation/Scale with an input float.
|
static void |
setAllowAxisFlip(boolean value)
This will update the current axis flip value
|
static void |
setDrawList()
Setting the default window drawlist.
|
static void |
setDrawList(ImDrawList drawList)
Setting the draw list of the given Gizmo.
|
static void |
setEnabled(boolean isEnabled)
Enable/Disable the gizmo.
|
static void |
setId(int id)
This will update the current id
|
static void |
setOrthographic(boolean ortho)
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[] position,
float[] size,
int color)
Manipulating the view
|
public static void setEnabled(boolean isEnabled)
public static boolean isUsing()
public static boolean isOver()
public static void setDrawList(ImDrawList drawList)
drawList
- the target drawlistpublic static void setDrawList()
public static void beginFrame()
public static void decomposeMatrixToComponents(float[] modelMatrix, float[] translation, float[] rotation, float[] scale)
modelMatrix
- the model matrixtranslation
- the model translationrotation
- the model rotationscale
- the model scalepublic static void recomposeMatrixFromComponents(float[] modelMatrix, float[] translation, float[] rotation, float[] scale)
modelMatrix
- the model matrixtranslation
- the model translationrotation
- the model rotationscale
- the model scalepublic static void nSetRect(float x, float y, float width, float height)
public 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 ortho)
public static void drawCubes(float[] view, float[] projection, float[]... cubeMatrices)
view
- target camera viewprojection
- target camera projectioncubeMatrices
- cube matrices (max. 4 cubes allowed)public static void drawGrid(float[] view, float[] projection, float[] matrix, int gridSize)
view
- target camera viewprojection
- target camera projectionmatrix
- grid matrixgridSize
- grid sizepublic static void manipulate(float[] view, float[] projection, float[] modelMatrix, int operation, int mode)
view
- target camera viewprojection
- target camera projectionmodelMatrix
- model matrixoperation
- target operationmode
- target modepublic static void manipulate(float[] view, float[] projection, float[] modelMatrix, int operation, int mode, float[] snap)
view
- target camera viewprojection
- target camera projectionmodelMatrix
- model matrixoperation
- target operationmode
- target modesnap
- snap valuepublic static void manipulate(float[] view, float[] projection, float[] modelMatrix, int operation, int mode, float[] snap, float[] bounds)
view
- target camera viewprojection
- target camera projectionmodelMatrix
- model matrixoperation
- target operationmode
- target modesnap
- snap valuebounds
- bounds valuepublic static void manipulate(float[] view, float[] projection, float[] modelMatrix, int operation, int mode, float[] snap, float[] bounds, float[] boundsSnap)
view
- target camera viewprojection
- target camera projectionmodelMatrix
- model matrixoperation
- target operationmode
- target modesnap
- snap valuebounds
- bounds valueboundsSnap
- bounds snap valuepublic static void manipulate(float[] view, float[] projection, float[] modelMatrix, float[] deltaMatrix, int operation, int mode, float[] snap, float[] bounds, float[] boundsSnap)
view
- target camera viewprojection
- target camera projectionmodelMatrix
- model matrixdeltaMatrix
- delta matrixoperation
- target operationmode
- target modesnap
- snap valuebounds
- bounds valueboundsSnap
- bounds snap valuepublic static void viewManipulate(float[] view, float length, float[] position, float[] size, int color)
view
- target camera viewlength
- camera distance/lengthposition
- positionsize
- sizecolor
- colorpublic static void setId(int id)
public static boolean isOver(int operation)
Operation
.operation
- targetpublic static void setAllowAxisFlip(boolean value)