ImageTextureInterface Class Reference Graphics

#include <gfx_image.h>

Inheritance diagram for ImageTextureInterface:

详细描述

A Image texture represents a texture object with layers.

公共成员函数

MAXON_METHOD Result < MediaSessionRef >  Load (const Url &url, const TimeValue &targetTime, MEDIASESSIONFLAGS flags, const Class < ImagePixelStorage > &pixelStorageClass= GetZeroRef < Class < ImagePixelStorage >>(), const LayerSetInterface *layerSet=nullptr)
MAXON_METHOD Result < void >  Save (const MediaOutputRef &fileFormat, MEDIASESSIONFLAGS flags, MediaSessionRef *returnOpenSession=nullptr) const
MAXON_FUNCTION Result < void >  Save (const Url &fileName, const MediaOutputUrlRef &fileFormat, MEDIASESSIONFLAGS flags, MediaSessionRef *returnOpenSession=nullptr) const

静态公共成员函数

static MAXON_METHOD Result < ImageTextureRef >  LoadTexture (const Url &name, const TimeValue &targetTime= TimeValue (), MEDIASESSIONFLAGS flags= MEDIASESSIONFLAGS::NONE , const Class < ImagePixelStorage > &pixelStorageClass= GetNormalPixelStorageClass (), const LayerSetInterface *layerSet=nullptr)

私有成员函数

  MAXON_INTERFACE ( ImageTextureInterface , MAXON_REFERENCE_NORMAL , "net.maxon.image.interface.imagetexture")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( ImageTextureInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.image.interface.imagetexture"   
)
private

◆  LoadTexture()

static MAXON_METHOD Result <ImageTextureRef> LoadTexture ( const Url name ,
const TimeValue targetTime = TimeValue() ,
MEDIASESSIONFLAGS   flags = MEDIASESSIONFLAGS::NONE ,
const Class < ImagePixelStorage > &  pixelStorageClass = GetNormalPixelStorageClass() ,
const LayerSetInterface layerSet = nullptr  
)
static

Creates a new texture and loads the given url into this texture.

参数
[in] name Url to load.
[in] targetTime Target time to receive the media samples from.
[in] flags See MEDIASESSIONFLAGS for details.
[in] pixelStorageClass Defines the storage class for all layers of the texture. See ImagePixelStorageClasses ::
[in] layerSet 可选 LayerSet or nullptr.
返回
Return an instance to a MediaSessionRef for further reading if necessary.

◆  Load()

MAXON_METHOD Result <MediaSessionRef> Load ( const Url url ,
const TimeValue targetTime ,
MEDIASESSIONFLAGS   flags ,
const Class < ImagePixelStorage > &  pixelStorageClass = GetZeroRefClass< ImagePixelStorage >>() ,
const LayerSetInterface layerSet = nullptr  
)

Loads a media into this texture.

参数
[in] url Url to the media to load.
[in] targetTime Target time to receive the media samples from.
[in] flags See MEDIASESSIONFLAGS for details.
[in] pixelStorageClass Defines the storage class for all layers of the texture. See ImagePixelStorageClasses ::
[in] layerSet 可选 LayerSet or nullptr.
返回
Return an instance to a MediaSessionRef for further reading if necessary.

◆  Save() [1/2]

MAXON_METHOD Result <void> Save ( const MediaOutputRef &  fileFormat ,
MEDIASESSIONFLAGS   flags ,
MediaSessionRef *  returnOpenSession = nullptr  
) const

Saves this texture using the media session interface.

参数
[in] fileFormat A ready to use MediaOutputRef which will be used as output node of the media session.
[in] flags See MEDIASESSIONFLAGS for details.
[in] returnOpenSession If nullptr the session will be closed directly. If a pointer to a MediaSessionRef is given the session will stay open. Don't forget session.Close() in that case.
返回
OK on success.

◆  Save() [2/2]

MAXON_FUNCTION Result <void> Save ( const Url fileName ,
const MediaOutputUrlRef &  fileFormat ,
MEDIASESSIONFLAGS   flags ,
MediaSessionRef *  returnOpenSession = nullptr  
) const

Saves this texture using the media session interface. This function simplifies the use of registered ImageSaverClasses from their registry. The usage is simple:

imageTexture.Save(url, ImageSaverClasses::Bmp) iferr_return ;
参数
[in] fileName Url to write to.
[in] fileFormat A MediaOutputUrlRef which will be used as output node of the media session. MediaOutputUrlRef::SetOutputUrl will be called in this function to set the url.
[in] flags See MEDIASESSIONFLAGS for details.
[in] returnOpenSession If nullptr the session will be closed directly. If a pointer to a MediaSessionRef is given the session will stay open. Don't forget session.Close() in that case.
返回
OK on success.
iferr_return
#define iferr_return
定义: resultbase.h:1434