MCPcopy Create free account
hub / github.com/assimp/assimp / SampleDiscrete

Method SampleDiscrete

code/AssetLib/IFC/IFCCurve.cpp:586–597  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

584
585// ------------------------------------------------------------------------------------------------
586void Curve::SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
587 ai_assert( InRange( a ) );
588 ai_assert( InRange( b ) );
589
590 const size_t cnt = std::max(static_cast<size_t>(0),EstimateSampleCount(a,b));
591 out.mVerts.reserve( out.mVerts.size() + cnt + 1);
592
593 IfcFloat p = a, delta = (b-a)/cnt;
594 for(size_t i = 0; i <= cnt; ++i, p += delta) {
595 out.mVerts.push_back(Eval(p));
596 }
597}
598
599// ------------------------------------------------------------------------------------------------
600bool BoundedCurve::IsClosed() const {

Callers 4

ProcessCurveFunction · 0.45
ProcessSweptDiskSolidFunction · 0.45
SampleDiscreteMethod · 0.45
SampleDiscreteMethod · 0.45

Calls 4

maxFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected