MeshLib Rust Docs
Loading...
Searching...
No Matches

encodes a point inside a triangle using barycentric coordinates More...

Inheritance diagram for meshlib::TriPointf:

Public Member Functions

auto assign_from_another (_other:&meshlib::TriPointf) -> &mut meshlib::TriPointf
auto lnext () const -> meshlib::Owned< meshlib::TriPointf >
auto in_vertex () const -> core::ffi::c_int
auto on_edge () const -> core::ffi::c_int
auto op_equal (rhs:&meshlib::TriPointf) const -> bool
auto op_not_equal (rhs:&meshlib::TriPointf) const -> bool
auto a () const -> &f32
auto a_mut () -> &mut f32
void set_a (value:f32)
auto b () const -> &f32
auto b_mut () -> &mut f32
void set_b (value:f32)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::TriPointf >
static auto construct_from_another (_other:&meshlib::TriPointf) -> meshlib::Owned< meshlib::TriPointf >
static auto construct_1 (_1:&meshlib::NoInit) -> meshlib::Owned< meshlib::TriPointf >
static auto construct_2 (a:f32, b:f32) -> meshlib::Owned< meshlib::TriPointf >
static auto construct_5 (p:&meshlib::Vector3f, v0:&meshlib::Vector3f, v1:&meshlib::Vector3f, v2:&meshlib::Vector3f, edge:Option< core::ffi::c_int >) -> meshlib::Owned< meshlib::TriPointf >
static auto construct_4 (p:&meshlib::Vector3f, v1:&meshlib::Vector3f, v2:&meshlib::Vector3f, edge:Option< core::ffi::c_int >) -> meshlib::Owned< meshlib::TriPointf >
static auto eps () -> *const f32
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

encodes a point inside a triangle using barycentric coordinates

Notations used below: v0, v1, v2 - points of the triangle Generated from class MR::TriPointf.

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

Member Function Documentation

◆ a()

auto meshlib::TriPointf::a ( ) const -> &f32

< a in [0,1], a=0 => point is on [v2,v0] edge, a=1 => point is in v1 Returns a pointer to a member variable of class MR::TriPointf named a.

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

◆ a_mut()

auto meshlib::TriPointf::a_mut ( ) -> &mut f32

< a in [0,1], a=0 => point is on [v2,v0] edge, a=1 => point is in v1 Returns a mutable pointer to a member variable of class MR::TriPointf named a.

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

◆ assign_from_another()

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

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

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

◆ b()

auto meshlib::TriPointf::b ( ) const -> &f32

< b in [0,1], b=0 => point is on [v0,v1] edge, b=1 => point is in v2 Returns a pointer to a member variable of class MR::TriPointf named b.

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

◆ b_mut()

auto meshlib::TriPointf::b_mut ( ) -> &mut f32

< b in [0,1], b=0 => point is on [v0,v1] edge, b=1 => point is in v2 Returns a mutable pointer to a member variable of class MR::TriPointf named b.

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

◆ construct_1()

auto meshlib::TriPointf::construct_1 ( _1:&meshlib::NoInit ) -> meshlib::Owned< meshlib::TriPointf >
static

Generated from constructor MR::TriPointf::TriPointf.

Calls MR_TriPointf_Construct_1(). The reference to the parameter _1 might be preserved in the constructed object.

◆ construct_2()

auto meshlib::TriPointf::construct_2 ( a:f32 ,
b:f32  ) -> meshlib::Owned< meshlib::TriPointf >
static

Generated from constructor MR::TriPointf::TriPointf.

Calls MR_TriPointf_Construct_2().

◆ construct_4()

auto meshlib::TriPointf::construct_4 ( p:&meshlib::Vector3f ,
v1:&meshlib::Vector3f ,
v2:&meshlib::Vector3f ,
edge:Option< core::ffi::c_int >  ) -> meshlib::Owned< meshlib::TriPointf >
static

given a point coordinates and triangle (0,v1,v2) computes barycentric coordinates of the point; if the point is known to be on an edge, numbered as in onEdge(), then pass it to place the point exactly there Generated from constructor MR::TriPointf::TriPointf.

Calls MR_TriPointf_Construct_4(). The reference to the parameter p might be preserved in the constructed object. The reference to the parameter v1 might be preserved in the constructed object. The reference to the parameter v2 might be preserved in the constructed object.

◆ construct_5()

auto meshlib::TriPointf::construct_5 ( p:&meshlib::Vector3f ,
v0:&meshlib::Vector3f ,
v1:&meshlib::Vector3f ,
v2:&meshlib::Vector3f ,
edge:Option< core::ffi::c_int >  ) -> meshlib::Owned< meshlib::TriPointf >
static

given a point coordinates and triangle (v0,v1,v2) computes barycentric coordinates of the point; if the point is known to be on an edge, numbered as in onEdge(), then pass it to place the point exactly there Generated from constructor MR::TriPointf::TriPointf.

Calls MR_TriPointf_Construct_5(). The reference to the parameter p might be preserved in the constructed object. The reference to the parameter v0 might be preserved in the constructed object. The reference to the parameter v1 might be preserved in the constructed object. The reference to the parameter v2 might be preserved in the constructed object.

◆ construct_from_another()

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

Generated from constructor MR::TriPointf::TriPointf.

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

◆ eps()

auto meshlib::TriPointf::eps ( ) -> *const f32
static

Returns a pointer to a member variable of class MR::TriPointf named eps.

Calls MR_TriPointf_Get_eps().

◆ in_vertex()

auto meshlib::TriPointf::in_vertex ( ) const -> core::ffi::c_int

returns [0,2] if the point is in a vertex or -1 otherwise Generated from method MR::TriPointf::inVertex.

Calls MR_TriPointf_inVertex().

◆ lnext()

auto meshlib::TriPointf::lnext ( ) const -> meshlib::Owned< meshlib::TriPointf >

represents the same point relative to next edge in the same triangle Generated from method MR::TriPointf::lnext.

Calls MR_TriPointf_lnext().

◆ new()

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

Constructs an empty (default-constructed) instance.

Calls MR_TriPointf_DefaultConstruct().

◆ on_edge()

auto meshlib::TriPointf::on_edge ( ) const -> core::ffi::c_int

returns [0,2] if the point is on edge or -1 otherwise: 0 means edge [v1,v2]; 1 means edge [v2,v0]; 2 means edge [v0,v1] Generated from method MR::TriPointf::onEdge.

Calls MR_TriPointf_onEdge().

◆ op_equal()

auto meshlib::TriPointf::op_equal ( rhs:&meshlib::TriPointf ) const -> bool

returns true if two points have equal (a,b) representation Generated from method MR::TriPointf::operator==.

Calls MR_equal_MR_TriPointf().

◆ op_not_equal()

auto meshlib::TriPointf::op_not_equal ( rhs:&meshlib::TriPointf ) const -> bool

returns true if two points have equal (a,b) representation Generated from method MR::TriPointf::operator!=.

Calls MR_not_equal_MR_TriPointf().

◆ set_a()

void meshlib::TriPointf::set_a ( value:f32 )

< a in [0,1], a=0 => point is on [v2,v0] edge, a=1 => point is in v1 Modifies a member variable of class MR::TriPointf named a.

Calls MR_TriPointf_Set_a().

◆ set_b()

void meshlib::TriPointf::set_b ( value:f32 )

< b in [0,1], b=0 => point is on [v0,v1] edge, b=1 => point is in v2 Modifies a member variable of class MR::TriPointf named b.

Calls MR_TriPointf_Set_b().


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