OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    Graphic3d_CubeMapSeparate Class Reference

    Class to manage cubemap located in six different images. More...

    #include <Graphic3d_CubeMapSeparate.hxx>

    Inheritance diagram for Graphic3d_CubeMapSeparate:

    Public Member Functions

     Graphic3d_CubeMapSeparate (const NCollection_Array1< TCollection_AsciiString > &thePaths)
     Initializes cubemap to be loaded from file. @thePaths - array of paths to separate image files (has to have size equal 6).
     Graphic3d_CubeMapSeparate (const NCollection_Array1< occ::handle< Image_PixMap > > &theImages)
     Initializes cubemap to be set directly from PixMaps. @theImages - array if PixMaps (has to have size equal 6).
    occ::handle< Image_CompressedPixMapCompressedValue (const occ::handle< Image_SupportedFormats > &theSupported) override
     Returns current cubemap side as compressed PixMap.
    occ::handle< Image_PixMapValue (const occ::handle< Image_SupportedFormats > &theSupported) override
     Returns current side of cubemap as PixMap. Returns null handle if current side or whole cubemap is invalid. All origin images have to have the same sizes, format and quad shapes to form valid cubemap.
    occ::handle< Image_PixMapGetImage (const occ::handle< Image_SupportedFormats > &) override
     Returns NULL.
    bool IsDone () const override
     Checks if a texture class is valid or not. Returns true if the construction of the class is correct.
     ~Graphic3d_CubeMapSeparate () override=default
     Empty destructor.
    Public Member Functions inherited from Graphic3d_CubeMap
     Graphic3d_CubeMap (const TCollection_AsciiString &theFileName, bool theToGenerateMipmaps=false)
     Constructor defining loading cubemap from file.
     Graphic3d_CubeMap (const occ::handle< Image_PixMap > &thePixmap=occ::handle< Image_PixMap >(), bool theToGenerateMipmaps=false)
     Constructor defining direct cubemap initialization from PixMap.
    bool More () const
     Returns whether the iterator has reached the end (true if it hasn't).
    Graphic3d_CubeMapSide CurrentSide () const
     Returns current cubemap side (iterator state).
    void Next ()
     Moves iterator to the next cubemap side. Uses OpenGL cubemap sides order +X -> -X -> +Y -> -Y -> +Z -> -Z.
    void SetZInversion (bool theZIsInverted)
     Sets Z axis inversion (vertical flipping).
    bool ZIsInverted () const
     Returns whether Z axis is inverted.
    bool HasMipmaps () const
     Returns whether mipmaps of cubemap will be generated or not.
    void SetMipmapsGeneration (bool theToGenerateMipmaps)
     Sets whether to generate mipmaps of cubemap or not.
    Graphic3d_CubeMapReset ()
     Sets iterator state to +X cubemap side.
     ~Graphic3d_CubeMap () override
     Empty destructor.
    Public Member Functions inherited from Graphic3d_TextureMap
    void EnableSmooth ()
     enable texture smoothing
    bool IsSmoothed () const
     Returns TRUE if the texture is smoothed.
    void DisableSmooth ()
     disable texture smoothing
    void EnableModulate ()
     enable texture modulate mode. the image is modulate with the shading of the surface.
    void DisableModulate ()
     disable texture modulate mode. the image is directly decal on the surface.
    bool IsModulate () const
     Returns TRUE if the texture is modulate.
    void EnableRepeat ()
     use this methods if you want to enable texture repetition on your objects.
    void DisableRepeat ()
     use this methods if you want to disable texture repetition on your objects.
    bool IsRepeat () const
     Returns TRUE if the texture repeat is enable.
    Graphic3d_LevelOfTextureAnisotropy AnisoFilter () const
    void SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel)
    Public Member Functions inherited from Graphic3d_TextureRoot
     ~Graphic3d_TextureRoot () override
     Destructor.
    const OSD_PathPath () const
     Returns the full path of the defined texture. It could be empty path if GetImage() is overridden to load image not from file.
    Graphic3d_TypeOfTexture Type () const
    const TCollection_AsciiStringGetId () const
     This ID will be used to manage resource in graphic driver.
    size_t Revision () const
     Return image revision.
    void UpdateRevision ()
     Update image revision. Can be used for signaling changes in the texture source (e.g. file update, pixmap update) without re-creating texture source itself (since unique id should be never modified).
    virtual occ::handle< Image_CompressedPixMapGetCompressedImage (const occ::handle< Image_SupportedFormats > &theSupported)
     This method will be called by graphic driver each time when texture resource should be created. It is called in front of GetImage() for uploading compressed image formats natively supported by GPU.
    const occ::handle< Graphic3d_TextureParams > & GetParams () const
    bool IsColorMap () const
     Return flag indicating color nature of values within the texture; TRUE by default.
    void SetColorMap (bool theIsColor)
     Set flag indicating color nature of values within the texture.
    bool HasMipmaps () const
     Returns whether mipmaps should be generated or not.
    void SetMipmapsGeneration (bool theToGenerateMipmaps)
     Sets whether to generate mipmaps or not.
    bool IsTopDown () const
     Returns whether row's memory layout is top-down.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Protected Attributes

    OSD_Path myPaths [6]
     array of paths to cubemap images
    occ::handle< Image_PixMapmyImages [6]
     array of cubemap images
    size_t mySize
     size of each side of cubemap
    Image_Format myFormat
     format each side of cubemap
    Protected Attributes inherited from Graphic3d_CubeMap
    Graphic3d_CubeMapSide myCurrentSide
     Iterator state.
    bool myEndIsReached
     Indicates whether end of iteration has been reached or hasn't.
    bool myZIsInverted
     Indicates whether Z axis is inverted that allows to synchronize vertical flip of cubemap.
    Protected Attributes inherited from Graphic3d_TextureRoot
    occ::handle< Graphic3d_TextureParamsmyParams
     associated texture parameters
    TCollection_AsciiString myTexId
     unique identifier of this resource (for sharing graphic resource); should never be modified outside constructor
    occ::handle< Image_PixMapmyPixMap
     image pixmap - as one of the ways for defining the texture source
    OSD_Path myPath
     image file path - as one of the ways for defining the texture source
    size_t myRevision
     image revision - for signaling changes in the texture source (e.g. file update, pixmap update)
    Graphic3d_TypeOfTexture myType
     texture type
    bool myIsColorMap
     flag indicating color nature of values within the texture
    bool myIsTopDown
     Stores rows's memory layout.
    bool myHasMipmaps
     Indicates whether mipmaps should be generated or not.

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    Static Public Member Functions inherited from Graphic3d_TextureRoot
    static TCollection_AsciiString TexturesFolder ()
     The path to textures determined from CSF_MDTVTexturesDirectory or CASROOT environment variables.
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.
    Protected Member Functions inherited from Graphic3d_TextureMap
     Graphic3d_TextureMap (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType)
     Graphic3d_TextureMap (const occ::handle< Image_PixMap > &thePixMap, const Graphic3d_TypeOfTexture theType)
    Protected Member Functions inherited from Graphic3d_TextureRoot
     Graphic3d_TextureRoot (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType)
     Creates a texture from a file Warning: Note that if <FileName> is NULL the texture must be realized using LoadTexture(image) method.
     Graphic3d_TextureRoot (const occ::handle< Image_PixMap > &thePixmap, const Graphic3d_TypeOfTexture theType)
     Creates a texture from pixmap. Please note that the implementation expects the image data to be in Bottom-Up order (see Image_PixMap::IsTopDown()).
    void generateId ()
     Unconditionally generate new texture id. Should be called only within constructor.
    virtual occ::handle< Image_PixMapGetImage () const
     Method for supporting old API; another GetImage() method should be implemented instead.
    Static Protected Member Functions inherited from Graphic3d_TextureRoot
    static void convertToCompatible (const occ::handle< Image_SupportedFormats > &theSupported, const occ::handle< Image_PixMap > &theImage)
     Try converting image to compatible format.

    Detailed Description

    Class to manage cubemap located in six different images.

    Constructor & Destructor Documentation

    ◆ Graphic3d_CubeMapSeparate() [1/2]

    Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate ( const NCollection_Array1< TCollection_AsciiString > & thePaths)

    Initializes cubemap to be loaded from file. @thePaths - array of paths to separate image files (has to have size equal 6).

    ◆ Graphic3d_CubeMapSeparate() [2/2]

    Graphic3d_CubeMapSeparate::Graphic3d_CubeMapSeparate ( const NCollection_Array1< occ::handle< Image_PixMap > > & theImages)

    Initializes cubemap to be set directly from PixMaps. @theImages - array if PixMaps (has to have size equal 6).

    ◆ ~Graphic3d_CubeMapSeparate()

    Graphic3d_CubeMapSeparate::~Graphic3d_CubeMapSeparate ( )
    overridedefault

    Empty destructor.

    Member Function Documentation

    ◆ CompressedValue()

    occ::handle< Image_CompressedPixMap > Graphic3d_CubeMapSeparate::CompressedValue ( const occ::handle< Image_SupportedFormats > & theSupported)
    overridevirtual

    Returns current cubemap side as compressed PixMap.

    Implements Graphic3d_CubeMap.

    ◆ GetImage()

    occ::handle< Image_PixMap > Graphic3d_CubeMapSeparate::GetImage ( const occ::handle< Image_SupportedFormats > & )
    inlineoverridevirtual

    Returns NULL.

    Reimplemented from Graphic3d_TextureRoot.

    ◆ IsDone()

    bool Graphic3d_CubeMapSeparate::IsDone ( ) const
    overridevirtual

    Checks if a texture class is valid or not. Returns true if the construction of the class is correct.

    Reimplemented from Graphic3d_TextureRoot.

    ◆ Value()

    occ::handle< Image_PixMap > Graphic3d_CubeMapSeparate::Value ( const occ::handle< Image_SupportedFormats > & theSupported)
    overridevirtual

    Returns current side of cubemap as PixMap. Returns null handle if current side or whole cubemap is invalid. All origin images have to have the same sizes, format and quad shapes to form valid cubemap.

    Implements Graphic3d_CubeMap.

    Field Documentation

    ◆ myFormat

    Image_Format Graphic3d_CubeMapSeparate::myFormat
    protected

    format each side of cubemap

    ◆ myImages

    occ::handle<Image_PixMap> Graphic3d_CubeMapSeparate::myImages[6]
    protected

    array of cubemap images

    ◆ myPaths

    OSD_Path Graphic3d_CubeMapSeparate::myPaths[6]
    protected

    array of paths to cubemap images

    ◆ mySize

    size_t Graphic3d_CubeMapSeparate::mySize
    protected

    size of each side of cubemap


    The documentation for this class was generated from the following file: