DrawModel
final class DrawModel
Package: dev.joid.lib.draw.model · Module: core · Source: DrawModel.java
Draws a 3D model into the UI, scaled to a size in design pixels, with the depth test and the lighting on.
Description
Section titled “Description”Reach it through DrawUtils.MODEL.
The model draws inside its own render state: depth test and depth write on, lighting on, backface culling off; the depth buffer is cleared before and after, so the model never hides behind or in front of the rest of the UI.
The Y axis of the model points up: JOID flips it to match the design canvas.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
DrawModel | inst() factory | Returns the shared instance, the one in DrawUtils.MODEL. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | drawModel(double x, double y, double size, IDrawableModel model) | Draws the model with its origin at x, y, scaled by size on every axis: one unit of the model becomes size design pixels. |
void | drawModel(double x, double y, double sizeX, double sizeY, double sizeZ, IDrawableModel model) | Draws the model with its origin at x, y, scaled by sizeX, sizeY and sizeZ on each axis. |
Creation details
Section titled “Creation details”DrawModel inst() factory
Returns the shared instance, the one in DrawUtils.MODEL.
Method details
Section titled “Method details”drawModel
Section titled “drawModel”void drawModel(double x, double y, double size, IDrawableModel model)
Draws the model with its origin at x, y, scaled by size on every axis: one unit of the model becomes size design pixels.
void drawModel(double x, double y, double sizeX, double sizeY, double sizeZ, IDrawableModel model)
Draws the model with its origin at x, y, scaled by sizeX, sizeY and sizeZ on each axis.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
