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

Method loadSpotLight

tutorials/common/scenegraph/xml_loader.cpp:708–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706 }
707
708 Ref<SceneGraph::Node> XMLLoader::loadSpotLight(const Ref<XML>& xml)
709 {
710 const AffineSpace3fa space = load<AffineSpace3fa>(xml->child("AffineSpace"));
711 const Vec3fa I = load<Vec3fa>(xml->child("I"));
712 const Vec3fa P = Vec3fa(zero);
713 const Vec3fa D = Vec3fa(0,0,1);
714 const float angleMin = load<float>(xml->child("angleMin"));
715 const float angleMax = load<float>(xml->child("angleMax"));
716 const SceneGraph::SpotLight light = SceneGraph::SpotLight(P,D,I,angleMin,angleMax);
717 return new SceneGraph::LightNodeImpl<SceneGraph::SpotLight>(light.transform(space));
718 }
719
720 Ref<SceneGraph::Node> XMLLoader::loadDirectionalLight(const Ref<XML>& xml)
721 {

Callers

nothing calls this directly

Calls 4

SpotLightClass · 0.70
Vec3faClass · 0.50
childMethod · 0.45
transformMethod · 0.45

Tested by

no test coverage detected