MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DrawVolumeLight

Method DrawVolumeLight

engine/Poseidon/World/Scene/SceneDraw.cpp:1861–1883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1859{
1860 Ref<Object> star = new ObjectColored(shape, -1);
1861 star->SetTransform(M4Identity);
1862 star->SetPosition(pos);
1863 star->SetScale(size / shape->BoundingSphere());
1864 star->SetConstantColor(color);
1865 GetLandscape()->ShowObject(star);
1866}
1867
1868void Scene::DrawVolumeLight(LODShapeWithShadow* shape, PackedColor color, const Frame& pos, float size)
1869{
1870 if (!shape)
1871 {
1872 static bool warned = false;
1873 if (!warned)
1874 {
1875 LOG_ERROR(Graphics, "Skipping visible light volume because its shape failed to load");
1876 warned = true;
1877 }
1878 return;
1879 }
1880
1881 Ref<Object> object = new ObjectColored(shape, -1);
1882 // draw light shape
1883 object->SetTransform(pos.Transform());
1884 object->SetPosition(object->PositionModelToWorld(shape->BoundingCenter()));
1885 // ObjectForDrawing(object,-1,(ENGINE_CONFIG.reflections&REFL_OBJECT)!=0);
1886

Callers 2

ToDrawMethod · 0.80
test_scene.cppFile · 0.80

Calls 7

PositionModelToWorldMethod · 0.80
BoundingCenterMethod · 0.80
SetTransformMethod · 0.45
TransformMethod · 0.45
SetPositionMethod · 0.45
SetConstantColorMethod · 0.45
SetScaleMethod · 0.45

Tested by

no test coverage detected