Skip to content

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.

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.

ReturnsSignatureSummary
DrawModelinst() factoryReturns the shared instance, the one in DrawUtils.MODEL.

ReturnsSignatureSummary
voiddrawModel(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.
voiddrawModel(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.

DrawModel inst() factory

Returns the shared instance, the one in DrawUtils.MODEL.

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

Report a problem with this page