1. 10 May, 2014 8 commits
    • Christian Schulte zu Berge's avatar
      Lua scripting: add a wrapper for FloatProperty · 0ed0a6bb
      Christian Schulte zu Berge authored
      To make it possible to access GlImageResampler's p_resampleScale
      property from Lua, FloatProperty and the classes it depends on have been
      wrapped using SWIG.
      
      References #1
      0ed0a6bb
    • Artur Grunau's avatar
      Finalise the implementation of the first Lua pipeline · 818c79cc
      Artur Grunau authored
      Now that TGT and campvis-core can be built as shared libraries, the few
      remaining issues with the first Lua pipeline could be tracked and fixed.
      As a result, the pipeline can be executed without any issues, and its
      functionality exactly corresponds to that of ResamplingDemo. To achieve
      this, several additional classes, methods and constants had to be
      wrapped.
      
      References #1
      818c79cc
    • Artur Grunau's avatar
      Lua scripting: rearrange interface files · 382d1c52
      Artur Grunau authored
      All interface files used to live under `scripting/`. However, that
      separated them from the code they were binding and clustered them
      unnecessarily.
      
      Make each interface file part of the CAMPVis component whose code it's
      binding. This fixes the issues mentioned above and makes it possible to
      build Lua modules conditionally, depending on what components of CAMPVis
      are enabled.
      
      References #1
      382d1c52
    • Artur Grunau's avatar
      Clean up how CAMPVis' Lua modules are built · 2be90976
      Artur Grunau authored
      There were several problems with how CAMPVis' Lua modules were built:
      - modules were placed in the same directory as all other CAMPVis'
        libraries, which polluted Lua's module path and could lead to name
        clashes
      - SWIG interface files included instead of importing one another; this
        resulted in duplicated bindings being generated
      
      To fix these probles place all of CAMPVis' Lua modules in one
      sub-directory and let the code know what that sub-directory is so that
      it can instruct Lua to search it. Moreover, use %import instead of
      %include when one SWIG interface file needs to have access to
      definitions from another one.
      
      References #1
      2be90976
    • Artur Grunau's avatar
      Wrap several TransferFunction-related classes · e53c9f06
      Artur Grunau authored
      To make it possible to interact with TransferFunctionProperties from
      Lua, several TransferFunction-related classes have been wrapped.
      
      References #1
      e53c9f06
    • Artur Grunau's avatar
      Lua bindings: wrap and instantiate tgt::Vector4 · 44611576
      Artur Grunau authored
      TGT-related glue code has been moved to a new interface file: tgt.i. It
      wraps and instantiates tgt::Vector2 and (starting with this commit)
      tgt::Vector4.
      
      Many methods of those classes and a lot of typedefs haven't been wrapped
      yet. This will be fixed when necessary in future commits.
      
      References #1
      44611576
    • Artur Grunau's avatar
      Lua and C++ parts of a pipeline can now interact · 31df41df
      Artur Grunau authored
      Lua functions invoked by LuaPipeline had no access to the pipeline
      instance and, as a result, couldn't configure or modify it in any way.
      
      In order to make it possible to actually define pipelines in Lua, each
      script can now access the C++ pipeline object it's supposed to augment
      via a global variable named instance. This variable is injected into the
      script by LuaPipeline and can be used to call standard pipeline methods
      (e.g. addProcessor).
      
      The functionality described has been tested by implementing a pipeline
      constructor that creates and registers several processors.
      
      References #1
      31df41df
    • Artur Grunau's avatar
      Wrap several CAMPVis classes with SWIG · 4f6b4ba6
      Artur Grunau authored
      To test the feasibility of using SWIG to generate Lua bindings for
      CAMPVis several classes have been wrapped with SWIG interface files.
      
      If version 2.0.11 of SWIG is used to generate bindings, it must be
      patched to fix wrapper compilation errors:
      https://github.com/badshah400/swig/commit/ea4a4e435f721380555fea039bd5dc758eda43ae
      
      References #1
      4f6b4ba6