Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1866 - trunk/Engine/Shadows


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1866 - trunk/Engine/Shadows
  • Date: Mon, 26 Nov 2007 07:34:48 -0700 (MST)

Author: sparker
Date: Mon Nov 26 07:34:27 2007
New Revision: 1866

Added:
   trunk/Engine/Shadows/NoDirect.cc
   trunk/Engine/Shadows/NoDirect.h
Modified:
   trunk/Engine/Shadows/CMakeLists.txt
Log:
Added a shadow algorithm that produces no direct light.  This is useful for
getting only the ambient contribution, although it might be useful to create
a more efficient method at some point.


Modified: trunk/Engine/Shadows/CMakeLists.txt
==============================================================================
--- trunk/Engine/Shadows/CMakeLists.txt (original)
+++ trunk/Engine/Shadows/CMakeLists.txt Mon Nov 26 07:34:27 2007
@@ -2,6 +2,8 @@
 SET (Manta_Shadows_SRCS
      Shadows/HardShadows.h
      Shadows/HardShadows.cc
+     Shadows/NoDirect.h
+     Shadows/NoDirect.cc
      Shadows/NoShadows.h
      Shadows/NoShadows.cc
      )

Added: trunk/Engine/Shadows/NoDirect.cc
==============================================================================
--- (empty file)
+++ trunk/Engine/Shadows/NoDirect.cc    Mon Nov 26 07:34:27 2007
@@ -0,0 +1,40 @@
+
+#include <Engine/Shadows/NoDirect.h>
+#include <Interface/Light.h>
+#include <Interface/LightSet.h>
+#include <Interface/RayPacket.h>
+
+using namespace Manta;
+
+ShadowAlgorithm* NoDirect::create(const vector<string>& args)
+{
+  return new NoDirect(args);
+}
+
+NoDirect::NoDirect()
+{
+}
+
+NoDirect::NoDirect(const vector<string>& /*args*/)
+{
+}
+
+NoDirect::~NoDirect()
+{
+}
+
+void NoDirect::computeShadows(const RenderContext& context, StateBuffer& 
stateBuffer,
+                               const LightSet* lights, RayPacket& 
sourceRays, RayPacket& shadowRays)
+{
+  shadowRays.resize(0, 0);
+  stateBuffer.state = StateBuffer::Finished;
+}
+
+string NoDirect::getName() const {
+  return "nodirect";
+}
+
+string NoDirect::getSpecs() const {
+  return "none";
+}
+

Added: trunk/Engine/Shadows/NoDirect.h
==============================================================================
--- (empty file)
+++ trunk/Engine/Shadows/NoDirect.h     Mon Nov 26 07:34:27 2007
@@ -0,0 +1,34 @@
+
+#ifndef Manta_Engine_NoDirect_h
+#define Manta_Engine_NoDirect_h
+
+#include <Interface/ShadowAlgorithm.h>
+#include <sgi_stl_warnings_off.h>
+#include <vector>
+#include <string>
+#include <sgi_stl_warnings_on.h>
+
+namespace Manta {
+  using namespace std;
+  class NoDirect : public ShadowAlgorithm {
+  public:
+    NoDirect();
+    NoDirect(const vector<string>& args);
+    virtual ~NoDirect();
+
+#ifndef SWIG
+    virtual void computeShadows(const RenderContext& context, StateBuffer& 
stateBuffer,
+                                const LightSet* lights, RayPacket& source, 
RayPacket& shadowRays);
+#endif
+    static ShadowAlgorithm* create(const vector<string>& args);
+
+    virtual string getName() const;
+    virtual string getSpecs() const;
+
+  private:
+    NoDirect(const NoDirect&);
+    NoDirect& operator=(const NoDirect&);
+  };
+}
+
+#endif




  • [Manta] r1866 - trunk/Engine/Shadows, sparker, 11/26/2007

Archive powered by MHonArc 2.6.16.

Top of page