mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-28 18:15:53 +00:00
Improve documentation of coordinate types
This commit is contained in:
parent
d32c95762f
commit
ae05174a01
@ -1,6 +1,14 @@
|
||||
use super::Scalar;
|
||||
|
||||
/// 1-dimensional curve coordinates
|
||||
///
|
||||
/// One-dimensional [`Point`]s and [`Vector`]s dereference to this type (via
|
||||
/// [`Deref`]). This allows you to access the `t` field, even though [`Point`]
|
||||
/// and [`Vector`] do not have such a field themselves.
|
||||
///
|
||||
/// [`Deref`]: std::ops::Deref
|
||||
/// [`Point`]: crate::Point
|
||||
/// [`Vector`]: crate::Vector
|
||||
#[repr(C)]
|
||||
pub struct T {
|
||||
/// The single coordinate of the 1-dimensional curve coordinates
|
||||
@ -8,6 +16,14 @@ pub struct T {
|
||||
}
|
||||
|
||||
/// 2-dimensional surface coordinates
|
||||
///
|
||||
/// Two-dimensional [`Point`]s and [`Vector`]s dereference to this type (via
|
||||
/// [`Deref`]). This allows you to access the `u`/`v` fields, even though
|
||||
/// [`Point`] and [`Vector`] do not have such fields themselves.
|
||||
///
|
||||
/// [`Deref`]: std::ops::Deref
|
||||
/// [`Point`]: crate::Point
|
||||
/// [`Vector`]: crate::Vector
|
||||
#[repr(C)]
|
||||
pub struct Uv {
|
||||
/// The first coordinate of the 2-dimensional surface coordinates
|
||||
@ -18,6 +34,14 @@ pub struct Uv {
|
||||
}
|
||||
|
||||
/// 3-dimensional model coordinates
|
||||
///
|
||||
/// Three-dimensional [`Point`]s and [`Vector`]s dereference to this type (via
|
||||
/// [`Deref`]). This allows you to access the `x`/`y`/`z` fields, even though
|
||||
/// [`Point`] and [`Vector`] do not have such fields themselves.
|
||||
///
|
||||
/// [`Deref`]: std::ops::Deref
|
||||
/// [`Point`]: crate::Point
|
||||
/// [`Vector`]: crate::Vector
|
||||
#[repr(C)]
|
||||
pub struct Xyz {
|
||||
/// The first coordinate of the 3-dimensional model coordinates
|
||||
|
Loading…
Reference in New Issue
Block a user