LightsprintSDK 2021.08.08
Existing adapters

When writing new adapter, you can pick existing one as a template. (What is an adapter)

  • RRObjectAssimp.h/cpp (500 lines) loads scene from disk to 3rd party structures, copies them to Lightsprint structures, frees 3rd party structures after load. Uses plain RRMeshArrays and RRObject instances, without subclassing. (Subclassing is necessary e.g. for LODs or for objects that receive light/shadows only from selected lights/objects.) Supports geometry instancing.
  • RRObjectOpenCollada.h/cpp (2000 lines) streams data from disk directly into plain RRMeshArrays and RRObject instances, without subclassing. Supports geometry instancing.
  • RRObjectLightsprint.h/cpp (300 lines) streams data from disk directly to plain RRMeshArrays and RRObject instances, without subclassing. Supports geometry instancing. Supports saving to disk.
  • RRObjectFCollada.h/cpp (1000 lines) loads scene to 3rd party structures, subclassess RRMesh and RRObject to access data in original 3rd party structures. It supports geometry instancing.
  • RRObjectGamebryo.h/cpp (2500 lines) subclassess RRMesh and RRObject to access data in original 3rd party structures. It has virtually everything, geometry instancing, LODs, automatic detection of material properties from shaders, lists of lights and objects that do/don't interact etc.
  • RRObjectUE3.h/cpp (1200 lines) subclassess RRMesh and RRObject to access data in original 3rd party structures. It has virtually everything, geometry instancing, LODs, automatic detection of material properties from shaders, lists of lights and objects that do/don't interact etc.
  • RRObjectBSP.h/cpp (500 lines) loads scene to 3rd party structures, subclassess RRMesh and RRObject to access data in original 3rd party structures. For simplicity, it loads whole scene as a single object.
  • RRObject3DS.h/cpp (300 lines) loads scene to 3rd party structures, subclassess RRMesh and RRObject to access data in original 3rd party structures. Model_3DS.cpp was modified to load materials directly into our structures.
  • RRObjectOBJ.h/cpp (250 lines) streams data from disk directly into subclassed RRMesh and RRObject. For simplicity, it loads whole scene as a single object.
  • RRObjectMGF.h/cpp (350 lines) streams data from disk directly into subclassed RRMesh and RRObject. For simplicity, it loads whole scene as a single object.

Source code of adapters is in src/LightsprintIO/Xxx/RRObjectXxx.h|cpp. Only selected adapters have source code included in evaluation version.