Skip to content

Commit 51e7818

Browse files
committed
Merge branch 'master' into viewscene-viewtab-fix
2 parents c7cff50 + 69f9001 commit 51e7818

40 files changed

+497
-184
lines changed

.github/CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
TODO: Contribution guide. Follow this example:
2+
3+
https://github.com/atom/atom/blob/master/CONTRIBUTING.md
4+
5+
TODO add contribution guidelines. These could include:
6+
7+
Steps for creating good issues or pull requests.
8+
Links to external documentation, mailing lists, or a code of conduct.
9+
Community and behavioral expectations.

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TODO
2+
3+
In the new file, add your issue template. This could include:
4+
5+
Expected behavior and actual behavior.
6+
Steps to reproduce the problem.
7+
Specifications like the version of the project, operating system, or hardware.
8+
9+
Example:
10+
https://github.com/atom/atom/blob/master/ISSUE_TEMPLATE.md

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
TODO
2+
3+
In the new file, add your pull request template. This could include:
4+
5+
A reference to a related issue in your repository.
6+
A description of the changes proposed in the pull request.
7+
@mentions of the person or team responsible for reviewing proposed changes.
8+

src/CMakeLists.txt

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ MARK_AS_ADVANCED(BUILD_SHARED_LIBS)
7575

7676
########################################################################
7777
# Headless build
78-
79-
OPTION(BUILD_HEADLESS "Build headless version, without Qt" OFF)
80-
MARK_AS_ADVANCED(BUILD_HEADLESS)
78+
#
79+
#OPTION(BUILD_HEADLESS "Build headless version, without Qt" OFF)
80+
#MARK_AS_ADVANCED(BUILD_HEADLESS)
8181

8282

8383
########################################################################
@@ -619,7 +619,9 @@ MARK_AS_ADVANCED(CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_RUNTIME_OUTPUT_DIRECTORY)
619619
SET(BUILD_FROM_TOP_LEVEL 1)
620620

621621
ADD_SUBDIRECTORY(Externals)
622-
ADD_SUBDIRECTORY(Interface)
622+
IF(NOT BUILD_HEADLESS)
623+
ADD_SUBDIRECTORY(Interface)
624+
ENDIF()
623625
ADD_SUBDIRECTORY(Core)
624626
ADD_SUBDIRECTORY(Dataflow)
625627
ADD_SUBDIRECTORY(Modules)
@@ -761,23 +763,25 @@ SET_PROPERTY(TARGET Engine_Network PROPERTY FOLDER "Dataflow/Engine")
761763
SET_PROPERTY(TARGET Engine_Scheduler PROPERTY FOLDER "Dataflow/Engine")
762764
SET_PROPERTY(TARGET Dataflow_State PROPERTY FOLDER "Dataflow")
763765

764-
SET_PROPERTY(TARGET Interface_Modules_Base PROPERTY FOLDER "Interface/Modules")
765-
SET_PROPERTY(TARGET Interface_Modules_DataIO PROPERTY FOLDER "Interface/Modules")
766-
SET_PROPERTY(TARGET Interface_Modules_Math PROPERTY FOLDER "Interface/Modules")
767-
SET_PROPERTY(TARGET Interface_Modules_Visualization PROPERTY FOLDER "Interface/Modules")
768-
SET_PROPERTY(TARGET Interface_Modules_Render PROPERTY FOLDER "Interface/Modules")
769-
SET_PROPERTY(TARGET Interface_Modules_FiniteElements PROPERTY FOLDER "Interface/Modules")
770-
SET_PROPERTY(TARGET Interface_Modules_BrainStimulator PROPERTY FOLDER "Interface/Modules")
771-
SET_PROPERTY(TARGET Interface_Modules_Testing PROPERTY FOLDER "Interface/Modules")
772-
SET_PROPERTY(TARGET Interface_Modules_String PROPERTY FOLDER "Interface/Modules")
773-
SET_PROPERTY(TARGET Interface_Modules_Fields PROPERTY FOLDER "Interface/Modules")
774-
SET_PROPERTY(TARGET Interface_Modules_Bundle PROPERTY FOLDER "Interface/Modules")
775-
SET_PROPERTY(TARGET Interface_Modules_Matlab PROPERTY FOLDER "Interface/Modules")
776-
SET_PROPERTY(TARGET Interface_Modules_Forward PROPERTY FOLDER "Interface/Modules")
777-
SET_PROPERTY(TARGET Interface_Modules_Inverse PROPERTY FOLDER "Interface/Modules")
778-
SET_PROPERTY(TARGET Interface_Modules_Teem PROPERTY FOLDER "Interface/Modules")
779-
SET_PROPERTY(TARGET Interface_Modules_Factory PROPERTY FOLDER "Interface/Modules")
780-
SET_PROPERTY(TARGET Interface_Application PROPERTY FOLDER "Interface/Application")
766+
IF(NOT BUILD_HEADLESS)
767+
SET_PROPERTY(TARGET Interface_Modules_Base PROPERTY FOLDER "Interface/Modules")
768+
SET_PROPERTY(TARGET Interface_Modules_DataIO PROPERTY FOLDER "Interface/Modules")
769+
SET_PROPERTY(TARGET Interface_Modules_Math PROPERTY FOLDER "Interface/Modules")
770+
SET_PROPERTY(TARGET Interface_Modules_Visualization PROPERTY FOLDER "Interface/Modules")
771+
SET_PROPERTY(TARGET Interface_Modules_Render PROPERTY FOLDER "Interface/Modules")
772+
SET_PROPERTY(TARGET Interface_Modules_FiniteElements PROPERTY FOLDER "Interface/Modules")
773+
SET_PROPERTY(TARGET Interface_Modules_BrainStimulator PROPERTY FOLDER "Interface/Modules")
774+
SET_PROPERTY(TARGET Interface_Modules_Testing PROPERTY FOLDER "Interface/Modules")
775+
SET_PROPERTY(TARGET Interface_Modules_String PROPERTY FOLDER "Interface/Modules")
776+
SET_PROPERTY(TARGET Interface_Modules_Fields PROPERTY FOLDER "Interface/Modules")
777+
SET_PROPERTY(TARGET Interface_Modules_Bundle PROPERTY FOLDER "Interface/Modules")
778+
SET_PROPERTY(TARGET Interface_Modules_Matlab PROPERTY FOLDER "Interface/Modules")
779+
SET_PROPERTY(TARGET Interface_Modules_Forward PROPERTY FOLDER "Interface/Modules")
780+
SET_PROPERTY(TARGET Interface_Modules_Inverse PROPERTY FOLDER "Interface/Modules")
781+
SET_PROPERTY(TARGET Interface_Modules_Teem PROPERTY FOLDER "Interface/Modules")
782+
SET_PROPERTY(TARGET Interface_Modules_Factory PROPERTY FOLDER "Interface/Modules")
783+
SET_PROPERTY(TARGET Interface_Application PROPERTY FOLDER "Interface/Application")
784+
ENDIF()
781785

782786
SET_PROPERTY(TARGET Modules_Basic PROPERTY FOLDER "Modules/Basic")
783787
SET_PROPERTY(TARGET Modules_Math PROPERTY FOLDER "Modules/Math")
@@ -869,7 +873,9 @@ IF(BUILD_TESTING)
869873
SET_PROPERTY(TARGET Modules_Legacy_Matlab_DataIO_Tests PROPERTY FOLDER "Modules/DataIO")
870874
SET_PROPERTY(TARGET Modules_Factory_Tests PROPERTY FOLDER "Modules/Basic")
871875

872-
SET_PROPERTY(TARGET Interface_Modules_Render_Tests PROPERTY FOLDER "Interface/Tests")
876+
IF(NOT BUILD_HEADLESS)
877+
SET_PROPERTY(TARGET Interface_Modules_Render_Tests PROPERTY FOLDER "Interface/Tests")
878+
ENDIF()
873879
IF(BUILD_WITH_PYTHON)
874880
SET_PROPERTY(TARGET Core_Python_Tests PROPERTY FOLDER "Core/Tests")
875881
SET_PROPERTY(TARGET Engine_Python_Tests PROPERTY FOLDER "Dataflow/Engine/Tests")
@@ -886,7 +892,9 @@ IF(BUILD_WITH_PYTHON)
886892
SET_PROPERTY(TARGET Core_Python PROPERTY FOLDER "Core")
887893
SET_PROPERTY(TARGET SCIRunPythonAPI PROPERTY FOLDER "Dataflow/Engine")
888894
SET_PROPERTY(TARGET Modules_Python PROPERTY FOLDER "Modules/Python")
889-
SET_PROPERTY(TARGET Interface_Modules_Python PROPERTY FOLDER "Interface/Modules")
895+
IF(NOT BUILD_HEADLESS)
896+
SET_PROPERTY(TARGET Interface_Modules_Python PROPERTY FOLDER "Interface/Modules")
897+
ENDIF()
890898
ENDIF()
891899

892900
########################################################################

src/Core/Datatypes/Color.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333

