neuray API Programmer's Manual

itexture.h File Reference

Description

Scene element Texture.

Code Example

itexture.h

‎//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************

#ifndef MI_NEURAYLIB_ITEXTURE_H
#define MI_NEURAYLIB_ITEXTURE_H

#include <mi/neuraylib/iscene_element.h>
#include <mi/neuraylib/typedefs.h>
#include <mi/neuraylib/version.h>

namespace mi {

namespace neuraylib {

class IImage;












enum Texture_flag
{
    TEXTURE_DO_TRANSFORM =    4, 
    TEXTURE_DO_REPEAT    =    8, 
    TEXTURE_DO_CROP      =   16, 
    TEXTURE_TORUS_X      =   32, 
    TEXTURE_TORUS_Y      =   64, 
    TEXTURE_TORUS_Z      =  128, 
    TEXTURE_ALT_X        =  256, 
    TEXTURE_ALT_Y        =  512, 
    TEXTURE_ALT_Z        = 1024, 
    TEXTURE_FLAG_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Texture_flag) == sizeof( Uint32));

enum Texture_compression
{
    TEXTURE_NO_COMPRESSION     = 0, 
    TEXTURE_MEDIUM_COMPRESSION = 1, 
    TEXTURE_HIGH_COMPRESSION   = 2, 
    TEXTURE_COMPRESSION_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Texture_compression) == sizeof( Uint32));

enum Filter_type
{
    FILTER_BOX          = 0,    
    FILTER_TRIANGLE     = 1,    
    FILTER_GAUSS        = 2,    
    FILTER_CMITCHELL    = 3,    
    FILTER_CLANCZOS     = 4,    
    FILTER_FAST         = 5,    
    FILTER_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Filter_type) == sizeof( Uint32));

class ITexture :
    public base::Interface_declare<0x012c847c,0xaf47,0x4338,0xb7,0xc4,0x78,0x67,0xa3,0x55,0x47,0x18,
                                   neuraylib::IScene_element>
{
public:


    virtual Sint32 
               set_image( const char* name) = 0;

    virtual const char* get_image() const = 0;




    virtual void set_gamma( Float32 gamma) = 0;

    virtual Float32 
               get_gamma() const = 0;

    virtual Float32 
               get_effective_gamma() const = 0;




    virtual Uint32 
               get_filter() const = 0;

    virtual void set_filter( Uint32 type) = 0;

    virtual Float32 
               get_blur() const = 0;

    virtual void set_blur( Float32 blur) = 0;

    virtual const Float32_4_4_struct& get_transform() const = 0;

    virtual void set_transform( const Float32_4_4_struct& transform) = 0;

    virtual const Float32_3_struct& get_repeat() const = 0;

    virtual void set_repeat( const Float32_3_struct& repeat) = 0;

    virtual const Float32_3_struct& get_crop_min() const = 0;

    virtual void set_crop_min( const Float32_3_struct& crop_min) = 0;

    virtual const Float32_3_struct& get_crop_max() const = 0;

    virtual void set_crop_max( const Float32_3_struct& crop_max) = 0;

    virtual Uint32 
               get_flags() const = 0;

    virtual void set_flags( Uint32 value) = 0;




    virtual void set_compression( Texture_compression compression) = 0;

    virtual Texture_compression 
               get_compression() const = 0;

};
 // end group mi_neuray_misc

} // namespace neuraylib

#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::FILTER_BOX;
using neuraylib::FILTER_CLANCZOS;
using neuraylib::FILTER_CMITCHELL;
using neuraylib::FILTER_FAST;
using neuraylib::FILTER_FORCE_32_BIT;
using neuraylib::FILTER_GAUSS;
using neuraylib::FILTER_TRIANGLE;
using neuraylib::Filter_type;
using neuraylib::IImage;
using neuraylib::IScene_element;
using neuraylib::ITexture;
using neuraylib::TEXTURE_ALT_X;
using neuraylib::TEXTURE_ALT_Y;
using neuraylib::TEXTURE_ALT_Z;
using neuraylib::TEXTURE_COMPRESSION_FORCE_32_BIT;
using neuraylib::TEXTURE_DO_CROP;
using neuraylib::TEXTURE_DO_REPEAT;
using neuraylib::TEXTURE_DO_TRANSFORM;
using neuraylib::TEXTURE_FLAG_FORCE_32_BIT;
using neuraylib::TEXTURE_HIGH_COMPRESSION;
using neuraylib::TEXTURE_MEDIUM_COMPRESSION;
using neuraylib::TEXTURE_NO_COMPRESSION;
using neuraylib::TEXTURE_TORUS_X;
using neuraylib::TEXTURE_TORUS_Y;
using neuraylib::TEXTURE_TORUS_Z;
using neuraylib::Texture_compression;
using neuraylib::Texture_flag;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION

} // namespace mi

#endif // MI_NEURAYLIB_ITEXTURE_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
Textures add image processing options to images. More...

Enumerations

enum  {FILTER_BOX = 0, FILTER_TRIANGLE = 1, FILTER_GAUSS = 2, FILTER_CMITCHELL = 3, FILTER_CLANCZOS = 4, FILTER_FAST = 5, FILTER_FORCE_32_BIT = 0xffffffffU }
Supported filter types. More...
enum  {TEXTURE_NO_COMPRESSION = 0, TEXTURE_MEDIUM_COMPRESSION = 1, TEXTURE_HIGH_COMPRESSION = 2, TEXTURE_COMPRESSION_FORCE_32_BIT = 0xffffffffU }
Texture compression method. More...
enum  {TEXTURE_DO_TRANSFORM = 4, TEXTURE_DO_REPEAT = 8, TEXTURE_DO_CROP = 16, TEXTURE_TORUS_X = 32, TEXTURE_TORUS_Y = 64, TEXTURE_TORUS_Z = 128, TEXTURE_ALT_X = 256, TEXTURE_ALT_Y = 512, TEXTURE_ALT_Z = 1024, TEXTURE_FLAG_FORCE_32_BIT = 0xffffffffU }
Various texture flags. More...