Package com.aspose.threed
Class ManualEntity
- java.lang.Object
-
- com.aspose.threed.A3DObject
-
- com.aspose.threed.Entity
-
- com.aspose.threed.ManualEntity
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ManualEntity extends Entity implements java.io.Closeable
A bridge from Entity to custom renderable entity Use this class to simplify the construction of rendering tasks and resource management.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ManualEntity()
Constructor ofManualEntity
ManualEntity(RenderQueueGroupId renderGroup, int priority, RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, IIndexBuffer indexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
ManualEntity(RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
ManualEntity(RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, IIndexBuffer indexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
-
Method Summary
Modifier and Type Method Description void
close()
Dispose RenderState/Vertex buffer/index buffer Shader is not automatically disposed, user can override this to decide the resource dispose policy.protected RenderableResource
createRenderableResource(Renderer renderer)
ManualEntity
implemented this to send rendering data to render queue.DrawOperation
getDrawOperation()
Gets the draw operation to specify what primitive type to render.IIndexBuffer
getIndexBuffer()
Gets the index buffer, this can be null.RenderQueueGroupId
getRenderGroup()
Gets the render group of this object.int
getRenderPriority()
Gets the render priority, higher number will have higher priority to render in same group.RenderState
getRenderState()
Gets the render states used by this object.ShaderProgram
getShader()
Gets the shader used by this object.IVertexBuffer
getVertexBuffer()
Gets the vertex buffer.void
setDrawOperation(DrawOperation value)
Gets the draw operation to specify what primitive type to render.void
setIndexBuffer(IIndexBuffer value)
Gets the index buffer, this can be null.void
setRenderGroup(RenderQueueGroupId value)
Sets the render group of this object.void
setRenderPriority(int value)
Sets the render priority, higher number will have higher priority to render in same group.void
setRenderState(RenderState value)
Gets the render states used by this object.void
setShader(ShaderProgram value)
Gets the shader used by this object.void
setVertexBuffer(IVertexBuffer value)
Gets the vertex buffer.-
Methods inherited from class com.aspose.threed.Entity
getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
-
Methods inherited from class com.aspose.threed.A3DObject
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
-
-
-
-
Constructor Detail
-
ManualEntity
protected ManualEntity()
Constructor ofManualEntity
-
ManualEntity
public ManualEntity(RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, IIndexBuffer indexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
- Parameters:
renderState
-shader
-vertexBuffer
-indexBuffer
-drawOperation
-
-
ManualEntity
public ManualEntity(RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
- Parameters:
renderState
-shader
-vertexBuffer
-drawOperation
-
-
ManualEntity
public ManualEntity(RenderQueueGroupId renderGroup, int priority, RenderState renderState, ShaderProgram shader, IVertexBuffer vertexBuffer, IIndexBuffer indexBuffer, DrawOperation drawOperation)
Constructor ofManualEntity
- Parameters:
renderGroup
-priority
-renderState
-shader
-vertexBuffer
-indexBuffer
-drawOperation
-
-
-
Method Detail
-
getRenderGroup
public RenderQueueGroupId getRenderGroup()
Gets the render group of this object.
-
setRenderGroup
public void setRenderGroup(RenderQueueGroupId value)
Sets the render group of this object.- Parameters:
value
- New value
-
getRenderPriority
public int getRenderPriority()
Gets the render priority, higher number will have higher priority to render in same group.
-
setRenderPriority
public void setRenderPriority(int value)
Sets the render priority, higher number will have higher priority to render in same group.- Parameters:
value
- New value
-
getRenderState
public RenderState getRenderState()
Gets the render states used by this object.
-
setRenderState
public void setRenderState(RenderState value)
Gets the render states used by this object.- Parameters:
value
- New value
-
getShader
public ShaderProgram getShader()
Gets the shader used by this object.
-
setShader
public void setShader(ShaderProgram value)
Gets the shader used by this object.- Parameters:
value
- New value
-
getVertexBuffer
public IVertexBuffer getVertexBuffer()
Gets the vertex buffer.
-
setVertexBuffer
public void setVertexBuffer(IVertexBuffer value)
Gets the vertex buffer.- Parameters:
value
- New value
-
getIndexBuffer
public IIndexBuffer getIndexBuffer()
Gets the index buffer, this can be null. If IndexBuffer is not specified, renderer will not render it in index mode.
-
setIndexBuffer
public void setIndexBuffer(IIndexBuffer value)
Gets the index buffer, this can be null. If IndexBuffer is not specified, renderer will not render it in index mode.- Parameters:
value
- New value
-
getDrawOperation
public DrawOperation getDrawOperation()
Gets the draw operation to specify what primitive type to render.
-
setDrawOperation
public void setDrawOperation(DrawOperation value)
Gets the draw operation to specify what primitive type to render.- Parameters:
value
- New value
-
createRenderableResource
protected RenderableResource createRenderableResource(Renderer renderer)
ManualEntity
implemented this to send rendering data to render queue.- Overrides:
createRenderableResource
in classEntity
- Parameters:
renderer
-
-
close
public void close() throws java.io.IOException
Dispose RenderState/Vertex buffer/index buffer Shader is not automatically disposed, user can override this to decide the resource dispose policy.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-