pub struct Polyline {
pub common: EntityCommon,
pub flags: PolylineFlags,
pub vertices: Vec<Vertex3D>,
}Expand description
A 3D polyline entity
Fields§
§common: EntityCommonCommon entity data
flags: PolylineFlagsPolyline flags
vertices: Vec<Vertex3D>Vertices of the polyline
Implementations§
Source§impl Polyline
impl Polyline
Sourcepub fn from_points(points: Vec<Vector3>) -> Self
pub fn from_points(points: Vec<Vector3>) -> Self
Create a polyline from a list of points
Sourcepub fn add_vertex(&mut self, vertex: Vertex3D)
pub fn add_vertex(&mut self, vertex: Vertex3D)
Add a vertex to the polyline
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Get the number of vertices
Trait Implementations§
Source§impl Entity for Polyline
impl Entity for Polyline
Source§fn set_handle(&mut self, handle: Handle)
fn set_handle(&mut self, handle: Handle)
Set the entity’s handle
Source§fn line_weight(&self) -> LineWeight
fn line_weight(&self) -> LineWeight
Get the entity’s line weight
Source§fn set_line_weight(&mut self, weight: LineWeight)
fn set_line_weight(&mut self, weight: LineWeight)
Set the entity’s line weight
Source§fn transparency(&self) -> Transparency
fn transparency(&self) -> Transparency
Get the entity’s transparency
Source§fn set_transparency(&mut self, transparency: Transparency)
fn set_transparency(&mut self, transparency: Transparency)
Set the entity’s transparency
Source§fn is_invisible(&self) -> bool
fn is_invisible(&self) -> bool
Check if the entity is invisible
Source§fn set_invisible(&mut self, invisible: bool)
fn set_invisible(&mut self, invisible: bool)
Set the entity’s visibility
Source§fn bounding_box(&self) -> BoundingBox3D
fn bounding_box(&self) -> BoundingBox3D
Get the bounding box of the entity
Source§fn entity_type(&self) -> &'static str
fn entity_type(&self) -> &'static str
Get the entity type name
Source§fn apply_transform(&mut self, transform: &Transform)
fn apply_transform(&mut self, transform: &Transform)
Apply a general transform to the entity Read more
Source§fn apply_rotation(&mut self, axis: Vector3, angle: f64)
fn apply_rotation(&mut self, axis: Vector3, angle: f64)
Apply rotation around an axis
Source§fn apply_scaling(&mut self, scale: f64)
fn apply_scaling(&mut self, scale: f64)
Apply uniform scaling
Source§fn apply_scaling_xyz(&mut self, scale: Vector3)
fn apply_scaling_xyz(&mut self, scale: Vector3)
Apply non-uniform scaling
Source§fn apply_scaling_with_origin(&mut self, scale: Vector3, origin: Vector3)
fn apply_scaling_with_origin(&mut self, scale: Vector3, origin: Vector3)
Apply scaling with a specific origin point
Source§fn apply_mirror(&mut self, transform: &Transform)
fn apply_mirror(&mut self, transform: &Transform)
Apply a mirror transform with entity-specific corrections Read more
Source§fn mirror_about_line(&mut self, p1: Vector3, p2: Vector3)
fn mirror_about_line(&mut self, p1: Vector3, p2: Vector3)
Mirror the entity across a line defined by two points (in the XY plane)
Source§fn mirror_about_plane(&mut self, point: Vector3, normal: Vector3)
fn mirror_about_plane(&mut self, point: Vector3, normal: Vector3)
Mirror the entity across an arbitrary plane
impl StructuralPartialEq for Polyline
Auto Trait Implementations§
impl Freeze for Polyline
impl RefUnwindSafe for Polyline
impl Send for Polyline
impl Sync for Polyline
impl Unpin for Polyline
impl UnsafeUnpin for Polyline
impl UnwindSafe for Polyline
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