MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Image:

Public Member Functions

auto assign_from_another (_other:&meshlib::Image) -> &mut meshlib::Image
auto index_mut (p:&meshlib::Vector2i) -> &mut meshlib::Color
auto index (p:&meshlib::Vector2i) const -> meshlib::Color
auto heap_bytes () const -> usize
auto sample_discrete (pos:&meshlib::Vector2f) const -> meshlib::Color
auto sample_bilinear (pos:&meshlib::Vector2f) const -> meshlib::Color
auto sample (filter:meshlib::FilterType, pos:&meshlib::Vector2f) const -> meshlib::Color
auto pixels () const -> &meshlib::std_vector_MR_Color
auto pixels_mut () -> &mut meshlib::std_vector_MR_Color
void set_pixels (value:&meshlib::std_vector_MR_Color)
auto resolution () const -> &meshlib::Vector2i
auto resolution_mut () -> &mut meshlib::Vector2i
void set_resolution (value:meshlib::Vector2i)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::Image >
static auto construct_from (pixels:&meshlib::std_vector_MR_Color, resolution:meshlib::Vector2i) -> meshlib::Owned< meshlib::Image >
static auto construct_from_another (_other:&meshlib::Image) -> meshlib::Owned< meshlib::Image >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)
Static Public Member Functions inherited from meshlib::CppCopy
static auto copy (ptr:*const Self) -> *mut Self

Detailed Description

struct to hold Image data Generated from class MR::Image. Derived classes: Direct: (non-virtual) MR::MeshTexture

Generated from class MR::Image. Heap-allocated instances are held in Owned<Image>.

Member Function Documentation

◆ assign_from_another()

auto meshlib::Image::assign_from_another ( _other:&meshlib::Image ) -> &mut meshlib::Image

Generated from method MR::Image::operator=.

Calls MR_Image_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ construct_from()

auto meshlib::Image::construct_from ( pixels:&meshlib::std_vector_MR_Color ,
resolution:meshlib::Vector2i  ) -> meshlib::Owned< meshlib::Image >
static

Constructs MR::Image elementwise.

Calls MR_Image_ConstructFrom(). 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.

◆ construct_from_another()

auto meshlib::Image::construct_from_another ( _other:&meshlib::Image ) -> meshlib::Owned< meshlib::Image >
static

Generated from constructor MR::Image::Image.

Calls MR_Image_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ heap_bytes()

auto meshlib::Image::heap_bytes ( ) const -> usize

returns the amount of memory this object occupies on heap Generated from method MR::Image::heapBytes.

Calls MR_Image_heapBytes().

◆ index()

auto meshlib::Image::index ( p:&meshlib::Vector2i ) const -> meshlib::Color

Generated from method MR::Image::operator[].

Calls MR_Image_index().

◆ index_mut()

auto meshlib::Image::index_mut ( p:&meshlib::Vector2i ) -> &mut meshlib::Color

fetches some texture element specified by integer coordinates Generated from method MR::Image::operator[].

Calls MR_Image_index_mut().

◆ new()

auto meshlib::Image::new ( ) -> meshlib::Owned< meshlib::Image >
static

Constructs an empty (default-constructed) instance.

Calls MR_Image_DefaultConstruct().

◆ pixels()

auto meshlib::Image::pixels ( ) const -> &meshlib::std_vector_MR_Color

Returns a pointer to a member variable of class MR::Image named pixels.

Calls MR_Image_Get_pixels(). The reference to this object might be preserved as the return value.

◆ pixels_mut()

auto meshlib::Image::pixels_mut ( ) -> &mut meshlib::std_vector_MR_Color

Returns a mutable pointer to a member variable of class MR::Image named pixels.

Calls MR_Image_GetMutable_pixels(). The reference to this object might be preserved as the return value.

◆ resolution()

auto meshlib::Image::resolution ( ) const -> &meshlib::Vector2i

Returns a pointer to a member variable of class MR::Image named resolution.

Calls MR_Image_Get_resolution(). The reference to this object might be preserved as the return value.

◆ resolution_mut()

auto meshlib::Image::resolution_mut ( ) -> &mut meshlib::Vector2i

Returns a mutable pointer to a member variable of class MR::Image named resolution.

Calls MR_Image_GetMutable_resolution(). The reference to this object might be preserved as the return value.

◆ sample()

auto meshlib::Image::sample ( filter:meshlib::FilterType ,
pos:&meshlib::Vector2f  ) const -> meshlib::Color

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.

Calls MR_Image_sample().

◆ sample_bilinear()

auto meshlib::Image::sample_bilinear ( pos:&meshlib::Vector2f ) const -> meshlib::Color

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.

Calls MR_Image_sampleBilinear().

◆ sample_discrete()

auto meshlib::Image::sample_discrete ( pos:&meshlib::Vector2f ) const -> meshlib::Color

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.

Calls MR_Image_sampleDiscrete().

◆ set_pixels()

void meshlib::Image::set_pixels ( value:&meshlib::std_vector_MR_Color )

Modifies a member variable of class MR::Image named pixels.

Calls MR_Image_Set_pixels(). The reference to the parameter value might be preserved in this object in element pixels.

◆ set_resolution()

void meshlib::Image::set_resolution ( value:meshlib::Vector2i )

Modifies a member variable of class MR::Image named resolution.

Calls MR_Image_Set_resolution(). The reference to the parameter value might be preserved in this object in element resolution.


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