MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshTexture.h File Reference
#include <MRCMesh/MRColor.h>
#include <MRCMesh/MREnums.h>
#include <MRCMesh/MRVector2.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_Image MR_Image
 
typedef struct MR_Vector2f MR_Vector2f
 
typedef struct MR_std_vector_MR_Color MR_std_vector_MR_Color
 
typedef struct MR_MeshTexture MR_MeshTexture
 

Functions

MRC_API const MR_FilterTypeMR_MeshTexture_Get_filter (const MR_MeshTexture *_this)
 
MRC_API void MR_MeshTexture_Set_filter (MR_MeshTexture *_this, MR_FilterType value)
 
MRC_API MR_FilterTypeMR_MeshTexture_GetMutable_filter (MR_MeshTexture *_this)
 
MRC_API const MR_WrapTypeMR_MeshTexture_Get_wrap (const MR_MeshTexture *_this)
 
MRC_API void MR_MeshTexture_Set_wrap (MR_MeshTexture *_this, MR_WrapType value)
 
MRC_API MR_WrapTypeMR_MeshTexture_GetMutable_wrap (MR_MeshTexture *_this)
 
MRC_API const MR_std_vector_MR_ColorMR_MeshTexture_Get_pixels (const MR_MeshTexture *_this)
 
MRC_API void MR_MeshTexture_Set_pixels (MR_MeshTexture *_this, MR_PassBy value_pass_by, MR_std_vector_MR_Color *value)
 
MRC_API MR_std_vector_MR_ColorMR_MeshTexture_GetMutable_pixels (MR_MeshTexture *_this)
 
MRC_API const MR_Vector2iMR_MeshTexture_Get_resolution (const MR_MeshTexture *_this)
 
MRC_API void MR_MeshTexture_Set_resolution (MR_MeshTexture *_this, MR_Vector2i value)
 
MRC_API MR_Vector2iMR_MeshTexture_GetMutable_resolution (MR_MeshTexture *_this)
 
MRC_API MR_MeshTextureMR_MeshTexture_DefaultConstruct (void)
 
