Skip to content

Roundline precision #556

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

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from
Draft
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
15 changes: 10 additions & 5 deletions common/math/linearspace3.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,18 @@ namespace embree
template<typename T> __forceinline LinearSpace3<T> operator +( const LinearSpace3<T>& a ) { return LinearSpace3<T>(+a.vx,+a.vy,+a.vz); }
template<typename T> __forceinline LinearSpace3<T> rcp ( const LinearSpace3<T>& a ) { return a.inverse(); }

/* constructs a coordinate frame form a normalized normal */
/* constructs a coordinate frame form a normalized normal
following http://jcgt.org/published/0006/01/01/ */
template<typename T> __forceinline LinearSpace3<T> frame(const T& N)
{
const T dx0(0,N.z,-N.y);
const T dx1(-N.z,0,N.x);
const T dx = normalize(select(dot(dx0,dx0) > dot(dx1,dx1),dx0,dx1));
const T dy = normalize(cross(N,dx));
const typename T::Scalar sgn = sign(N.z);
const typename T::Scalar rs = N.z - sgn;
const typename T::Scalar a = rcp(rs);
const typename T::Scalar rxxs = N.x*N.x + sgn*rs;
const typename T::Scalar ryys = N.y*N.y + sgn*rs;
const typename T::Scalar rxy = N.x*N.y;
const T dx = T(rxxs*a,rxy*a,N.x);
const T dy = T(rxy*a,ryys*a,N.y);
return LinearSpace3<T>(dx,dy,N);
}

Expand Down
321 changes: 0 additions & 321 deletions kernels/geometry/cone.h

This file was deleted.

Loading
Loading