Struct opencv::core::Point_

source ·
#[repr(C)]
pub struct Point_<T> { pub x: T, pub y: T, }
Expand description

Fields§

§x: T§y: T

Implementations§

source§

impl<T> Point_<T>

source

pub fn new(x: T, y: T) -> Self

source

pub fn from_vec2(vec: VecN<T, 2>) -> Self

source

pub fn from_size(sz: Size_<T>) -> Self

source

pub fn cross(self, pt: Point_<T>) -> f64where f64: From<T>,

source

pub fn dot(self, pt: Point_<T>) -> Twhere T: NumOps,

source

pub fn ddot(self, pt: Point_<T>) -> f64where f64: From<T>,

source

pub fn inside(self, rect: Rect_<T>) -> boolwhere T: PartialOrd + Add<Output = T> + Copy,

source

pub fn norm(self) -> f64where f64: From<T>,

source

pub fn to<D: NumCast>(self) -> Option<Point_<D>>where T: ToPrimitive,

source

pub fn to_vec2(self) -> VecN<T, 2>

Trait Implementations§

source§

impl<P, R> Add<Point_<P>> for Rect_<R>where Self: AddAssign<Point_<P>>,

§

type Output = Rect_<R>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Point_<P>) -> Self::Output

Performs the + operation. Read more
source§

impl<T> Add<Point_<T>> for Point_<T>where Self: AddAssign,

§

type Output = Point_<T>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl<P, R: AddAssign<P>> AddAssign<Point_<P>> for Rect_<R>

source§

fn add_assign(&mut self, rhs: Point_<P>)

Performs the += operation. Read more
source§

impl<T: AddAssign> AddAssign<Point_<T>> for Point_<T>

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl<T: Clone> Clone for Point_<T>

source§

fn clone(&self) -> Point_<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: DataType> DataType for Point_<T>

source§

fn opencv_depth() -> i32

source§

fn opencv_channels() -> i32

source§

fn opencv_type() -> i32

source§

fn depth() -> i32

👎Deprecated: Use opencv_depth() instead. Removal in July 2023
source§

fn channels() -> i32

👎Deprecated: Use opencv_channels() instead. Removal in July 2023
source§

fn typ() -> i32

👎Deprecated: Use opencv_type() instead. Removal in July 2023
source§

impl<T: Debug> Debug for Point_<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default> Default for Point_<T>

source§

fn default() -> Point_<T>

Returns the “default value” for a type. Read more
source§

impl<T> Div<T> for Point_<T>where Self: DivAssign<T>,

§

type Output = Point_<T>

The resulting type after applying the / operator.
source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
source§

impl<T: DivAssign + Copy> DivAssign<T> for Point_<T>

source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
source§

impl<T> From<(T, T)> for Point_<T>

source§

fn from(s: (T, T)) -> Self

Converts to this type from the input type.
source§

impl<T: Zero> From<Point_<T>> for Point3_<T>

source§

fn from(s: Point_<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Point_<T>> for Size_<T>

source§

fn from(s: Point_<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<Size_<T>> for Point_<T>

source§

fn from(s: Size_<T>) -> Self

Converts to this type from the input type.
source§

impl<T> From<VecN<T, 2>> for Point_<T>

source§

fn from(s: VecN<T, 2>) -> Self

Converts to this type from the input type.
source§

impl<T> Mul<T> for Point_<T>where Self: MulAssign<T>,

§

type Output = Point_<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
source§

impl<T: MulAssign + Copy> MulAssign<T> for Point_<T>

source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
source§

impl<T: PartialEq> PartialEq<Point_<T>> for Point_<T>

source§

fn eq(&self, other: &Point_<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd<Point_<T>> for Point_<T>

source§

fn partial_cmp(&self, other: &Point_<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<P, R> Sub<Point_<P>> for Rect_<R>where Self: SubAssign<Point_<P>>,

§

type Output = Rect_<R>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Point_<P>) -> Self::Output

Performs the - operation. Read more
source§

impl<T> Sub<Point_<T>> for Point_<T>where Self: SubAssign,

§

type Output = Point_<T>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl<P, R: SubAssign<P>> SubAssign<Point_<P>> for Rect_<R>

source§

fn sub_assign(&mut self, rhs: Point_<P>)

Performs the -= operation. Read more
source§

impl<T: SubAssign> SubAssign<Point_<T>> for Point_<T>

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl<T: Copy> Copy for Point_<T>

source§

impl<T: Eq> Eq for Point_<T>

source§

impl<T> StructuralEq for Point_<T>

source§

impl<T> StructuralPartialEq for Point_<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Point_<T>where T: RefUnwindSafe,

§

impl<T> Send for Point_<T>where T: Send,

§

impl<T> Sync for Point_<T>where T: Sync,

§

impl<T> Unpin for Point_<T>where T: Unpin,

§

impl<T> UnwindSafe for Point_<T>where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.