Skip to content

Commit

Permalink
Merge pull request #93 from favreau/master
Browse files Browse the repository at this point in the history
1.1.0
  • Loading branch information
favreau authored Nov 16, 2021
2 parents 8a10ead + 733e71a commit 430b954
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)

set(NAME BIOEXPLORER)
set(PACKAGE_VERSION 1.1.0)
set(PACKAGE_VERSION 1.1.1)
project(${NAME} VERSION ${PACKAGE_VERSION})

add_subdirectory(bioexplorer/core)
Expand Down
6 changes: 4 additions & 2 deletions bioexplorer/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ find_package(OpenMP)
set(CGAL_FOUND 0)
option(${NAME}_USE_CGAL "Use CGAL meshing features" ON)
if(${${NAME}_USE_CGAL})
find_package(CGAL)
find_package(CGAL REQUIRED)
endif()

set(PQXX_FOUND 0)
option(${NAME}_USE_PQXX "Use PostgreSQL database" ON)
if(${${NAME}_USE_PQXX})
find_package(PQXX)
unset(PQXX_INCLUDE_DIRECTORIES CACHE)
unset(PQXX_LIBRARIES CACHE)
find_package(PQXX REQUIRED)
endif()

include(ispc)
Expand Down
8 changes: 6 additions & 2 deletions bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,8 @@ inline vec3f AdvancedRenderer_shadeRay(
const uniform AdvancedRenderer* uniform self, varying ScreenSample& sample)
{
Ray ray = sample.ray;
float maxt = self->fogStart + self->fogThickness;

vec4f color = make_vec4f(0.f);
vec3f bgColor = make_vec3f(0.f);
if (self->showBackground)
Expand All @@ -839,7 +841,8 @@ inline vec3f AdvancedRenderer_shadeRay(
uint32 depth = 0;
float oldlocalRefraction = 1.f;

sample.z = inf;
sample.z = maxt;
ray.t = maxt;
bool moreRebounds = true;

while (moreRebounds && depth < self->maxBounces && color.w < 0.95f)
Expand Down Expand Up @@ -950,7 +953,8 @@ inline vec3f AdvancedRenderer_shadeRay(
++depth;
}

ray.t = inf - ray.t;
maxt -= ray.t;
ray.t = maxt;
ray.primID = -1;
ray.geomID = -1;
ray.instID = -1;
Expand Down
31 changes: 14 additions & 17 deletions bioexplorer/core/plugin/common/Logs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,28 @@
#include "GeneralSettings.h"

#include <iostream>
#include <thread>

namespace bioexplorer
{
namespace common
{
#define PLUGIN_ERROR(message) \
std::cerr << "[" << std::this_thread::get_id() \
<< "] [ERROR] [BIO_EXPLORER] " << message << std::endl;
#define PLUGIN_WARN(message) \
std::cerr << "[" << std::this_thread::get_id() \
<< "] [WARN ] [BIO_EXPLORER] " << message << std::endl;
#define PLUGIN_INFO(message) \
if (common::GeneralSettings::getInstance()->getLoggingEnabled()) \
{ \
std::cout << "[" << std::this_thread::get_id() \
<< "] [INFO ] [BIO_EXPLORER] " << message << std::endl; \
}
#define PLUGIN_PREFIX "BE"

#define PLUGIN_ERROR(message) \
std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl;
#define PLUGIN_WARN(message) \
std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl;
#define PLUGIN_INFO(message) \
std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl;
#ifdef NDEBUG
#define PLUGIN_DEBUG(message)
#define PLUGIN_DEBUG(message) ;
#else
#define PLUGIN_DEBUG(message) \
std::cout << "[" << std::this_thread::get_id() \
<< "] [DEBUG] [BIO_EXPLORER] " << message << std::endl;
#define PLUGIN_DEBUG(message) \
std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl;
#endif
#define PLUGIN_TIMER(__time, __msg) \
std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \
<< std::endl;

#define PLUGIN_THROW(message) \
{ \
Expand Down
5 changes: 4 additions & 1 deletion bioexplorer/pythonsdk/bioexplorer/bio_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ def import_from_cache(self, filename):
raise RuntimeError(result["contents"])
return result

def export_to_xyz(self, filename, file_format):
def export_to_xyz(self, filename, file_format, low_bounds=Vector3(-1e38, -1e38, -1e38),
high_bounds=Vector3(1e38, 1e38, 1e38)):
"""
Exports current scene to file as a XYZ file
Expand All @@ -361,6 +362,8 @@ def export_to_xyz(self, filename, file_format):
"""
params = dict()
params["filename"] = filename
params["lowBounds"] = low_bounds.to_list()
params["highBounds"] = high_bounds.to_list()
params["fileFormat"] = file_format
result = self._client.rockets_client.request(
method=self.PLUGIN_API_PREFIX + "export-to-xyz", params=params)
Expand Down
2 changes: 1 addition & 1 deletion bioexplorer/pythonsdk/bioexplorer/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

VERSION = '1.1.0'
VERSION = '1.1.1'
2 changes: 1 addition & 1 deletion bioexplorer/pythonsdk/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
version = 1.1.0
version = 1.1.1
name = bioexplorer
summary = Blue Brain BioExplorer python API
long_description = file: README.md
Expand Down
2 changes: 1 addition & 1 deletion extras/MediaMaker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
# Project
# ==============================================================================
set(NAME MEDIAMAKER)
set(LIBRARY_NAME mediaMaker)
set(LIBRARY_NAME MediaMaker)
project(${NAME} VERSION ${PACKAGE_VERSION})
set(${NAME}_VERSION_ABI 1)

Expand Down
30 changes: 14 additions & 16 deletions extras/MediaMaker/plugin/common/Logs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,28 @@
#pragma once

#include <iostream>
#include <thread>

namespace bioexplorer
{
namespace mediamaker
{
#define PLUGIN_ERROR(message) \
std::cerr << "[" << std::this_thread::get_id() \
<< "] [ERROR] [MEDIA_MAKER] " << message << std::endl;
#define PLUGIN_WARN(message) \
std::cerr << "[" << std::this_thread::get_id() \
<< "] [WARN ] [MEDIA_MAKER] " << message << std::endl;
#define PLUGIN_INFO(message) \
{ \
std::cout << "[" << std::this_thread::get_id() \
<< "] [INFO ] [MEDIA_MAKER] " << message << std::endl; \
}
#define PLUGIN_PREFIX "MM"

#define PLUGIN_ERROR(message) \
std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl;
#define PLUGIN_WARN(message) \
std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl;
#define PLUGIN_INFO(message) \
std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl;
#ifdef NDEBUG
#define PLUGIN_DEBUG(message)
#define PLUGIN_DEBUG(message) ;
#else
#define PLUGIN_DEBUG(message) \
std::cout << "[" << std::this_thread::get_id() \
<< "] [DEBUG] [MEDIA_MAKER] " << message << std::endl;
#define PLUGIN_DEBUG(message) \
std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl;
#endif
#define PLUGIN_TIMER(__time, __msg) \
std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \
<< std::endl;

#define PLUGIN_THROW(message) \
{ \
Expand Down

0 comments on commit 430b954

Please sign in to comment.