pub struct PolyDataMessage {
pub points: Vec<[f32; 3]>,
pub vertices: Vec<u32>,
pub lines: Vec<u32>,
pub polygons: Vec<u32>,
pub triangle_strips: Vec<u32>,
pub attributes: Vec<Attribute>,
}
Expand description
POLYDATA message for 3D polygon/mesh data
§OpenIGTLink Specification
- Message type: “POLYDATA”
- Format: Points + Vertices + Lines + Polygons + Triangle Strips + Attributes
- Complex variable-length structure
Fields§
§points: Vec<[f32; 3]>
3D points (x, y, z)
vertices: Vec<u32>
Vertex indices
lines: Vec<u32>
Line connectivity (first element = count, followed by indices)
polygons: Vec<u32>
Polygon connectivity (first element = count, followed by indices)
triangle_strips: Vec<u32>
Triangle strip connectivity
attributes: Vec<Attribute>
Attribute data
Implementations§
Source§impl PolyDataMessage
impl PolyDataMessage
Sourcepub fn with_vertices(self, vertices: Vec<u32>) -> Self
pub fn with_vertices(self, vertices: Vec<u32>) -> Self
Add vertices
Sourcepub fn with_lines(self, lines: Vec<u32>) -> Self
pub fn with_lines(self, lines: Vec<u32>) -> Self
Add lines
Sourcepub fn with_polygons(self, polygons: Vec<u32>) -> Self
pub fn with_polygons(self, polygons: Vec<u32>) -> Self
Add polygons
Sourcepub fn with_triangle_strips(self, strips: Vec<u32>) -> Self
pub fn with_triangle_strips(self, strips: Vec<u32>) -> Self
Add triangle strips
Sourcepub fn add_attribute(&mut self, attr: Attribute)
pub fn add_attribute(&mut self, attr: Attribute)
Add attribute
Sourcepub fn num_points(&self) -> usize
pub fn num_points(&self) -> usize
Get number of points
Trait Implementations§
Source§impl Clone for PolyDataMessage
impl Clone for PolyDataMessage
Source§fn clone(&self) -> PolyDataMessage
fn clone(&self) -> PolyDataMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 PolyDataMessage
impl Debug for PolyDataMessage
Source§impl Message for PolyDataMessage
impl Message for PolyDataMessage
Source§impl PartialEq for PolyDataMessage
impl PartialEq for PolyDataMessage
impl StructuralPartialEq for PolyDataMessage
Auto Trait Implementations§
impl Freeze for PolyDataMessage
impl RefUnwindSafe for PolyDataMessage
impl Send for PolyDataMessage
impl Sync for PolyDataMessage
impl Unpin for PolyDataMessage
impl UnwindSafe for PolyDataMessage
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