com.aspose.threed

Interfaces

Classes

Enums

Exceptions

com.aspose.threed

Class Renderer

  • java.lang.Object
    • com.aspose.threed.Renderer
  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    public abstract class Renderer
    extends java.lang.Object
    implements java.io.Closeable
    • Method Detail

      • render

        public void render(IRenderTarget renderTarget)
                    throws java.io.IOException
        Render the specified target
        Parameters:
        renderTarget -
        Throws:
        java.io.IOException
      • clearCache

        public void clearCache()
                        throws java.io.IOException
        Manually clear the cache. Aspose.3D will cache some objects like materials/geometries into internal types that compatible with the render pipeline. This should be manually called when scene has major changes.
        Throws:
        java.io.IOException
      • getShaderSet

        public ShaderSet getShaderSet()
        Gets the shader set that used to render the scene
      • setShaderSet

        public void setShaderSet(ShaderSet value)
                          throws java.io.IOException
        Sets the shader set that used to render the scene
        Parameters:
        value - New value
        Throws:
        java.io.IOException
      • getPresetShaders

        public PresetShaders getPresetShaders()
        Gets the preset shader set
      • setPresetShaders

        public void setPresetShaders(PresetShaders value)
                              throws java.io.IOException
        Sets the preset shader set
        Parameters:
        value - New value
        Throws:
        java.io.IOException
      • bindRenderState

        public abstract void bindRenderState(RenderState renderState)
        Apply the render state
        Parameters:
        renderState - The render state to apply
      • getCurrentContext

        public static Renderer getCurrentContext()
        Gets the instance of current render context.
      • getRenderFactory

        public abstract RenderFactory getRenderFactory()
        Gets the factory to build render-related objects.
      • getAssetDirectories

        public java.util.ArrayList<java.lang.String> getAssetDirectories()
        Directories that stored external assets
      • getPostProcessings

        public java.util.List<PostProcessing> getPostProcessings()
        Active post-processing chain
      • getPostProcessing

        public PostProcessing getPostProcessing(java.lang.String name)
        Gets a built-in post-processor that supported by the renderer.
        Parameters:
        name -
      • execute

        public abstract void execute(PostProcessing postProcessing,
                                     IRenderTarget result)
        Execute an post processing on specified render target
      • getEnableShadows

        public boolean getEnableShadows()
        Gets wheather to enabel shadows.
      • setEnableShadows

        public void setEnableShadows(boolean value)
        Sets wheather to enabel shadows.
        Parameters:
        value - New value
      • getRenderTarget

        public IRenderTarget getRenderTarget()
        Specify the render target that the following render operations will be performed on.
      • getNode

        public Node getNode()
        Gets the getNode() instance used to provide world transform matrix.
      • setNode

        public void setNode(Node value)
                     throws java.io.IOException
        Sets the getNode() instance used to provide world transform matrix.
        Parameters:
        value - New value
        Throws:
        java.io.IOException
      • getFrustum

        public Frustum getFrustum()
        Gets the frustum that used to provide view matrix.
      • setFrustum

        public void setFrustum(Frustum value)
        Sets the frustum that used to provide view matrix.
        Parameters:
        value - New value
      • getRenderStage

        public RenderStage getRenderStage()
        Gets the current render stage.
      • getMaterial

        public Material getMaterial()
        Gets the material that used to provide material information used by shaders.
      • setMaterial

        public void setMaterial(Material value)
                         throws java.io.IOException
        Sets the material that used to provide material information used by shaders.
        Parameters:
        value - New value
        Throws:
        java.io.IOException
      • getShader

        public ShaderProgram getShader()
        Gets the shader instance used for rendering the geometry.
      • setShader

        public void setShader(ShaderProgram value)
        Sets the shader instance used for rendering the geometry.
        Parameters:
        value - New value
      • drawIndexed

        public abstract void drawIndexed(DrawOperation drawOperation,
                                         IVertexBuffer vertexBuffer,
                                         IIndexBuffer indexBuffer,
                                         int count)
                                  throws java.io.IOException
        Draw indexed geometry.
        Parameters:
        drawOperation - The primitive type of the geometry
        vertexBuffer - Specify the vertex buffer
        indexBuffer - Specify the index buffer
        count - Specify the count of elements to be rendered
        Throws:
        java.io.IOException
      • draw

        public abstract void draw(DrawOperation drawOperation,
                                  IVertexBuffer vertexBuffer,
                                  int first,
                                  int count)
                           throws java.io.IOException
        Draw geometry defined in vertices
        Parameters:
        drawOperation - The primitive type of the geometry
        vertexBuffer - Specify the vertex buffer
        first - Specify the first element to be rendered
        count - Specify the count of elements to be rendered
        Throws:
        java.io.IOException
      • draw

        public void draw(DrawOperation drawOperation,
                         IVertexBuffer vertexBuffer)
                  throws java.io.IOException
        Draw geometry defined in vertices
        Parameters:
        drawOperation - The primitive type of the geometry
        vertexBuffer - Specify the vertex buffer
        Throws:
        java.io.IOException
      • drawIndexed

        public void drawIndexed(DrawOperation drawOperation,
                                IVertexBuffer vertexBuffer,
                                IIndexBuffer indexBuffer)
                         throws java.io.IOException
        Draw indexed geometry.
        Parameters:
        drawOperation - The primitive type of the geometry
        vertexBuffer - Specify the vertex buffer
        indexBuffer - Specify the index buffer
        Throws:
        java.io.IOException
      • beginViewport

        protected void beginViewport(Viewport viewport)
        Begin rendering on specified viewport
      • beginViewport

        protected void beginViewport(Viewport viewport,
                                     Frustum frustum)
        Begin rendering on specified viewport
      • endViewport

        protected void endViewport()
        Finished rendering on specified viewport
      • beginTarget

        protected void beginTarget(IRenderTarget target)
        Begin render on specified render target
        Parameters:
        target -
      • endTarget

        protected void endTarget()
                          throws java.io.IOException
        End rendering on specified render target.
        Throws:
        java.io.IOException
      • submitRenderTask

        public void submitRenderTask(RenderQueueGroupId groupId,
                                     int priority,
                                     Node node,
                                     IRenderable renderableTask)
        Submit a render task to the render queue
        Parameters:
        groupId -
        priority - The priority of this task
        node -
        renderableTask -
      • renderAll

        protected void renderAll(RenderQueueGroupId groupId)
                          throws java.io.IOException
        Render all items in the specified render group
        Parameters:
        groupId -
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Dispose the Renderer and all related resources
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException