Skip to content

Commit 430b954

Browse files
author
Cyrille Favreau
authored
Merge pull request #93 from favreau/master
1.1.0
2 parents 8a10ead + 733e71a commit 430b954

File tree

9 files changed

+46
-42
lines changed

9 files changed

+46
-42
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
88

99
set(NAME BIOEXPLORER)
10-
set(PACKAGE_VERSION 1.1.0)
10+
set(PACKAGE_VERSION 1.1.1)
1111
project(${NAME} VERSION ${PACKAGE_VERSION})
1212

1313
add_subdirectory(bioexplorer/core)

bioexplorer/core/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ find_package(OpenMP)
3131
set(CGAL_FOUND 0)
3232
option(${NAME}_USE_CGAL "Use CGAL meshing features" ON)
3333
if(${${NAME}_USE_CGAL})
34-
find_package(CGAL)
34+
find_package(CGAL REQUIRED)
3535
endif()
3636

3737
set(PQXX_FOUND 0)
3838
option(${NAME}_USE_PQXX "Use PostgreSQL database" ON)
3939
if(${${NAME}_USE_PQXX})
40-
find_package(PQXX)
40+
unset(PQXX_INCLUDE_DIRECTORIES CACHE)
41+
unset(PQXX_LIBRARIES CACHE)
42+
find_package(PQXX REQUIRED)
4143
endif()
4244

4345
include(ispc)

