Open CASCADE Technology  7.4.0
Public Member Functions
Image_Texture Class Reference

Texture image definition. The image can be stored as path to image file, as file path with the given offset and as a data buffer of encoded image. More...

#include <Image_Texture.hxx>

Inheritance diagram for Image_Texture:
Inheritance graph
[legend]

Public Member Functions

 Image_Texture (const TCollection_AsciiString &theFileName)
 Constructor pointing to file location. More...
 
 Image_Texture (const TCollection_AsciiString &theFileName, int64_t theOffset, int64_t theLength)
 Constructor pointing to file part. More...
 
 Image_Texture (const Handle< NCollection_Buffer > &theBuffer, const TCollection_AsciiString &theId)
 Constructor pointing to buffer. More...
 
const TCollection_AsciiStringTextureId () const
 Return generated texture id. More...
 
const TCollection_AsciiStringFilePath () const
 Return image file path. More...
 
int64_t FileOffset () const
 Return offset within file. More...
 
int64_t FileLength () const
 Return length of image data within the file after offset. More...
 
const Handle< NCollection_Buffer > & DataBuffer () const
 Return buffer holding encoded image content. More...
 
TCollection_AsciiString ProbeImageFileFormat () const
 Return image file format. More...
 
virtual Handle< Image_PixMapReadImage () const
 Image reader. More...
 
virtual Standard_Boolean WriteImage (const TCollection_AsciiString &theFile)
 Write image to specified file without decoding data. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

hasher interface

TCollection_AsciiString myTextureId
 generated texture id More...
 
TCollection_AsciiString myImagePath
 image file path More...
 
Handle< NCollection_BuffermyBuffer
 image buffer More...
 
int64_t myOffset
 offset within file More...
 
int64_t myLength
 length within file More...
 
static int HashCode (const Handle< Image_Texture > &theTexture, const int theUpper)
 Hash value, for Map interface. More...
 
static Standard_Boolean IsEqual (const Handle< Image_Texture > &theTex1, const Handle< Image_Texture > &theTex2)
 Matching two instances, for Map interface. More...
 
virtual Handle< Image_PixMaploadImageFile (const TCollection_AsciiString &thePath) const
 Read image from normal image file. More...
 
virtual Handle< Image_PixMaploadImageOffset (const TCollection_AsciiString &thePath, int64_t theOffset, int64_t theLength) const
 Read image from file with some offset. More...
 
virtual Handle< Image_PixMaploadImageBuffer (const Handle< NCollection_Buffer > &theBuffer, const TCollection_AsciiString &theId) const
 Read image from buffer. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

Texture image definition. The image can be stored as path to image file, as file path with the given offset and as a data buffer of encoded image.

Constructor & Destructor Documentation

◆ Image_Texture() [1/3]

Image_Texture::Image_Texture ( const TCollection_AsciiString theFileName)
explicit

Constructor pointing to file location.

◆ Image_Texture() [2/3]

Image_Texture::Image_Texture ( const TCollection_AsciiString theFileName,
int64_t  theOffset,
int64_t  theLength 
)
explicit

Constructor pointing to file part.

◆ Image_Texture() [3/3]

Image_Texture::Image_Texture ( const Handle< NCollection_Buffer > &  theBuffer,
const TCollection_AsciiString theId 
)
explicit

Constructor pointing to buffer.

Member Function Documentation

◆ DataBuffer()

const Handle< NCollection_Buffer >& Image_Texture::DataBuffer ( ) const
inline

Return buffer holding encoded image content.

◆ FileLength()

int64_t Image_Texture::FileLength ( ) const
inline

Return length of image data within the file after offset.

◆ FileOffset()

int64_t Image_Texture::FileOffset ( ) const
inline

Return offset within file.

◆ FilePath()

const TCollection_AsciiString& Image_Texture::FilePath ( ) const
inline

Return image file path.

◆ HashCode()

static int Image_Texture::HashCode ( const Handle< Image_Texture > &  theTexture,
const int  theUpper 
)
inlinestatic

Hash value, for Map interface.

◆ IsEqual()

static Standard_Boolean Image_Texture::IsEqual ( const Handle< Image_Texture > &  theTex1,
const Handle< Image_Texture > &  theTex2 
)
inlinestatic

Matching two instances, for Map interface.

◆ loadImageBuffer()

virtual Handle< Image_PixMap > Image_Texture::loadImageBuffer ( const Handle< NCollection_Buffer > &  theBuffer,
const TCollection_AsciiString theId 
) const
protectedvirtual

Read image from buffer.

◆ loadImageFile()

virtual Handle< Image_PixMap > Image_Texture::loadImageFile ( const TCollection_AsciiString thePath) const
protectedvirtual

Read image from normal image file.

◆ loadImageOffset()

virtual Handle< Image_PixMap > Image_Texture::loadImageOffset ( const TCollection_AsciiString thePath,
int64_t  theOffset,
int64_t  theLength 
) const
protectedvirtual

Read image from file with some offset.

◆ ProbeImageFileFormat()

TCollection_AsciiString Image_Texture::ProbeImageFileFormat ( ) const

Return image file format.

◆ ReadImage()

virtual Handle< Image_PixMap > Image_Texture::ReadImage ( ) const
virtual

Image reader.

◆ TextureId()

const TCollection_AsciiString& Image_Texture::TextureId ( ) const
inline

Return generated texture id.

◆ WriteImage()

virtual Standard_Boolean Image_Texture::WriteImage ( const TCollection_AsciiString theFile)
virtual

Write image to specified file without decoding data.

Field Documentation

◆ myBuffer

Handle< NCollection_Buffer > Image_Texture::myBuffer
protected

image buffer

◆ myImagePath

TCollection_AsciiString Image_Texture::myImagePath
protected

image file path

◆ myLength

int64_t Image_Texture::myLength
protected

length within file

◆ myOffset

int64_t Image_Texture::myOffset
protected

offset within file

◆ myTextureId

TCollection_AsciiString Image_Texture::myTextureId
protected

generated texture id


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