3434
#include <iosfwd>
3535
#include <Core/Datatypes/Datatype.h>
36+
#include <Core/Datatypes/Geometry.h>
37+
#include <Core/GeometryPrimitives/Transform.h>
38+
#include <Core/Algorithms/Base/Variable.h>
3639
#include <Core/Datatypes/share.h>
3740

3841
namespace SCIRun {
@@ -49,24 +52,24 @@ namespace Datatypes {
4952
ColorRGB(double r, double g, double b);
5053
ColorRGB(double r, double g, double b, double a);
5154
//adjust alpha while copying
52-
ColorRGB(const ColorRGB& color, double a);
55+
//ColorRGB(const ColorRGB& color, double a);
5356

5457
// These equality operations should use floating point comparisons.
55-
inline bool operator==(const ColorRGB& c) const {
58+
bool operator==(const ColorRGB& c) const {
5659
return ((r_==c.r_)&&(g_==c.g_)&&(b_==c.b_)&&(a_==c.a_));
5760
}
5861

59-
inline bool operator!=(const ColorRGB& c) const {
62+
bool operator!=(const ColorRGB& c) const {
6063
return !(*this == c);
6164
}
6265

6366
/// \todo Add normalization function to normalize 0 - 255 to 0 - 1.0.
6467
/// useful when reading colors from strings.
6568

66-
inline double r() const {return r_;}
67-
inline double g() const {return g_;}
68-
inline double b() const {return b_;}
69-
inline double a() const {return a_;}
69+
double r() const {return r_;}
70+
double g() const {return g_;}
71+
double b() const {return b_;}
72+
double a() const {return a_;}
7073

7174
std::string toString() const;
7275
};
@@ -75,6 +78,12 @@ namespace Datatypes {
7578

7679
SCISHARE std::ostream& operator<<(std::ostream& out, const ColorRGB& color);
7780

81+
struct SCISHARE ViewSceneFeedback : ModuleFeedback
82+
{
83+
Algorithms::Variable info;
84+
Core::Geometry::Transform transform;
85+
};
86+
7887
}}}
7988

8089

src/Core/Datatypes/Geometry.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ GeometryObject::GeometryObject(const GeometryIDGenerator& idGenerator, const std
3636
{
3737
}
3838

39-
GeometryObject::GeometryObject(const std::string& tag) :
40-
objectName_(tag)
41-
{
42-
}
43-
4439
GeometryObject* GeometryObject::clone() const
4540
{
4641
return nullptr; //TODO

src/Core/Datatypes/Geometry.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ namespace Datatypes
4343
{
4444
public:
4545
GeometryObject(const GeometryIDGenerator& idGenerator, const std::string& tag);
46-
GeometryObject(const std::string& tag);
4746

4847
GeometryObject(const GeometryObject& other) = delete;
4948
GeometryObject& operator=(const GeometryObject& other) = delete;
@@ -58,6 +57,11 @@ namespace Datatypes
5857
const std::string objectName_; ///< Name of this object. Should be unique across all modules in the network.
5958
};
6059

60+
struct SCISHARE ModuleFeedback
61+
{
62+
// tag class
63+
};
64+
6165
}}}
6266

6367

src/Core/GeometryPrimitives/BBox.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ BBox::overlaps_inside(const BBox & bb) const
111111
}
112112

113113
bool
114-
BBox::intersect(const Point& origin, const Vector& dir,
115-
Point& hitPoint)
114+
BBox::intersect(const Point& origin, const Vector& dir, Point& hitPoint) const
116115
{
117116
Vector t1 = (cmin_ - origin) / dir;
118117
Vector t2 = (cmax_ - origin) / dir;

src/Core/GeometryPrimitives/BBox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class BBox {
242242

243243
/// returns true if the ray hit the bbox and returns the hit point
244244
/// in hitNear
245-
SCISHARE bool intersect(const Point& e, const Vector& v, Point& hitNear);
245+
SCISHARE bool intersect(const Point& e, const Vector& v, Point& hitNear) const;
246246

247247
friend std::ostream& operator<<(std::ostream& out, const BBox& b);
248248

src/Core/Python/PythonInterpreter.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ void PythonInterpreter::initialize_eventhandler(const std::string& commandLine,
289289
// relative paths
290290
lib_path_list.push_back(lib_path.parent_path() / boost::filesystem::path("Frameworks") / PYTHONPATH);
291291
lib_path_list.push_back(lib_path / PYTHONPATH);
292+
lib_path_list.push_back(lib_path.parent_path() / PYTHONPATH);
292293

293294
if (isOSXSCIRunTestExecutable(commandLine))
294295
{

0 commit comments

Comments
 (0)