bioexplorer/core/module/ispc/render/AdvancedRenderer.ispc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,8 @@ inline vec3f AdvancedRenderer_shadeRay(
829829
const uniform AdvancedRenderer* uniform self, varying ScreenSample& sample)
830830
{
831831
Ray ray = sample.ray;
832+
float maxt = self->fogStart + self->fogThickness;
833+
832834
vec4f color = make_vec4f(0.f);
833835
vec3f bgColor = make_vec3f(0.f);
834836
if (self->showBackground)
@@ -839,7 +841,8 @@ inline vec3f AdvancedRenderer_shadeRay(
839841
uint32 depth = 0;
840842
float oldlocalRefraction = 1.f;
841843

842-
sample.z = inf;
844+
sample.z = maxt;
845+
ray.t = maxt;
843846
bool moreRebounds = true;
844847

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

953-
ray.t = inf - ray.t;
956+
maxt -= ray.t;
957+
ray.t = maxt;
954958
ray.primID = -1;
955959
ray.geomID = -1;
956960
ray.instID = -1;

bioexplorer/core/plugin/common/Logs.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,28 @@
2323
#include "GeneralSettings.h"
2424

2525
#include <iostream>
26-
#include <thread>
2726

2827
namespace bioexplorer
2928
{
3029
namespace common
3130
{
32-
#define PLUGIN_ERROR(message) \
33-
std::cerr << "[" << std::this_thread::get_id() \
34-
<< "] [ERROR] [BIO_EXPLORER] " << message << std::endl;
35-
#define PLUGIN_WARN(message) \
36-
std::cerr << "[" << std::this_thread::get_id() \
37-
<< "] [WARN ] [BIO_EXPLORER] " << message << std::endl;
38-
#define PLUGIN_INFO(message) \
39-
if (common::GeneralSettings::getInstance()->getLoggingEnabled()) \
40-
{ \
41-
std::cout << "[" << std::this_thread::get_id() \
42-
<< "] [INFO ] [BIO_EXPLORER] " << message << std::endl; \
43-
}
31+
#define PLUGIN_PREFIX "BE"
32+
33+
#define PLUGIN_ERROR(message) \
34+
std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl;
35+
#define PLUGIN_WARN(message) \
36+
std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl;
37+
#define PLUGIN_INFO(message) \
38+
std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl;
4439
#ifdef NDEBUG
45-
#define PLUGIN_DEBUG(message)
40+
#define PLUGIN_DEBUG(message) ;
4641
#else
47-
#define PLUGIN_DEBUG(message) \
48-
std::cout << "[" << std::this_thread::get_id() \
49-
<< "] [DEBUG] [BIO_EXPLORER] " << message << std::endl;
42+
#define PLUGIN_DEBUG(message) \
43+
std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl;
5044
#endif
45+
#define PLUGIN_TIMER(__time, __msg) \
46+
std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \
47+
<< std::endl;
5148

5249
#define PLUGIN_THROW(message) \
5350
{ \

bioexplorer/pythonsdk/bioexplorer/bio_explorer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ def import_from_cache(self, filename):
350350
raise RuntimeError(result["contents"])
351351
return result
352352

353-
def export_to_xyz(self, filename, file_format):
353+
def export_to_xyz(self, filename, file_format, low_bounds=Vector3(-1e38, -1e38, -1e38),
354+
high_bounds=Vector3(1e38, 1e38, 1e38)):
354355
"""
355356
Exports current scene to file as a XYZ file
356357
@@ -361,6 +362,8 @@ def export_to_xyz(self, filename, file_format):
361362
"""
362363
params = dict()
363364
params["filename"] = filename
365+
params["lowBounds"] = low_bounds.to_list()
366+
params["highBounds"] = high_bounds.to_list()
364367
params["fileFormat"] = file_format
365368
result = self._client.rockets_client.request(
366369
method=self.PLUGIN_API_PREFIX + "export-to-xyz", params=params)

bioexplorer/pythonsdk/bioexplorer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
# You should have received a copy of the GNU General Public License along with
2222
# this program. If not, see <https://www.gnu.org/licenses/>.
2323

24-
VERSION = '1.1.0'
24+
VERSION = '1.1.1'

bioexplorer/pythonsdk/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[metadata]
2-
version = 1.1.0
2+
version = 1.1.1
33
name = bioexplorer
44
summary = Blue Brain BioExplorer python API
55
long_description = file: README.md

extras/MediaMaker/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
1010
# Project
1111
# ==============================================================================
1212
set(NAME MEDIAMAKER)
13-
set(LIBRARY_NAME mediaMaker)
13+
set(LIBRARY_NAME MediaMaker)
1414
project(${NAME} VERSION ${PACKAGE_VERSION})
1515
set(${NAME}_VERSION_ABI 1)
1616

extras/MediaMaker/plugin/common/Logs.h

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,28 @@
2121
#pragma once
2222

2323
#include <iostream>
24-
#include <thread>
2524

2625
namespace bioexplorer
2726
{
2827
namespace mediamaker
2928
{
30-
#define PLUGIN_ERROR(message) \
31-
std::cerr << "[" << std::this_thread::get_id() \
32-
<< "] [ERROR] [MEDIA_MAKER] " << message << std::endl;
33-
#define PLUGIN_WARN(message) \
34-
std::cerr << "[" << std::this_thread::get_id() \
35-
<< "] [WARN ] [MEDIA_MAKER] " << message << std::endl;
36-
#define PLUGIN_INFO(message) \
37-
{ \
38-
std::cout << "[" << std::this_thread::get_id() \
39-
<< "] [INFO ] [MEDIA_MAKER] " << message << std::endl; \
40-
}
29+
#define PLUGIN_PREFIX "MM"
30+
31+
#define PLUGIN_ERROR(message) \
32+
std::cerr << "E [" << PLUGIN_PREFIX << "] " << message << std::endl;
33+
#define PLUGIN_WARN(message) \
34+
std::cerr << "W [" << PLUGIN_PREFIX << "] " << message << std::endl;
35+
#define PLUGIN_INFO(message) \
36+
std::cout << "I [" << PLUGIN_PREFIX << "] " << message << std::endl;
4137
#ifdef NDEBUG
42-
#define PLUGIN_DEBUG(message)
38+
#define PLUGIN_DEBUG(message) ;
4339
#else
44-
#define PLUGIN_DEBUG(message) \
45-
std::cout << "[" << std::this_thread::get_id() \
46-
<< "] [DEBUG] [MEDIA_MAKER] " << message << std::endl;
40+
#define PLUGIN_DEBUG(message) \
41+
std::cout << "D [" << PLUGIN_PREFIX << "] " << message << std::endl;
4742
#endif
43+
#define PLUGIN_TIMER(__time, __msg) \
44+
std::cout << "T [" << PLUGIN_PREFIX << "] [" << __time << "] " << __msg \
45+
<< std::endl;
4846

4947
#define PLUGIN_THROW(message) \
5048
{ \

0 commit comments

Comments
 (0)