ifc_style/texture/
vertex.rs1use ifc_model::{EntityId, Value};
4
5use crate::error::StyleResult;
6use crate::view::Record;
7
8#[derive(Debug, Clone, Copy)]
10pub struct TextureVertex<'m, 's> {
11 record: Record<'m, 's>,
12}
13
14impl<'m, 's> TextureVertex<'m, 's> {
15 pub(crate) fn from_record(record: Record<'m, 's>) -> Self {
16 Self { record }
17 }
18
19 pub fn id(&self) -> EntityId {
21 self.record.id
22 }
23
24 pub fn coordinates(&self) -> StyleResult<&'m Value> {
26 self.record.value("Coordinates")
27 }
28}
29
30#[derive(Debug, Clone, Copy)]
33pub struct TextureVertexList<'m, 's> {
34 record: Record<'m, 's>,
35}
36
37impl<'m, 's> TextureVertexList<'m, 's> {
38 pub(crate) fn from_record(record: Record<'m, 's>) -> Self {
39 Self { record }
40 }
41
42 pub fn id(&self) -> EntityId {
44 self.record.id
45 }
46
47 pub fn coordinates(&self) -> StyleResult<&'m Value> {
49 self.record.value("TexCoordsList")
50 }
51}