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
    • Field Detail

      • entityRenderersByKey

        protected java.util.HashMap<java.lang.String,EntityRenderer> entityRenderersByKey
        Registered entity renderers
    • Method Detail

      • getFallbackEntityRenderer

        public EntityRenderer getFallbackEntityRenderer()
        Gets the fallback entity renderer when the entity has no special renderer defined.
      • setFallbackEntityRenderer

        public void setFallbackEntityRenderer(EntityRenderer value)
        Sets the fallback entity renderer when the entity has no special renderer defined.
        Parameters:
        value - New value
      • registerEntityRenderer

        public void registerEntityRenderer(EntityRenderer renderer)
        Register the entity renderer for specified entity
        Parameters:
        renderer -
      • getEntityRenderer

        protected EntityRenderer getEntityRenderer(Entity entity)
        Get the entity renderer that used to render the specified entity, or return fallback renderer if no entity renderer was registered.
        Parameters:
        entity -
      • getCommandList

        public abstract ICommandList getCommandList(RenderQueueGroupId queueGroup)
        Gets the command list for specified render queue
        Parameters:
        queueGroup -
      • render

        public void render(IRenderTarget renderTarget)
        Render the specified target
        Parameters:
        renderTarget -
      • 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
      • 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)
        Sets the getNode() instance used to provide world transform matrix.
        Parameters:
        value - New value
      • 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)
        Sets the material that used to provide material information used by shaders.
        Parameters:
        value - New value
      • 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
      • 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()
        End rendering on specified render target.
      • dispose

        protected void dispose(boolean disposing)
                        throws java.io.IOException
        Dispose the Renderer and all related resources
        Parameters:
        disposing -
        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