Panagiotis Christopoulos Charitos 14 лет назад
Родитель
Сommit
67c185cc3e
2 измененных файлов с 10 добавлено и 4 удалено
  1. 1 1
      anki/scene/Light.cpp
  2. 9 3
      anki/scene/Light.h

+ 1 - 1
anki/scene/Light.cpp

@@ -56,7 +56,7 @@ SpotLight::SpotLight(const char* fmtl,
 	const char* name, Scene* scene,
 	uint movableFlags, Movable* movParent)
 	: Light(LT_SPOT, fmtl, name, scene, movableFlags, movParent, &frustum),
-		Frustumable(frustum)
+		Frustumable(&frustum)
 {}
 
 

+ 9 - 3
anki/scene/Light.h

@@ -147,12 +147,18 @@ public:
 	/// @{
 	SpotLight(const char* fmtl,
 		const char* name, Scene* scene,
-		uint movableFlags, Movable* movParent)
-	{}
+		uint movableFlags, Movable* movParent);
 	/// @}
 
 private:
-	PerspectiveFrustum frustum;
+	PerspectiveFrustum frustumW;
+	PerspectiveFrustum frustumL;
+
+	void updateFrustum(const PerspectiveFrustum&)
+	{
+		//frustumL.setRadius(r);
+	}
+	ANKI_SLOT(updateFrustum, const PerspectiveFrustum&)
 };