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
See also:
opengl::Scene
#include <mrpt/viz/CSkyBox.h> class CSkyBox: public mrpt::viz::CVisualObject { public: // typedefs typedef std::shared_ptr<mrpt::viz ::CSkyBox> Ptr; typedef std::shared_ptr<const mrpt::viz ::CSkyBox> ConstPtr; typedef std::unique_ptr<mrpt::viz ::CSkyBox> UniquePtr; typedef std::unique_ptr<const mrpt::viz ::CSkyBox> ConstUniquePtr; // fields static constexpr const char* className = "mrpt::viz" "::" "CSkyBox"; // construction CSkyBox(); // methods static constexpr auto getClassName(); static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); static std::shared_ptr<CObject> CreateObject(); template <typename... Args> static Ptr Create(Args&&... args); template <typename Alloc, typename... Args> static Ptr CreateAlloc( const Alloc& alloc, Args&&... args ); template <typename... Args> static UniquePtr CreateUnique(Args&&... args); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual mrpt::rtti::CObject* clone() const; 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; const std::array<mrpt::img::CImage, 6>& getTextureImages() const; };
Inherited Members
public: // typedefs typedef std::shared_ptr<CObject> Ptr; typedef std::shared_ptr<const CObject> ConstPtr; typedef std::shared_ptr<CSerializable> Ptr; typedef std::shared_ptr<const CSerializable> ConstPtr; // structs struct PoseAndScale; struct State; // methods static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic(); virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
Typedefs
typedef std::shared_ptr<mrpt::viz ::CSkyBox> Ptr
A type for the associated smart pointer.
Methods
virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const
Returns information about the class of an object in runtime.
virtual mrpt::rtti::CObject* clone() const
Returns a deep copy (clone) of the object, indepently of its class.
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.
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.