MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / setRelativePosition

Method setRelativePosition

src/Core/Transform/Polygon.cpp:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void PolygonPoint::setRelativePosition(
51 RelativePositionFrom from, const Transform::UnitVector& position)
52 {
53 if (from == RelativePositionFrom::Point0)
54 this->set(position.to<Transform::Units::SceneUnits>() + m_parent.get(0));
55 else if (from == RelativePositionFrom::Centroid)
56 {
57 const Transform::UnitVector centroid = m_parent.getCentroid();
58 this->set(position.to<Transform::Units::SceneUnits>() + centroid);
59 }
60 }
61
62 void PolygonPoint::move(const Transform::UnitVector& position)
63 {

Callers

nothing calls this directly

Calls 3

getCentroidMethod · 0.80
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected