pub struct GeometryAttribute { /* private fields */ }Expand description
Format descriptor shared by point and mesh attributes.
Implementations§
Source§impl GeometryAttribute
impl GeometryAttribute
Sourcepub fn init(
&mut self,
attribute_type: GeometryAttributeType,
_buffer: Option<&DataBuffer>,
num_components: u8,
data_type: DataType,
normalized: bool,
byte_stride: i64,
byte_offset: i64,
)
pub fn init( &mut self, attribute_type: GeometryAttributeType, _buffer: Option<&DataBuffer>, num_components: u8, data_type: DataType, normalized: bool, byte_stride: i64, byte_offset: i64, )
Initializes the attribute format descriptor.
Sourcepub fn attribute_type(&self) -> GeometryAttributeType
pub fn attribute_type(&self) -> GeometryAttributeType
Returns the semantic attribute type.
Sourcepub fn num_components(&self) -> u8
pub fn num_components(&self) -> u8
Returns the number of scalar components per attribute value.
Sourcepub fn normalized(&self) -> bool
pub fn normalized(&self) -> bool
Returns whether integer data should be interpreted as normalized.
Sourcepub fn byte_stride(&self) -> i64
pub fn byte_stride(&self) -> i64
Returns the byte stride between consecutive values.
Sourcepub fn byte_offset(&self) -> i64
pub fn byte_offset(&self) -> i64
Returns the byte offset of the first value.
Sourcepub fn set_unique_id(&mut self, id: u32)
pub fn set_unique_id(&mut self, id: u32)
Sets the stable Draco unique id for this attribute.
Sourcepub fn set_attribute_type(&mut self, attribute_type: GeometryAttributeType)
pub fn set_attribute_type(&mut self, attribute_type: GeometryAttributeType)
Sets the semantic attribute type.
Sourcepub fn set_data_type(&mut self, data_type: DataType)
pub fn set_data_type(&mut self, data_type: DataType)
Sets the scalar data type.
Sourcepub fn set_num_components(&mut self, num_components: u8)
pub fn set_num_components(&mut self, num_components: u8)
Sets the number of scalar components per value.
Trait Implementations§
Source§impl Clone for GeometryAttribute
impl Clone for GeometryAttribute
Source§fn clone(&self) -> GeometryAttribute
fn clone(&self) -> GeometryAttribute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeometryAttribute
impl Debug for GeometryAttribute
Auto Trait Implementations§
impl Freeze for GeometryAttribute
impl RefUnwindSafe for GeometryAttribute
impl Send for GeometryAttribute
impl Sync for GeometryAttribute
impl Unpin for GeometryAttribute
impl UnsafeUnpin for GeometryAttribute
impl UnwindSafe for GeometryAttribute
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