Skip to content

IDrawableModel

interface IDrawableModel
Known subtypes: ObjModel
Package: dev.joid.lib.draw.model · Module: core · Source: IDrawableModel.java

A 3D model that JOID can draw and size, which renders its geometry and reports its extent.

ObjModel implements it for Wavefront .obj files; implement it for another source of geometry. A model node reads the extent to fit the model in its bounds.

ReturnsSignatureSummary
voidrender() abstractJOID calls it inside DrawModel.drawModel, with the matrices and the 3D render state already set.
doublegetDepth() abstractReturns the extent of the model along Z, in model units.
doublegetWidth() abstractReturns the extent of the model along X, in model units.
doublegetHeight() abstractReturns the extent of the model along Y, in model units.

void render() abstract

JOID calls it inside DrawModel.drawModel, with the matrices and the 3D render state already set. Bind your texture and draw your geometry in model units, for example with the Tessellator.

double getDepth() abstract

Returns the extent of the model along Z, in model units.

double getWidth() abstract

Returns the extent of the model along X, in model units.

double getHeight() abstract

Returns the extent of the model along Y, in model units.


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