MRC_API MR_MeshTextureMR_MeshTexture_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_MeshTextureMR_MeshTexture_OffsetPtr (const MR_MeshTexture *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_MeshTextureMR_MeshTexture_OffsetMutablePtr (MR_MeshTexture *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API const MR_ImageMR_MeshTexture_UpcastTo_MR_Image (const MR_MeshTexture *object)
 
MRC_API MR_ImageMR_MeshTexture_MutableUpcastTo_MR_Image (MR_MeshTexture *object)
 Upcasts an instance of MR::MeshTexture to its base class MR::Image.
 
MRC_API MR_MeshTextureMR_MeshTexture_ConstructFromAnother (MR_PassBy _other_pass_by, MR_MeshTexture *_other)
 
MRC_API void MR_MeshTexture_Destroy (const MR_MeshTexture *_this)
 Destroys a heap-allocated instance of MR_MeshTexture. Does nothing if the pointer is null.
 
MRC_API void MR_MeshTexture_DestroyArray (const MR_MeshTexture *_this)
 Destroys a heap-allocated array of MR_MeshTexture. Does nothing if the pointer is null.
 
MRC_API MR_MeshTextureMR_MeshTexture_AssignFromAnother (MR_MeshTexture *_this, MR_PassBy _other_pass_by, MR_MeshTexture *_other)
 
MRC_API MR_uint64_t MR_MeshTexture_heapBytes (const MR_MeshTexture *_this)
 
MRC_API MR_Color MR_MeshTexture_sampleDiscrete (const MR_MeshTexture *_this, const MR_Vector2f *pos)
 
MRC_API MR_Color MR_MeshTexture_sampleBilinear (const MR_MeshTexture *_this, const MR_Vector2f *pos)
 
MRC_API MR_Color MR_MeshTexture_sample (const MR_MeshTexture *_this, MR_FilterType filter, const MR_Vector2f *pos)
 

Typedef Documentation

◆ MR_Image

typedef struct MR_Image MR_Image

◆ MR_MeshTexture

Generated from class MR::MeshTexture. Base classes: Direct: (non-virtual) MR::Image Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_vector_MR_Color

◆ MR_Vector2f

typedef struct MR_Vector2f MR_Vector2f

Function Documentation

◆ MR_MeshTexture_AssignFromAnother()

MRC_API MR_MeshTexture * MR_MeshTexture_AssignFromAnother ( MR_MeshTexture * _this,
MR_PassBy _other_pass_by,
MR_MeshTexture * _other )

Generated from method MR::MeshTexture::operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_ConstructFromAnother()

MRC_API MR_MeshTexture * MR_MeshTexture_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_MeshTexture * _other )

Generated from constructor MR::MeshTexture::MeshTexture. Never returns null. Returns an instance allocated on the heap! Must call MR_MeshTexture_Destroy() to free it when you're done using it.

◆ MR_MeshTexture_DefaultConstruct()

MRC_API MR_MeshTexture * MR_MeshTexture_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_MeshTexture_Destroy() to free it when you're done using it.

◆ MR_MeshTexture_DefaultConstructArray()

MRC_API MR_MeshTexture * MR_MeshTexture_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_MeshTexture_DestroyArray(). Use MR_MeshTexture_OffsetMutablePtr() and MR_MeshTexture_OffsetPtr() to access the array elements.

◆ MR_MeshTexture_Destroy()

MRC_API void MR_MeshTexture_Destroy ( const MR_MeshTexture * _this)

Destroys a heap-allocated instance of MR_MeshTexture. Does nothing if the pointer is null.

◆ MR_MeshTexture_DestroyArray()

MRC_API void MR_MeshTexture_DestroyArray ( const MR_MeshTexture * _this)

Destroys a heap-allocated array of MR_MeshTexture. Does nothing if the pointer is null.

◆ MR_MeshTexture_Get_filter()

MRC_API const MR_FilterType * MR_MeshTexture_Get_filter ( const MR_MeshTexture * _this)

Returns a pointer to a member variable of class MR::MeshTexture named filter. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_Get_pixels()

MRC_API const MR_std_vector_MR_Color * MR_MeshTexture_Get_pixels ( const MR_MeshTexture * _this)

Returns a pointer to a member variable of class MR::MeshTexture named pixels. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_Get_resolution()

MRC_API const MR_Vector2i * MR_MeshTexture_Get_resolution ( const MR_MeshTexture * _this)

Returns a pointer to a member variable of class MR::MeshTexture named resolution. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_Get_wrap()

MRC_API const MR_WrapType * MR_MeshTexture_Get_wrap ( const MR_MeshTexture * _this)

Returns a pointer to a member variable of class MR::MeshTexture named wrap. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_GetMutable_filter()

MRC_API MR_FilterType * MR_MeshTexture_GetMutable_filter ( MR_MeshTexture * _this)

Returns a mutable pointer to a member variable of class MR::MeshTexture named filter. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_GetMutable_pixels()

MRC_API MR_std_vector_MR_Color * MR_MeshTexture_GetMutable_pixels ( MR_MeshTexture * _this)

Returns a mutable pointer to a member variable of class MR::MeshTexture named pixels. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_GetMutable_resolution()

MRC_API MR_Vector2i * MR_MeshTexture_GetMutable_resolution ( MR_MeshTexture * _this)

Returns a mutable pointer to a member variable of class MR::MeshTexture named resolution. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_GetMutable_wrap()

MRC_API MR_WrapType * MR_MeshTexture_GetMutable_wrap ( MR_MeshTexture * _this)

Returns a mutable pointer to a member variable of class MR::MeshTexture named wrap. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_MeshTexture_heapBytes()

MRC_API MR_uint64_t MR_MeshTexture_heapBytes ( const MR_MeshTexture * _this)

returns the amount of memory this object occupies on heap Generated from method MR::MeshTexture::heapBytes. Parameter _this can not be null. It is a single object.

◆ MR_MeshTexture_MutableUpcastTo_MR_Image()

MRC_API MR_Image * MR_MeshTexture_MutableUpcastTo_MR_Image ( MR_MeshTexture * object)

Upcasts an instance of MR::MeshTexture to its base class MR::Image.

◆ MR_MeshTexture_OffsetMutablePtr()

MRC_API MR_MeshTexture * MR_MeshTexture_OffsetMutablePtr ( MR_MeshTexture * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_MeshTexture_OffsetPtr()

MRC_API const MR_MeshTexture * MR_MeshTexture_OffsetPtr ( const MR_MeshTexture * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_MeshTexture_sample()

MRC_API MR_Color MR_MeshTexture_sample ( const MR_MeshTexture * _this,
MR_FilterType filter,
const MR_Vector2f * pos )

Given texture position in [0,1]x[0,1] (which is clamped if necessary), returns sampled color at it according to given filter Generated from method MR::MeshTexture::sample. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.

◆ MR_MeshTexture_sampleBilinear()

MRC_API MR_Color MR_MeshTexture_sampleBilinear ( const MR_MeshTexture * _this,
const MR_Vector2f * pos )

Given texture position in [0,1]x[0,1] (which is clamped if necessary), returns bilinear interpolated color at it Generated from method MR::MeshTexture::sampleBilinear. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.

◆ MR_MeshTexture_sampleDiscrete()

MRC_API MR_Color MR_MeshTexture_sampleDiscrete ( const MR_MeshTexture * _this,
const MR_Vector2f * pos )

Given texture position in [0,1]x[0,1] (which is clamped if necessary), returns the color of the closest pixel Generated from method MR::MeshTexture::sampleDiscrete. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.

◆ MR_MeshTexture_Set_filter()

MRC_API void MR_MeshTexture_Set_filter ( MR_MeshTexture * _this,
MR_FilterType value )

Modifies a member variable of class MR::MeshTexture named filter. Parameter _this can not be null. It is a single object.

◆ MR_MeshTexture_Set_pixels()

MRC_API void MR_MeshTexture_Set_pixels ( MR_MeshTexture * _this,
MR_PassBy value_pass_by,
MR_std_vector_MR_Color * value )

Modifies a member variable of class MR::MeshTexture named pixels. Parameter _this can not be null. It is a single object.

◆ MR_MeshTexture_Set_resolution()

MRC_API void MR_MeshTexture_Set_resolution ( MR_MeshTexture * _this,
MR_Vector2i value )

Modifies a member variable of class MR::MeshTexture named resolution. Parameter _this can not be null. It is a single object.

◆ MR_MeshTexture_Set_wrap()

MRC_API void MR_MeshTexture_Set_wrap ( MR_MeshTexture * _this,
MR_WrapType value )

Modifies a member variable of class MR::MeshTexture named wrap. Parameter _this can not be null. It is a single object.

◆ MR_MeshTexture_UpcastTo_MR_Image()

MRC_API const MR_Image * MR_MeshTexture_UpcastTo_MR_Image ( const MR_MeshTexture * object)

Upcasts an instance of MR::MeshTexture to its base class MR::Image. This version is acting on mutable pointers.