MCPcopy Create free account
hub / github.com/RenderKit/embree / loadDistantLight

Method loadDistantLight

tutorials/common/scenegraph/xml_loader.cpp:729–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727 }
728
729 Ref<SceneGraph::Node> XMLLoader::loadDistantLight(const Ref<XML>& xml)
730 {
731 const AffineSpace3fa space = load<AffineSpace3fa>(xml->child("AffineSpace"));
732 const Vec3fa L = load<Vec3fa>(xml->child("L"));
733 const Vec3fa D = Vec3fa(0,0,1);
734 const float halfAngle = load<float>(xml->child("halfAngle"));
735 const SceneGraph::DistantLight light = SceneGraph::DistantLight(D,L,halfAngle);
736 return new SceneGraph::LightNodeImpl<SceneGraph::DistantLight>(light.transform(space));
737 }
738
739 Ref<SceneGraph::Node> XMLLoader::loadAmbientLight(const Ref<XML>& xml)
740 {

Callers

nothing calls this directly

Calls 4

DistantLightClass · 0.85
Vec3faClass · 0.50
childMethod · 0.45
transformMethod · 0.45

Tested by

no test coverage detected