Class CSkyBox

Inheritance Relationships

Base Type

Class Documentation

class CSkyBox : public mrpt::viz::CVisualObject

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 opengl_skybox_example

../../output_staging/generated/doxygen/xml/mrpt-skybox-demo.gif

See also

opengl::Scene

Public Functions

CSkyBox() = default
virtual ~CSkyBox() override
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.

Note

Images are copied, the original ones can be deleted.

void assignImage(const CUBE_TEXTURE_FACE face, img::CImage &&img)
virtual auto internalBoundingBoxLocal() const -> mrpt::math::TBoundingBoxf override

Must be implemented by derived classes to provide the updated bounding box in the object local frame of coordinates. This will be called only once after each time the derived class reports to notifyChange() that the object geometry changed.

See also

getBoundingBox(), getBoundingBoxLocal(), getBoundingBoxLocalf()

inline virtual bool cullElegible() const override

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.

inline const std::array<mrpt::img::CImage, 6> &getTextureImages() const

Returns the 6 face images for cube-map rendering. Indices follow the numeric ordering of CUBE_TEXTURE_FACE values.