Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sunwj committed Jun 4, 2016
1 parent c9d911d commit 6fff6d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ set(CMAKE_AUTORCC ON)
set(RESOURCES_FILES qdarkstyle/style.qrc resources/images.qrc)

#VTK
set(VTK_DIR /Volumes/Free/SDK/CTK/build/VTK-build)
#set(VTK_DIR /Volumes/Free/SDK/CTK/build/VTK-build)
set(VTK_DIR /Users/sunwj/Desktop/SDK/CTK/build/VTK-build)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

#CTK
set(CTK_DIR /Volumes/Free/SDK/CTK/build/)
#set(CTK_DIR /Volumes/Free/SDK/CTK/build/)
set(CTK_DIR /Users/sunwj/Desktop/SDK/CTK/build)
find_package(CTK REQUIRED)
include(${CTK_USE_FILE})
set(CTK_LIBRARIES CTKCore CTKWidgets CTKVisualizationVTKCore CTKVisualizationVTKWidgets)
Expand Down
5 changes: 4 additions & 1 deletion core/sampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ __inline__ __device__ glm::vec2 uniform_sample_unit_disk(curandState& rng)
// return x and y in cartesian coordinate
__inline__ __device__ glm::vec2 uniform_sample_disk(curandState& rng, float r)
{
return glm::vec2(cosf(2.f * M_PI * curand_uniform(&rng)), sinf(sqrtf(curand_uniform(&rng)))) * r;
r *= sqrtf(curand_uniform(&rng));
float theta = 2.f * M_PI * curand_uniform(&rng);

return glm::vec2(cosf(theta), sinf(theta)) * r;
}

// return direction in cartesian space
Expand Down

0 comments on commit 6fff6d5

Please sign in to comment.