aboutsummaryrefslogtreecommitdiff
path: root/src/map/polygon_room.rs
diff options
context:
space:
mode:
authorArne Dußin2021-01-06 21:32:48 +0100
committerArne Dußin2021-01-06 21:32:48 +0100
commit61d255a420c9d977b46670e7fa9e7735d2acf819 (patch)
treed1cf79fec1b643814568544c3691e25564ae874a /src/map/polygon_room.rs
parent9b5762cf3716503819e2cf06f3c335bbfd3b0a3c (diff)
downloadgraf_karto-61d255a420c9d977b46670e7fa9e7735d2acf819.tar.gz
graf_karto-61d255a420c9d977b46670e7fa9e7735d2acf819.zip
Add CLI with save feature
Diffstat (limited to 'src/map/polygon_room.rs')
-rw-r--r--src/map/polygon_room.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/polygon_room.rs b/src/map/polygon_room.rs
index fd4122e..a57f5e4 100644
--- a/src/map/polygon_room.rs
+++ b/src/map/polygon_room.rs
@@ -8,6 +8,7 @@ use crate::transform::Transform;
use crate::transformable::NonRigidTransformable;
use nalgebra::{Matrix3, Point2};
use raylib::drawing::{RaylibDraw, RaylibDrawHandle};
+use std::ops::Deref;
/// Data type for the Polygon room.
pub type PolygonRoomData = Polygon<f64>;
@@ -85,3 +86,11 @@ impl NonRigidTransformable for PolygonRoom {
self.retriangulate();
}
}
+
+impl Deref for PolygonRoom {
+ type Target = PolygonRoomData;
+
+ fn deref(&self) -> &Self::Target {
+ &self.data
+ }
+}