Class AbstractEmbeddedEnvironment
java.lang.Object
com.jozufozu.flywheel.backend.util.AtomicReferenceCounted
com.jozufozu.flywheel.backend.engine.embed.AbstractEmbeddedEnvironment
- All Implemented Interfaces:
VisualEmbedding,VisualizationContext,Environment
- Direct Known Subclasses:
NestedEmbeddedEnvironment,TopLevelEmbeddedEnvironment
public abstract class AbstractEmbeddedEnvironment
extends AtomicReferenceCounted
implements Environment, VisualEmbedding
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid_delete()Called when referenceCount goes to 0abstract voidCalled in EnvironmentStorage#flushabstract voidcomposeMatrices(org.joml.Matrix4f pose, org.joml.Matrix3f normal) voiddelete()Called by visualsvoidflush()net.minecraft.core.Vec3iAll models render as if this position is (0, 0, 0).voidvoidabstract voidsetupLight(GlProgram program) voidtransforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal) Set the transformation matrices for the embedding.Methods inherited from class com.jozufozu.flywheel.backend.util.AtomicReferenceCounted
acquire, isDeleted, referenceCount, releaseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jozufozu.flywheel.backend.engine.embed.Environment
acquire, releaseMethods inherited from interface com.jozufozu.flywheel.api.visualization.VisualEmbedding
collectLight, invalidateLight
-
Field Details
-
pose
protected final org.joml.Matrix4f pose -
normal
protected final org.joml.Matrix3f normal
-
-
Constructor Details
-
AbstractEmbeddedEnvironment
-
-
Method Details
-
transforms
public void transforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal) Description copied from interface:VisualEmbeddingSet the transformation matrices for the embedding.- Specified by:
transformsin interfaceVisualEmbedding- Parameters:
pose- The model matrix.normal- The normal matrix.
-
flush
public void flush() -
setupDraw
- Specified by:
setupDrawin interfaceEnvironment
-
setupCull
- Specified by:
setupCullin interfaceEnvironment
-
contextShader
- Specified by:
contextShaderin interfaceEnvironment
-
instancerProvider
- Specified by:
instancerProviderin interfaceVisualizationContext- Returns:
- The
InstancerProviderthat the visual can use to get instancers to render models.
-
renderOrigin
public net.minecraft.core.Vec3i renderOrigin()Description copied from interface:VisualizationContextAll models render as if this position is (0, 0, 0).- Specified by:
renderOriginin interfaceVisualizationContext- Returns:
- The origin of the renderer as a level position.
-
createEmbedding
- Specified by:
createEmbeddingin interfaceVisualizationContext
-
delete
public void delete()Called by visuals- Specified by:
deletein interfaceVisualEmbedding
-
_delete
public void _delete()Called when referenceCount goes to 0- Specified by:
_deletein classAtomicReferenceCounted
-
setupLight
-
composeMatrices
public abstract void composeMatrices(org.joml.Matrix4f pose, org.joml.Matrix3f normal) -
actuallyDelete
public abstract void actuallyDelete()Called in EnvironmentStorage#flush
-