Skip to content

Commit

Permalink
Merge pull request #297 from favreau/master
Browse files Browse the repository at this point in the history
Updated documentation and namespaces cleanup
  • Loading branch information
favreau authored Sep 5, 2023
2 parents 3089b85 + 109389a commit 72f8343
Show file tree
Hide file tree
Showing 2,160 changed files with 70,016 additions and 85,091 deletions.
2 changes: 2 additions & 0 deletions bioexplorer/backend/module/ispc/renderer/DensityRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
// ispc exports
#include "DensityRenderer_ispc.h"

using namespace core;

namespace bioexplorer
{
namespace rendering
Expand Down
4 changes: 1 addition & 3 deletions bioexplorer/backend/module/ispc/renderer/DensityRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ namespace bioexplorer
{
namespace rendering
{
using namespace ospray;
using namespace core;

/**
* @brief The DensityRenderer class allows visualization of atom density in the
Expand Down Expand Up @@ -68,7 +66,7 @@ class DensityRenderer : public ospray::Renderer
void** _lightPtr;
ospray::Data* _lightData;

AdvancedMaterial* _bgMaterial;
core::AdvancedMaterial* _bgMaterial;

double _timestamp{0.f};
double _exposure{1.f};
Expand Down
2 changes: 2 additions & 0 deletions bioexplorer/backend/module/ispc/renderer/FieldsRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
// ispc exports
#include "FieldsRenderer_ispc.h"

using namespace core;

namespace bioexplorer
{
namespace rendering
Expand Down
5 changes: 1 addition & 4 deletions bioexplorer/backend/module/ispc/renderer/FieldsRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ namespace bioexplorer
{
namespace rendering
{
using namespace ospray;
using namespace core;

/**
* @brief The FieldsRenderer class allows visualization of magnetic
* fields created by atoms in the 3D scene. An Octree acceleration structure has
Expand Down Expand Up @@ -71,7 +68,7 @@ class FieldsRenderer : public ospray::Renderer
void** _lightPtr;
ospray::Data* _lightData;

AdvancedMaterial* _bgMaterial;
core::AdvancedMaterial* _bgMaterial;

bool _useHardwareRandomizer{false};
ospray::uint32 _randomNumber{0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "PathTracingRenderer_ispc.h"

using namespace ospray;
using namespace core;

namespace bioexplorer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ namespace bioexplorer
{
namespace rendering
{
using namespace core;

/**
* @brief The PathTracingRenderer class is a renderer that processes the
* rendering of the 3D scene using the path tracing algorythm
*/
class PathTracingRenderer : public SimulationRenderer
class PathTracingRenderer : public core::SimulationRenderer
{
public:
PathTracingRenderer();
Expand All @@ -55,7 +53,7 @@ class PathTracingRenderer : public SimulationRenderer
void** _lightPtr;
ospray::Data* _lightData;

AdvancedMaterial* _bgMaterial;
core::AdvancedMaterial* _bgMaterial;

double _exposure{1.f};
double _aoStrength{1.f};
Expand Down
2 changes: 2 additions & 0 deletions bioexplorer/backend/module/ispc/renderer/VoxelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
// ispc exports
#include "VoxelRenderer_ispc.h"

using namespace core;

namespace bioexplorer
{
namespace rendering
Expand Down
5 changes: 1 addition & 4 deletions bioexplorer/backend/module/ispc/renderer/VoxelRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ namespace bioexplorer
{
namespace rendering
{
using namespace ospray;
using namespace core;

/**
* @brief The VoxelRenderer class can perform fast transparency
* and mapping of simulation data on the geometry
*/
class VoxelRenderer : public SimulationRenderer
class VoxelRenderer : public core::SimulationRenderer
{
public:
VoxelRenderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
// ispc exports
#include "GolgiStyleRenderer_ispc.h"

using namespace core;

namespace bioexplorer
{
namespace rendering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ namespace bioexplorer
{
namespace rendering
{
using namespace ospray;
using namespace core;

class GolgiStyleRenderer : public Renderer
class GolgiStyleRenderer : public ospray::Renderer
{
public:
GolgiStyleRenderer();
Expand All @@ -49,7 +46,7 @@ class GolgiStyleRenderer : public Renderer
void commit() final;

private:
AdvancedMaterial* _bgMaterial{nullptr};
core::AdvancedMaterial* _bgMaterial{nullptr};
float _exponent{5.f};
bool _inverse{false};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MediaMakerPlugin : public core::ExtensionPlugin
ExportFramesToDisk _exportFramesToDiskPayload;
bool _exportFramesToDiskDirty{false};
uint16_t _frameNumber{0};
Vector2ui _frameBufferSize;
core::Vector2ui _frameBufferSize;
int16_t _accumulationFrameNumber{0};
std::string _baseName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
// ispc exports
#include "MetabolismRenderer_ispc.h"

using namespace ospray;

namespace metabolism
{
namespace rendering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ namespace metabolism
{
namespace rendering
{
using namespace ospray;

/**
* @brief The MetabolismRenderer class allows visualization of atom Metabolism
* in the 3D scene
Expand Down Expand Up @@ -62,7 +60,7 @@ class MetabolismRenderer : public ospray::Renderer
void** _lightPtr;
ospray::Data* _lightData;

Material* _bgMaterial;
ospray::Material* _bgMaterial;

float _exposure{1.f};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@

#include <fstream>

using namespace core;

namespace bioexplorer
{
using namespace details;
namespace metabolism
{
using namespace bioexplorer;
using namespace details;

const std::string PLUGIN_VERSION = "0.1.0";
const std::string PLUGIN_API_PREFIX = "mb-";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ namespace bioexplorer
{
namespace metabolism
{
using namespace details;

/**
* @brief This class implements the MetabolismPlugin plugin
*/
Expand All @@ -47,7 +45,7 @@ class MetabolismPlugin : public core::ExtensionPlugin
void _parseCommandLineArguments(int argc, char **argv);

// Metabolism
Response _attachHandler(const AttachHandlerDetails &payload);
bioexplorer::details::Response _attachHandler(const AttachHandlerDetails &payload);

// Command line arguments
CommandLineArguments _commandLineArguments;
Expand Down
9 changes: 3 additions & 6 deletions bioexplorer/backend/plugins/Metabolism/plugin/api/Params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
#include "Params.h"
#include <common/json.hpp>

namespace bioexplorer
{
namespace metabolism
{
using namespace bioexplorer;
using namespace metabolism;

#ifndef PLATFORM_DEBUG_JSON_ENABLED
#define FROM_JSON(PARAM, JSON, NAME) PARAM.NAME = JSON[#NAME].get<decltype(PARAM.NAME)>()
#else
Expand Down Expand Up @@ -61,5 +60,3 @@ bool from_json(AttachHandlerDetails &param, const std::string &payload)
}
return true;
}
} // namespace metabolism
} // namespace bioexplorer
8 changes: 1 addition & 7 deletions bioexplorer/backend/plugins/Metabolism/plugin/api/Params.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,4 @@
#include <bioexplorer/backend/science/api/Params.h>
#include <plugin/common/Types.h>

namespace bioexplorer
{
namespace metabolism
{
bool from_json(AttachHandlerDetails &param, const std::string &payload);
} // namespace metabolism
} // namespace bioexplorer
bool from_json(bioexplorer::metabolism::AttachHandlerDetails &param, const std::string &payload);
19 changes: 8 additions & 11 deletions bioexplorer/backend/plugins/Metabolism/plugin/common/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <bioexplorer/backend/science/common/Types.h>

using namespace core;

namespace bioexplorer
{
namespace metabolism
Expand All @@ -49,6 +47,14 @@ const std::string ARG_DB_USER = "--db-user";
const std::string ARG_DB_PASSWORD = "--db-password";
const std::string ARG_DB_SCHEMA = "--db-schema";

typedef struct
{
uint32_t guid;
std::string code;
core::Vector3f color;
} Location;
using Locations = std::vector<Location>;

typedef struct
{
std::string connectionString;
Expand All @@ -58,14 +64,5 @@ typedef struct
int32_t referenceFrame;
bool relativeConcentration{false};
} AttachHandlerDetails;

typedef struct
{
uint32_t guid;
std::string code;
Vector3f color;
} Location;
using Locations = std::vector<Location>;

} // namespace metabolism
} // namespace bioexplorer
3 changes: 0 additions & 3 deletions bioexplorer/backend/plugins/Metabolism/plugin/common/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@

namespace metabolism
{
using namespace core;

void setTransferFunction(core::TransferFunction& tf);

} // namespace metabolism
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@

#define DEFAULT_NUM_FRAMES 1000

using namespace core;

namespace bioexplorer
{
namespace metabolism
{
using namespace details;

DBConnector::DBConnector(const CommandLineArguments& args)
{
_parseArguments(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include <fstream>

using namespace core;

namespace bioexplorer
{
namespace metabolism
Expand Down Expand Up @@ -100,19 +102,6 @@ void* MetabolismHandler::getFrameData(const uint32_t frame)
}

_frameSize = _frameData.size();

#if 0
std::string s;
for (uint64_t i = 0; i < _frameData.size(); ++i)
{
if (!s.empty())
s += ",";
s += "[" + std::to_string(_locations[i - 1].guid) + "] " +
std::to_string(_frameData[i]);
}
PLUGIN_INFO(s);
#endif

return _frameData.data();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ namespace bioexplorer
{
namespace metabolism
{
using namespace core;

/**
* @brief The MetabolismHandler class handles metabolite concentrations
*/
Expand All @@ -55,7 +53,7 @@ class MetabolismHandler : public core::AbstractSimulationHandler

bool isReady() const final { return true; }

AbstractSimulationHandlerPtr clone() const final;
core::AbstractSimulationHandlerPtr clone() const final;

void setMetaboliteIds(const int32_ts& metaboliteIds) { _metaboliteIds = metaboliteIds; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// ispc exports
#include "CellGrowthRenderer_ispc.h"

using namespace ospray;
using namespace core;

namespace sonataexplorer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@

namespace sonataexplorer
{
using namespace core;

/**
* @brief The CellGrowthRenderer class can perform fast transparency
* and mapping of simulation data on the geometry
*/
class CellGrowthRenderer : public SimulationRenderer
class CellGrowthRenderer : public core::SimulationRenderer
{
public:
CellGrowthRenderer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
// ispc exports
#include "ProximityDetectionRenderer_ispc.h"

using namespace core;

namespace sonataexplorer
{
void ProximityDetectionRenderer::commit()
Expand Down
Loading

0 comments on commit 72f8343

Please sign in to comment.