MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Evaluate

Method Evaluate

GTE/Samples/Physics/BallRubberBand/PhysicsModule.cpp:24–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void PhysicsModule::Evaluate()
25{
26 float angle = mFrequency * mTime;
27 float sn = std::sin(angle);
28 float cs = std::cos(angle);
29 mPosition = cs * mInitialPosition + sn * mVelDivFreq;
30 mVelocity = (mVelDivFreq * cs - mInitialPosition * sn) * mFrequency;
31}
32
33void PhysicsModule::Initialize(float time, float deltaTime,
34 Vector2<float> const& initialPosition, Vector2<float> const& initialVelocity)

Callers 14

DrawCurveMethod · 0.45
CreateSceneMethod · 0.45
OnDisplayMethod · 0.45
CreateEighthSphereMethod · 0.45
CreateHalfSphereMethod · 0.45
CreateFullSphereMethod · 0.45
CreateSceneMethod · 0.45
DoIntpBSplineUniform1Method · 0.45
DoIntpBSplineUniform2Method · 0.45
DoIntpBSplineUniform3Method · 0.45
CreateFaceVerticesMethod · 0.45
UpdateMeshMethod · 0.45

Calls 2

sinFunction · 0.50
cosFunction · 0.50

Tested by

no test coverage detected