Skip to content

Commit

Permalink
Update repository and namespace names.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Apr 16, 2015
1 parent d73f2d0 commit f850607
Show file tree
Hide file tree
Showing 25 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.4)
project(Rainy)
project(spica)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})

add_executable(simplept simplept_example.cc)

target_link_libraries(simplept "${LIB_PREFIX}rainy_renderer${LIB_SUFFIX}")
target_link_libraries(simplept "${LIB_PREFIX}spica_renderer${LIB_SUFFIX}")

include_directories(${CMAKE_CURRENT_LIST_DIR})
6 changes: 3 additions & 3 deletions example/simplept_example.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>

#include "../include/rainy.h"
using namespace rainy;
#include "../include/spica.h"
using namespace spica;

int main(int argc, char **argv) {
std::cout << "Path tracing" << std::endl << std::endl;
Expand All @@ -18,7 +18,7 @@ int main(int argc, char **argv) {
scene.addSphere(Sphere(16.5, Vector3(77.0, 16.5, 78), Color(), Color(0.99, 0.99, 0.99), REFLECTION_REFRACTION)); // Glass ball
scene.addSphere(Sphere(15.0, Vector3(50.0, 90.0, 81.6), Color(36, 36, 36), Color(), REFLECTION_DIFFUSE)); // Light

Renderer renderer(256, 256, 16, 4);
Renderer renderer(128, 128, 8, 4);
renderer.render(scene);

return 0;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ list(APPEND SOURCE_FILES Triangle.h Triangle.cc)
list(APPEND SOURCE_FILES Quad.h Quad.cc)
list(APPEND SOURCE_FILES Renderer.h Renderer.cc)
list(APPEND SOURCE_FILES material.h)
list(APPEND SOURCE_FILES ../../include/rainy.h common.h)
list(APPEND SOURCE_FILES ../../include/spica.h common.h)

add_library(rainy_renderer SHARED ${SOURCE_FILES})
add_library(spica_renderer SHARED ${SOURCE_FILES})
2 changes: 1 addition & 1 deletion src/Renderer/Plane.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define RAINY_PLANE_EXPORT
#include "Plane.h"

namespace rainy {
namespace spica {
Plane::Plane()
: Primitive()
, _distance(0.0)
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "Primitive.h"

namespace rainy {
namespace spica {

class RAINY_PLANE_DLL Plane : public Primitive {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Primitive.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define RAINY_PRIMITIVE_EXPORT
#include "Primitive.h"

namespace rainy {
namespace spica {

Primitive::Primitive()
: _emission()
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "Ray.h"
#include "material.h"

namespace rainy {
namespace spica {
/* Interface class for shape primitives (Plane, Sphere etc.)
*/
class RAINY_PRIMITIVE_DLL Primitive {
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Random.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef RAINY_RANDOM_H_
#define RAINY_RANDOM_H_

namespace rainy {
namespace spica {

/*
* A singleton class for generating random numbers
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Random_detail.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Thanks!

#include "common.h"

namespace rainy {
namespace spica {

namespace { // NOLINT

Expand Down
4 changes: 2 additions & 2 deletions src/Renderer/Ray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "Ray.h"
#include "common.h"

namespace rainy {
namespace spica {

Ray::Ray()
: _origin()
Expand Down Expand Up @@ -73,4 +73,4 @@ namespace rainy {
return _hitPoint.distance();
}

} // namespace rainy
} // namespace spica
4 changes: 2 additions & 2 deletions src/Renderer/Ray.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "Vector3.h"

namespace rainy {
namespace spica {

class RAINY_RAY_DLL Ray {
private:
Expand Down Expand Up @@ -75,6 +75,6 @@ namespace rainy {
inline void setObjectId(int id) { _objectId = id; }
};

} // namespace rainy
} // namespace spica

#endif // RAINY_RAY_H_
2 changes: 1 addition & 1 deletion src/Renderer/Renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "material.h"
#include "Scene.h"

namespace rainy {
namespace spica {

const Color Renderer::backgroundColor = Color();
const int Renderer::maxDepth = 5;
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "Random.h"
#include "material.h"

namespace rainy {
namespace spica {

class RAINY_RENDERER_DLL Renderer {
private:
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <cstring>

namespace rainy {
namespace spica {

Scene::Scene()
: _nPrimitives(0)
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer/Scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "Sphere.h"
#include "Ray.h"

namespace rainy {
namespace spica {

class RAINY_SCENE_DLL Scene {
private:
Expand Down
4 changes: 2 additions & 2 deletions src/Renderer/Sphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "common.h"

namespace rainy {
namespace spica {

Sphere::Sphere()
: Primitive()
Expand Down Expand Up @@ -64,4 +64,4 @@ namespace rainy {
return true;
}

} // namespace rainy
} // namespace spica
4 changes: 2 additions & 2 deletions src/Renderer/Sphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "material.h"
#include "Ray.h"

namespace rainy {
namespace spica {

class RAINY_SPHERE_DLL Sphere : public Primitive {
private:
Expand All @@ -43,6 +43,6 @@ namespace rainy {

}; // class Sphere

} // namespace rainy
} // namespace spica

#endif // RAINY_SPHERE_H_
22 changes: 11 additions & 11 deletions src/Renderer/Vector3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "Vector3.h"
#include "common.h"

namespace rainy {
namespace spica {

Vector3::Vector3()
: _x(0.0)
Expand Down Expand Up @@ -101,32 +101,32 @@ namespace rainy {
}
}

rainy::Vector3 operator+(const rainy::Vector3& v1, const rainy::Vector3& v2) {
rainy::Vector3 ret = v1;
spica::Vector3 operator+(const spica::Vector3& v1, const spica::Vector3& v2) {
spica::Vector3 ret = v1;
ret += v2;
return ret;
}

rainy::Vector3 operator-(const rainy::Vector3& v1, const rainy::Vector3& v2) {
rainy::Vector3 ret = v1;
spica::Vector3 operator-(const spica::Vector3& v1, const spica::Vector3& v2) {
spica::Vector3 ret = v1;
ret -= v2;
return ret;
}

rainy::Vector3 operator*(const rainy::Vector3& v, double s) {
rainy::Vector3 ret = v;
spica::Vector3 operator*(const spica::Vector3& v, double s) {
spica::Vector3 ret = v;
ret *= s;
return ret;
}

rainy::Vector3 operator*(double s, const rainy::Vector3& v) {
rainy::Vector3 ret = v;
spica::Vector3 operator*(double s, const spica::Vector3& v) {
spica::Vector3 ret = v;
ret *= s;
return ret;
}

rainy::Vector3 operator/(const rainy::Vector3& v, double s) {
rainy::Vector3 ret = v;
spica::Vector3 operator/(const spica::Vector3& v, double s) {
spica::Vector3 ret = v;
ret /= s;
return ret;
}
14 changes: 7 additions & 7 deletions src/Renderer/Vector3.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define RAINY_VECTOR3_DLL
#endif

namespace rainy {
namespace spica {

class RAINY_VECTOR3_DLL Vector3 {
private:
Expand Down Expand Up @@ -42,12 +42,12 @@ namespace rainy {
double z() const;
}; // class Vector3

} // namespace rainy
} // namespace spica

RAINY_VECTOR3_DLL rainy::Vector3 operator+(const rainy::Vector3& v1, const rainy::Vector3& v2);
RAINY_VECTOR3_DLL rainy::Vector3 operator-(const rainy::Vector3& v1, const rainy::Vector3& v2);
RAINY_VECTOR3_DLL rainy::Vector3 operator*(const rainy::Vector3& v, double s);
RAINY_VECTOR3_DLL rainy::Vector3 operator*(double s, const rainy::Vector3& v);
RAINY_VECTOR3_DLL rainy::Vector3 operator/(const rainy::Vector3& v, double s);
RAINY_VECTOR3_DLL spica::Vector3 operator+(const spica::Vector3& v1, const spica::Vector3& v2);
RAINY_VECTOR3_DLL spica::Vector3 operator-(const spica::Vector3& v1, const spica::Vector3& v2);
RAINY_VECTOR3_DLL spica::Vector3 operator*(const spica::Vector3& v, double s);
RAINY_VECTOR3_DLL spica::Vector3 operator*(double s, const spica::Vector3& v);
RAINY_VECTOR3_DLL spica::Vector3 operator/(const spica::Vector3& v, double s);

#endif // RAINY_VECTOR3_H_
2 changes: 1 addition & 1 deletion src/Renderer/material.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "Vector3.h"

namespace rainy {
namespace spica {

typedef Vector3 Color;

Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function (add_gtest test_name test_source)
add_executable(${test_name} ${SOURCE_FILES})
target_link_libraries(${test_name} ${GTEST_LIBRARY})
target_link_libraries(${test_name} ${GTEST_MAIN_LIBRARY})
target_link_libraries(${test_name} "${LIB_PREFIX}rainy_renderer${LIB_SUFFIX}")
target_link_libraries(${test_name} "${LIB_PREFIX}spica_renderer${LIB_SUFFIX}")

add_test(NAME ${test_name} COMMAND ${test_name})
endfunction(add_gtest)
Expand Down
4 changes: 2 additions & 2 deletions test/test_geometry.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "gtest/gtest.h"

#include "../include/rainy.h"
using namespace rainy;
#include "../include/spica.h"
using namespace spica;

// ------------------------------
// Primitive class test
Expand Down
4 changes: 2 additions & 2 deletions test/test_vector.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "gtest/gtest.h"

#include "../include/rainy.h"
using namespace rainy;
#include "../include/spica.h"
using namespace spica;

TEST(Vector3Test, InstanceTest) {
Vector3 v;
Expand Down

0 comments on commit f850607

Please sign in to comment.