Search in sources :

Example 1 with RenderGroup

use of gaiasky.render.SceneGraphRenderer.RenderGroup in project gaiasky by langurmonkey.

the class ModelBody method addToRenderModel.

private void addToRenderModel() {
    RenderGroup rg = renderTessellated() ? RenderGroup.MODEL_PIX_TESS : RenderGroup.MODEL_PIX;
    addToRender(this, rg);
}
Also used : RenderGroup(gaiasky.render.SceneGraphRenderer.RenderGroup)

Example 2 with RenderGroup

use of gaiasky.render.SceneGraphRenderer.RenderGroup in project gaiasky by langurmonkey.

the class Orbit method addToRenderLists.

@Override
protected void addToRenderLists(ICamera camera) {
    if (this.shouldRender()) {
        if (!onlyBody) {
            // If there is overflow, return
            if (body != null && body.coordinatesTimeOverflow)
                return;
            boolean added = false;
            float angleLimit = SOLID_ANGLE_THRESHOLD * camera.getFovFactor();
            if (viewAngle > angleLimit) {
                if (viewAngle < angleLimit * SHADER_MODEL_OVERLAP_FACTOR) {
                    this.alpha = MathUtilsd.lint(viewAngle, angleLimit, angleLimit * SHADER_MODEL_OVERLAP_FACTOR, 0, cc[3]);
                } else {
                    this.alpha = cc[3];
                }
                RenderGroup rg = Settings.settings.scene.renderer.isQuadLineRenderer() ? RenderGroup.LINE : RenderGroup.LINE_GPU;
                if (body == null) {
                    // There is no body, always render
                    addToRender(this, rg);
                    added = true;
                } else if (body.distToCamera > distDown) {
                    // Body, disappear slowly
                    if (body.distToCamera < distUp)
                        this.alpha *= MathUtilsd.lint(body.distToCamera, distDown / camera.getFovFactor(), distUp / camera.getFovFactor(), 0, 1);
                    addToRender(this, rg);
                    added = true;
                }
            }
            if (pointCloudData == null || added) {
                refreshOrbit(false);
            }
        }
        // Orbital elements renderer
        if (body == null && !isInOrbitalElementsGroup && ct.get(ComponentType.Asteroids.ordinal()) && GaiaSky.instance.isOn(ComponentType.Asteroids)) {
            addToRender(this, RenderGroup.ORBITAL_ELEMENTS_PARTICLE);
        }
        if (this.forceLabel) {
            addToRender(this, RenderGroup.FONT_LABEL);
        }
    }
}
Also used : RenderGroup(gaiasky.render.SceneGraphRenderer.RenderGroup)

Example 3 with RenderGroup

use of gaiasky.render.SceneGraphRenderer.RenderGroup in project gaiasky by langurmonkey.

the class VertGPURenderSystem method notify.

@Override
public void notify(Event event, Object source, Object... data) {
    if (event == Event.GPU_DISPOSE_VERTS_OBJECT) {
        IRenderable renderable = (IRenderable) source;
        RenderGroup rg = (RenderGroup) data[0];
        if (rg == RenderGroup.LINE_GPU || rg == RenderGroup.POINT_GPU) {
            setInGpu(renderable, false);
        }
    }
}
Also used : IRenderable(gaiasky.render.IRenderable) RenderGroup(gaiasky.render.SceneGraphRenderer.RenderGroup)

Aggregations

RenderGroup (gaiasky.render.SceneGraphRenderer.RenderGroup)3 IRenderable (gaiasky.render.IRenderable)1