pub struct Vertices {
pub id: String,
pub name: Option<String>,
pub inputs: Vec<Input>,
pub position: usize,
pub extra: Vec<Extra>,
}Expand description
Declares the attributes and identity of mesh-vertices.
Fields§
§id: StringA text string containing the unique identifier of the element. This value must be unique within the document.
name: Option<String>The text string name of this element.
inputs: Vec<Input>The list of inputs.
position: usizeThe index into inputs for the Semantic::Position input (which must exist).
extra: Vec<Extra>Provides arbitrary additional information about this element.
Implementations§
Source§impl Vertices
impl Vertices
Sourcepub fn importer<'a, R: UrlResolver<'a, Source>>(
&'a self,
res: &R,
) -> Result<VertexImporter<'a>, R::Error>
pub fn importer<'a, R: UrlResolver<'a, Source>>( &'a self, res: &R, ) -> Result<VertexImporter<'a>, R::Error>
Construct a VertexImporter from the Vertices data. It requires a UrlResolver
to find the source arrays (which are usually but not always stored in the Mesh itself).
Source§impl Vertices
impl Vertices
Sourcepub fn new(id: impl Into<String>, inputs: Vec<Input>) -> Self
pub fn new(id: impl Into<String>, inputs: Vec<Input>) -> Self
Construct a new Vertices object with the given inputs.
- One of the inputs must have
Semantic::Position.
Sourcepub fn position_input(&self) -> &Input
pub fn position_input(&self) -> &Input
The input with Semantic::Position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vertices
impl RefUnwindSafe for Vertices
impl Send for Vertices
impl Sync for Vertices
impl Unpin for Vertices
impl UnwindSafe for Vertices
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more