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

Method setPointPosition

src/Core/Graphics/Shapes.cpp:98–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 void Polygon::setPointPosition(
99 std::size_t index, const Transform::UnitVector& position)
100 {
101 const Transform::UnitVector pixelPosition
102 = position.to<Transform::Units::ScenePixels>();
103 if (shape.getPointCount() <= index)
104 {
105 shape.setPointCount(index + 1);
106 }
107 shape.setPoint(index, sf::Vector2f(pixelPosition.x, pixelPosition.y));
108 }
109
110 Transform::UnitVector Polygon::getPointPosition(std::size_t index) const
111 {

Callers 1

moveToMethod · 0.45

Calls 1

getPointCountMethod · 0.80

Tested by

no test coverage detected