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

Method ClothWindow3

GTE/Samples/Physics/Cloth/ClothWindow3.cpp:14–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12//#define SINGLE_STEP
13
14ClothWindow3::ClothWindow3(Parameters& parameters)
15 :
16 Window3(parameters)
17{
18 if (!SetEnvironment())
19 {
20 parameters.created = false;
21 return;
22 }
23
24 mNoCullState = std::make_shared<RasterizerState>();
25 mNoCullState->cull = RasterizerState::Cull::NONE;
26 mEngine->SetRasterizerState(mNoCullState);
27
28 mWireNoCullState = std::make_shared<RasterizerState>();
29 mWireNoCullState->fill = RasterizerState::Fill::WIREFRAME;
30 mWireNoCullState->cull = RasterizerState::Cull::NONE;
31
32 mEngine->SetClearColor({ 0.85f, 0.85f, 1.0f, 1.0f });
33
34 CreateSprings();
35 CreateCloth();
36 InitializeCamera(60.0f, GetAspectRatio(), 0.1f, 100.0f, 0.01f, 0.01f,
37 { 0.0f, -1.75f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f });
38 mPVWMatrices.Update();
39
40 mAnimStartTime = mAnimTimer.GetSeconds();
41}
42
43void ClothWindow3::OnIdle()
44{

Callers

nothing calls this directly

Calls 4

SetClearColorMethod · 0.80
SetRasterizerStateMethod · 0.45
UpdateMethod · 0.45
GetSecondsMethod · 0.45

Tested by

no test coverage detected