EntityRenderer

Inheritance: java.lang.Object

public class EntityRenderer

Subclass this to implement rendering for different kind of entities.

Constructors

ConstructorDescription
EntityRenderer(String key, byte features)Constructor of EntityRenderer
EntityRenderer(String key)Constructor of EntityRenderer

Methods

MethodDescription
dispose()The entity renderer is being disposed, release shared resources.
equals(Object arg0)
frameBegin(Renderer renderer, IRenderQueue renderQueue)Begin rendering a frame
frameEnd(Renderer renderer, IRenderQueue renderQueue)Ends rendering a frame
getClass()
hashCode()
initialize(Renderer renderer)Initialize the entity renderer
notify()
notifyAll()
prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)Prepare rendering commands for specified node/entity pair.
renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity)Each render task pushed to the IRenderQueue will have a corresponding RenderEntity call to perform the concrete rendering job.
resetSceneCache()The scene has changed or removed, need to dispose scene-level render resources in this
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

EntityRenderer(String key, byte features)

public EntityRenderer(String key, byte features)

Constructor of EntityRenderer

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key of the entity renderer
featuresbyteThe extra features of the entity renderer

EntityRenderer(String key)

public EntityRenderer(String key)

Constructor of EntityRenderer

Parameters:

ParameterTypeDescription
keyjava.lang.StringThe key of the entity renderer

dispose()

public void dispose()

The entity renderer is being disposed, release shared resources.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

frameBegin(Renderer renderer, IRenderQueue renderQueue)

public void frameBegin(Renderer renderer, IRenderQueue renderQueue)

Begin rendering a frame

Parameters:

ParameterTypeDescription
rendererRendererCurrent renderer
renderQueueIRenderQueueRender queue

frameEnd(Renderer renderer, IRenderQueue renderQueue)

public void frameEnd(Renderer renderer, IRenderQueue renderQueue)

Ends rendering a frame

Parameters:

ParameterTypeDescription
rendererRendererCurrent renderer
renderQueueIRenderQueueRender queue

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public native int hashCode()

Returns: int

initialize(Renderer renderer)

public void initialize(Renderer renderer)

Initialize the entity renderer

Parameters:

ParameterTypeDescription
rendererRenderer

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)

public void prepareRenderQueue(Renderer renderer, IRenderQueue queue, Node node, Entity entity)

Prepare rendering commands for specified node/entity pair.

Parameters:

ParameterTypeDescription
rendererRendererThe current renderer instance
queueIRenderQueueThe render queue used to manage render tasks
nodeNodeCurrent node
entityEntityThe entity that need to be rendered

renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity)

public void renderEntity(Renderer renderer, ICommandList commandList, Node node, Object renderableResource, int subEntity)

Each render task pushed to the IRenderQueue will have a corresponding RenderEntity call to perform the concrete rendering job.

Parameters:

ParameterTypeDescription
rendererRendererThe renderer
commandListICommandListThe commandList used to record the rendering commands
nodeNodeThe same node that passed to PrepareRenderQueue of the entity that will be rendered
renderableResourcejava.lang.ObjectThe custom object that passed to IRenderQueue during the PrepareRenderQueue
subEntityintThe index of the sub entity that passed to IRenderQueue

resetSceneCache()

public void resetSceneCache()

The scene has changed or removed, need to dispose scene-level render resources in this

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int