Struct rin::math::Rect [−][src]
Represents a rectangle with operations over it
Fields
pos: Point<T, U2>
width: T
height: T
Implementations
impl<T> Rect<T> where
T: Float + BaseNum,
[src]
impl<T> Rect<T> where
T: Float + BaseNum,
[src]pub fn aspect_ratio(&self) -> T
[src]
pub fn min_x(&self) -> T
[src]
pub fn max_x(&self) -> T
[src]
pub fn min_y(&self) -> T
[src]
pub fn max_y(&self) -> T
[src]
pub fn max_pos(&self) -> Point<T, U2>
[src]
pub fn min_pos(&self) -> Point<T, U2>
[src]
pub fn overlaps(&self, other: &Rect<T>) -> bool
[src]
pub fn intersection(&self, other: &Rect<T>) -> Rect<T>
[src]
impl<T> Rect<T> where
T: BaseNum + Copy,
[src]
impl<T> Rect<T> where
T: BaseNum + Copy,
[src]impl<T> Rect<T> where
T: BaseNum,
[src]
impl<T> Rect<T> where
T: BaseNum,
[src]Trait Implementations
impl<'de, T> Deserialize<'de> for Rect<T> where
T: BaseNum + Deserialize<'de>,
[src]
impl<'de, T> Deserialize<'de> for Rect<T> where
T: BaseNum + Deserialize<'de>,
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Rect<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Rect<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> InsideRect<T> for Rect<T> where
T: Float + BaseNum,
[src]
impl<T> InsideRect<T> for Rect<T> where
T: Float + BaseNum,
[src]impl RectToMesh for Rect<f32>
[src]
impl RectToMesh for Rect<f32>
[src]pub fn to_mesh(
self
) -> Mesh<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>
[src]
self
) -> Mesh<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>
pub fn to_color_mesh<C>(self, color: &C) -> Mesh<Vertex2DColor> where
C: ToRgba,
[src]
C: ToRgba,
pub fn to_tex_mesh(self, tex: Rect<f32>) -> Mesh<Vertex2DTex>
[src]
pub fn to_gradient_mesh<C>(self, gradient: &Gradient<C>) -> Mesh<Vertex2DColor> where
C: ToRgba + ToRgb,
[src]
C: ToRgba + ToRgb,
impl<T> Serialize for Rect<T> where
T: BaseNum + Serialize,
[src]
impl<T> Serialize for Rect<T> where
T: BaseNum + Serialize,
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<N1, N2> SubsetOf<Rect<N2>> for Rect<N1> where
N1: BaseNum,
N2: BaseNum + SupersetOf<N1>,
Point<N2, U2>: SupersetOf<Point<N1, U2>>,
[src]
impl<N1, N2> SubsetOf<Rect<N2>> for Rect<N1> where
N1: BaseNum,
N2: BaseNum + SupersetOf<N1>,
Point<N2, U2>: SupersetOf<Point<N1, U2>>,
[src]pub fn is_in_subset(t: &Rect<N2>) -> bool
[src]
pub fn from_superset_unchecked(t: &Rect<N2>) -> Rect<N1>
[src]
pub fn to_superset(&self) -> Rect<N2>
[src]
pub fn from_superset(element: &T) -> Option<Self>
[src]
impl<T> Copy for Rect<T> where
T: Copy + BaseNum,
[src]
T: Copy + BaseNum,
impl<T> StructuralPartialEq for Rect<T> where
T: BaseNum,
[src]
T: BaseNum,
Auto Trait Implementations
impl<T> RefUnwindSafe for Rect<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Rect<T> where
T: Send,
T: Send,
impl<T> Sync for Rect<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Rect<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Rect<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> AsUniform<dyn AsRef<[[f32; 4]; 4]> + 'static> for T where
T: AsRef<[[f32; 4]; 4]>,
[src]
impl<T> AsUniform<dyn AsRef<[[f32; 4]; 4]> + 'static> for T where
T: AsRef<[[f32; 4]; 4]>,
[src]pub fn as_uniform(&self) -> UniformValue
[src]
impl<T> AsUniform<dyn AsRef<[f32; 4]> + 'static> for T where
T: AsRef<[f32; 4]>,
[src]
impl<T> AsUniform<dyn AsRef<[f32; 4]> + 'static> for T where
T: AsRef<[f32; 4]>,
[src]pub fn as_uniform(&self) -> UniformValue
[src]
impl<T> AsUniform<dyn AsRef<[i32; 4]> + 'static> for T where
T: AsRef<[i32; 4]>,
[src]
impl<T> AsUniform<dyn AsRef<[i32; 4]> + 'static> for T where
T: AsRef<[i32; 4]>,
[src]pub fn as_uniform(&self) -> UniformValue
[src]
impl<T> AsUniform<dyn AsRef<[u32; 4]> + 'static> for T where
T: AsRef<[u32; 4]>,
[src]
impl<T> AsUniform<dyn AsRef<[u32; 4]> + 'static> for T where
T: AsRef<[u32; 4]>,
[src]pub fn as_uniform(&self) -> UniformValue
[src]
impl<T> CallHasher for T where
T: Hash,
[src]
impl<T> CallHasher for T where
T: Hash,
[src]impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,