class mrpt::viz::CSkyBox

Overview

A Sky Box: 6 textures that are always rendered at “infinity” to give the impression of the scene to be much larger.

Refer to example Example: opengl_skybox_example

mrpt-skybox-demo.gif

See also:

opengl::Scene

#include <mrpt/viz/CSkyBox.h>

class CSkyBox: public mrpt::viz::CVisualObject
{
public:
    // construction

    CSkyBox();

    // methods

    void assignImage(const CUBE_TEXTURE_FACE face, const mrpt::img::CImage& img);

    void assignImage(
        const CUBE_TEXTURE_FACE face,
        img::CImage&& img
        );

    virtual auto internalBoundingBoxLocal() const;
    virtual bool cullElegible() const;
};

Inherited Members

public:
    // structs

    struct OutdatedState;
    struct State;

Methods

void assignImage(const CUBE_TEXTURE_FACE face, const mrpt::img::CImage& img)

Assigns a texture.

It is mandatory to assign all 6 faces before initializing/rendering the texture.

Images are copied, the original ones can be deleted.

virtual auto internalBoundingBoxLocal() const

In this class, returns a fixed box (max,max,max), (-max,-max,-max).

virtual bool cullElegible() const

Return false if this object should never be checked for being culled out (=not rendered if its bbox are out of the screen limits).

For example, skyboxes or other special effects.