#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_MeshTexture | MR_MeshTexture |
| typedef struct MR_Vector2f | MR_Vector2f |
| typedef struct MR_std_vector_MR_Color | MR_std_vector_MR_Color |
| typedef struct MR_Image | MR_Image |
struct to hold Image data Generated from class MR::Image. Derived classes: Direct: (non-virtual) MR::MeshTexture 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).
| typedef struct MR_MeshTexture MR_MeshTexture |
| typedef struct MR_std_vector_MR_Color MR_std_vector_MR_Color |
| typedef struct MR_Vector2f MR_Vector2f |
| MRC_API MR_Image * MR_Image_AssignFromAnother | ( | MR_Image * | _this, |
| MR_PassBy | _other_pass_by, | ||
| MR_Image * | _other ) |
Generated from method MR::Image::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it had previously.
| MRC_API MR_Image * MR_Image_ConstructFrom | ( | MR_PassBy | pixels_pass_by, |
| MR_std_vector_MR_Color * | pixels, | ||
| MR_Vector2i | resolution ) |
Constructs MR::Image elementwise. The reference to the parameter pixels might be preserved in the constructed object. The reference to the parameter resolution might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_Image_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it had previously.
Generated from constructor MR::Image::Image. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_Image_Destroy() to free it when you're done using it.
Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_Image_Destroy() to free it when you're done using it.
Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_Image_DestroyArray(). Use MR_Image_OffsetMutablePtr() and MR_Image_OffsetPtr() to access the array elements.
Destroys a heap-allocated instance of MR_Image. Does nothing if the pointer is null.
Destroys a heap-allocated array of MR_Image. Does nothing if the pointer is null.
| MRC_API const MR_std_vector_MR_Color * MR_Image_Get_pixels | ( | const MR_Image * | _this | ) |
Returns a pointer to a member variable of class MR::Image 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.
| MRC_API const MR_Vector2i * MR_Image_Get_resolution | ( | const MR_Image * | _this | ) |
Returns a pointer to a member variable of class MR::Image 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.
| MRC_API MR_std_vector_MR_Color * MR_Image_GetMutable_pixels | ( | MR_Image * | _this | ) |
Returns a mutable pointer to a member variable of class MR::Image 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.
| MRC_API MR_Vector2i * MR_Image_GetMutable_resolution | ( | MR_Image * | _this | ) |
Returns a mutable pointer to a member variable of class MR::Image 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.
| MRC_API MR_uint64_t MR_Image_heapBytes | ( | const MR_Image * | _this | ) |
returns the amount of memory this object occupies on heap Generated from method MR::Image::heapBytes. Parameter _this can not be null. It is a single object.
| MRC_API MR_Color * MR_Image_index | ( | MR_Image * | _this, |
| const MR_Vector2i * | p ) |
fetches some texture element specified by integer coordinates Generated from method MR::Image::operator[]. Parameter _this can not be null. It is a single object. Parameter p can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
| MRC_API MR_Color MR_Image_index_const | ( | const MR_Image * | _this, |
| const MR_Vector2i * | p ) |
Generated from method MR::Image::operator[]. Parameter _this can not be null. It is a single object. Parameter p can not be null. It is a single object.
| MRC_API MR_MeshTexture * MR_Image_MutableStaticDowncastTo_MR_MeshTexture | ( | MR_Image * | object | ) |
Downcasts an instance of MR::Image to a derived class MR::MeshTexture. This is a static downcast, it trusts the programmer that the target type is correct. Results in UB and returns an invalid pointer otherwise.
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. The reference to the parameter ptr might be preserved in the return value.
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. The reference to the parameter ptr might be preserved in the return value.
| MRC_API MR_Color MR_Image_sample | ( | const MR_Image * | _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::Image::sample. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.
| MRC_API MR_Color MR_Image_sampleBilinear | ( | const MR_Image * | _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::Image::sampleBilinear. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.
| MRC_API MR_Color MR_Image_sampleDiscrete | ( | const MR_Image * | _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::Image::sampleDiscrete. Parameter _this can not be null. It is a single object. Parameter pos can not be null. It is a single object.
| MRC_API void MR_Image_Set_pixels | ( | MR_Image * | _this, |
| MR_PassBy | value_pass_by, | ||
| MR_std_vector_MR_Color * | value ) |
Modifies a member variable of class MR::Image named pixels. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element pixels. When this function is called, this object will drop object references it had previously in pixels.
| MRC_API void MR_Image_Set_resolution | ( | MR_Image * | _this, |
| MR_Vector2i | value ) |
Modifies a member variable of class MR::Image named resolution. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element resolution. When this function is called, this object will drop object references it had previously in resolution.
| MRC_API const MR_MeshTexture * MR_Image_StaticDowncastTo_MR_MeshTexture | ( | const MR_Image * | object | ) |
Downcasts an instance of MR::Image to a derived class MR::MeshTexture. This is a static downcast, it trusts the programmer that the target type is correct. Results in UB and returns an invalid pointer otherwise. This version is acting on mutable pointers.