Skip to content

Lion #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SeExpr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/generated
5 changes: 4 additions & 1 deletion src/SeExpr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@ IF(NOT WIN32)
ENDIF(NOT WIN32)
## Install binary and includes
FILE(GLOB public_includes "*.h")
INSTALL (TARGETS SeExpr SeExpr-static DESTINATION lib64)
IF (NOT DEFINED CMAKE_INSTALL_LIBDIR)
SET(CMAKE_INSTALL_LIBDIR "lib64")
ENDIF (NOT DEFINED CMAKE_INSTALL_LIBDIR)
INSTALL (TARGETS SeExpr SeExpr-static DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL (FILES ${public_includes} DESTINATION include)
12 changes: 6 additions & 6 deletions src/SeExpr/SeExprBuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static const char* vnoise_docstring=

SeVec3d cnoise(const SeVec3d& p)
{
return .5*vnoise(p)+.5;
return (.5 * vnoise(p)) + SeVec3d(.5);
}
static const char* cnoise_docstring="color cnoise ( vector v)\n"
"color noise formed with original perlin noise at location (C2 interpolant)";
Expand Down Expand Up @@ -622,7 +622,7 @@ static const char* vnoise_docstring=

SeVec3d cnoise4(int n, const SeVec3d* args)
{
return .5*vnoise4(n,args)+.5;
return (.5 * vnoise4(n,args)) + SeVec3d(.5);
}
static const char* cnoise4_docstring="color cnoise4 ( vector v,float t)\n"
"4D color noise formed with original perlin noise at location (C2 interpolant)";
Expand Down Expand Up @@ -673,7 +673,7 @@ static const char* vnoise_docstring=

SeVec3d cturbulence(int n, const SeVec3d* args)
{
return vturbulence(n, args) * .5 + .5;
return (vturbulence(n, args) * .5) + SeVec3d(.5);
}


Expand Down Expand Up @@ -788,13 +788,13 @@ static const char* vnoise_docstring=

SeVec3d cfbm(int n, const SeVec3d* args)
{
return vfbm(n, args) * .5 + .5;
return (vfbm(n, args) * .5) + SeVec3d(.5);
}
static const char* cfbm_docstring="color cfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)";

SeVec3d cfbm4(int n, const SeVec3d* args)
{
return vfbm4(n, args) * .5 + .5;
return (vfbm4(n, args) * .5) + SeVec3d(.5);
}
static const char* cfbm4_docstring="color cfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)";

Expand Down Expand Up @@ -854,7 +854,7 @@ static const char* vnoise_docstring=
for (double j = -1; j <= 1; j++) {
for (double k = -1; k <= 1; k++, n++) {
SeVec3d testcell = cell + SeVec3d(i,j,k);
data.points[n] = testcell + jitter * (ccellnoise(testcell - .5));
data.points[n] = testcell + jitter * ccellnoise(testcell - SeVec3d(.5));
}
}
}
Expand Down