pub struct Element {
pub mesh_id: i32,
pub vector: Vector,
pub rotation: Rotation,
pub guid: String,
pub element_type: String,
pub color: Color,
pub face_colors: Option<Vec<i32>>,
pub info: HashMap<String, String>,
}Expand description
Represents a mesh object in three-dimensional space.
Fields§
§mesh_id: i32The identifier of the mesh associated with the element.
vector: VectorThe position of the element.
rotation: RotationThe rotation of the element.
guid: StringThe globally unique identifier for the element.
element_type: StringThe type of the element.
color: ColorThe color of the element.
face_colors: Option<Vec<i32>>The list of integers, that determine face colors of a mesh. They should be organized like this: [r1, g1, b1, a1, r2, g2, b2, a2, r3, g3, b3, a3, … rn, gn, bn, an] E.g. list like: [255, 0, 0, 255, 135, 206, 235, 255, 255, 255, 255, 255] means first triangle should be colored as red (255,0,0,255), second as skyblue (135,206,235,255), third as white (255,255,255,255).
info: HashMap<String, String>Additional information about the element.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
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
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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