pub struct PointCloud {
pub guid: String,
pub name: String,
pub points: Vec<Point>,
pub normals: Vec<Vector>,
pub colors: Vec<Color>,
pub xform: Xform,
}
Fields§
§guid: String
§name: String
§points: Vec<Point>
§normals: Vec<Vector>
§colors: Vec<Color>
§xform: Xform
Implementations§
Source§impl PointCloud
impl PointCloud
pub fn new(points: Vec<Point>, normals: Vec<Vector>, colors: Vec<Color>) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn jsondump(&self) -> Result<String, Box<dyn Error>>
pub fn jsonload(json_str: &str) -> Result<Self, Box<dyn Error>>
pub fn to_json(&self, filepath: &str) -> Result<(), Box<dyn Error>>
pub fn from_json(filepath: &str) -> Result<Self, Box<dyn Error>>
Trait Implementations§
Source§impl Add<Vector> for PointCloud
impl Add<Vector> for PointCloud
Source§type Output = PointCloud
type Output = PointCloud
The resulting type after applying the
+
operator.Source§impl AddAssign<Vector> for PointCloud
impl AddAssign<Vector> for PointCloud
Source§fn add_assign(&mut self, other: Vector)
fn add_assign(&mut self, other: Vector)
Performs the
+=
operation. Read moreSource§impl Clone for PointCloud
impl Clone for PointCloud
Source§fn clone(&self) -> PointCloud
fn clone(&self) -> PointCloud
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 PointCloud
impl Debug for PointCloud
Source§impl Default for PointCloud
impl Default for PointCloud
Source§impl<'de> Deserialize<'de> for PointCloud
impl<'de> Deserialize<'de> for PointCloud
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PointCloud
impl Display for PointCloud
Source§impl Serialize for PointCloud
impl Serialize for PointCloud
Source§impl Sub<Vector> for PointCloud
impl Sub<Vector> for PointCloud
Source§type Output = PointCloud
type Output = PointCloud
The resulting type after applying the
-
operator.Source§impl SubAssign<Vector> for PointCloud
impl SubAssign<Vector> for PointCloud
Source§fn sub_assign(&mut self, other: Vector)
fn sub_assign(&mut self, other: Vector)
Performs the
-=
operation. Read moreAuto Trait Implementations§
impl Freeze for PointCloud
impl RefUnwindSafe for PointCloud
impl Send for PointCloud
impl Sync for PointCloud
impl Unpin for PointCloud
impl UnwindSafe for PointCloud
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