MCPcopy Create free account
hub / github.com/SFML/SFML / Geometry

Method Geometry

examples/shader/Shader.cpp:254–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 }
253
254 explicit Geometry(sf::Texture&& logoTexture, sf::Shader&& shader) :
255 m_logoTexture(std::move(logoTexture)),
256 m_shader(std::move(shader)),
257 m_pointCloud(sf::PrimitiveType::Points, 10'000)
258 {
259 // Move the points in the point cloud to random positions
260 for (std::size_t i = 0; i < 10'000; ++i)
261 {
262 // Spread the coordinates from -480 to +480 so they'll always fill the viewport at 800x600
263 std::uniform_real_distribution<float> positionDistribution(-480, 480);
264 m_pointCloud[i].position = {positionDistribution(rng), positionDistribution(rng)};
265 }
266 }
267
268private:
269 sf::Texture m_logoTexture;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected