Comments (14)
I opened an issue: JuliaLang/julia#27361
from glabstraction.jl.
using Quaternions
using GeometryTypes
function (::Type{M})(q::Quaternions.Quaternion) where M <: Mat4
T = eltype(M)
sx, sy, sz = 2q.s*q.v1, 2q.s*q.v2, 2q.s*q.v3
xx, xy, xz = 2q.v1^2, 2q.v1*q.v2, 2q.v1*q.v3
yy, yz, zz = 2q.v2^2, 2q.v2*q.v3, 2q.v3^2
T0, T1 = zero(T), one(T)
Mat{4}(
T1-(yy+zz), xy+sz, xz-sy, T0,
xy-sz, T1-(xx+zz), yz+sx, T0,
xz+sy, yz-sx, T1-(xx+yy), T0,
T0, T0, T0, T1
)
end
function (::Type{M})(q::Quaternions.Quaternion) where M <: Mat3
T = eltype(M)
sx, sy, sz = 2q.s*q.v1, 2q.s*q.v2, 2q.s*q.v3
xx, xy, xz = 2q.v1^2, 2q.v1*q.v2, 2q.v1*q.v3
yy, yz, zz = 2q.v2^2, 2q.v2*q.v3, 2q.v3^2
T0, T1 = zero(T), one(T)
Mat{3}(
T1-(yy+zz), xy+sz, xz-sy,
xy-sz, T1-(xx+zz), yz+sx,
xz+sy, yz-sx, T1-(xx+yy)
)
end
results in
ERROR: TypeError: UnionAll: expected Type, got Int64
from glabstraction.jl.
using GeometryTypes
function (::Type{M})(q) where M <: Mat4
1
end
function (::Type{M})(q) where M <: Mat3
2
end
results in
ERROR: TypeError: UnionAll: expected Type, got Int64
on Julia v0.6.3, but is ok on Julia v0.6.2 .
from glabstraction.jl.
I just ran into the same issue (CentOS-7, Julia v0.6.3, custom build).
from glabstraction.jl.
Until the Julia issue is fixed, would this do as a workaround?
function (::Type{Mat4{T}})(q::Quaternions.Quaternion) where T
# ...
end
function (::Type{Mat3{T}})(q::Quaternions.Quaternion) where T
# ...
end
from glabstraction.jl.
I can't use GLVisualize at all, because when I import it it tries to precompile, and fails on GLAbstraction.
from glabstraction.jl.
If it solves it, feel free to open a PR :)
from glabstraction.jl.
(and thanks for figuring it out!)
from glabstraction.jl.
Question is, do we want to implement a workaround, and do an interim release of GLAbstraction, or hope for a speedy Julia-0.6.4. There seem to be more regressions in 0.6.3 (JuliaLang/julia#27381, JuliaLang/julia#27345), but I have no idea whether there will be a quick bug-fix release or not ...
from glabstraction.jl.
If you have it ready locally & it helps people, I'd be happy to merge & tag!
from glabstraction.jl.
Maybe the Rotation.jl package could be used for some functions in GLAbstraction, according to JuliaArrays/StaticArrays.jl#423 (comment)
It would reduce code redundancy and bugs.
from glabstraction.jl.
Would be nice! I have never looked a lot into this, since I've had GLMatrixMath, a 270 loc file, since forever and never needed anything more ;) Not sure if Rotations.jl even covers the functionality ...
from glabstraction.jl.
Should be fixed now: JuliaLang/METADATA.jl#15225 I
from glabstraction.jl.
@SimonDanisch , thanks! Sorry, I didn't get around to do the PR for you, was a bit overloaded.
from glabstraction.jl.
Related Issues (20)
- ERROR: UndefVarError: switch_context! not defined
- ERROR: MethodError: no method matching shadertype... HOT 1
- using pixel buffer objects
- TagBot trigger issue HOT 1
- Update tutorials and examples to work, now that `GLWindow.jl` has been archived. HOT 1
- Examples fail to run because shader string macros do not compile HOT 2
- Fails to precompile on Julia 0.6 HOT 6
- Batch flushing data to GLBuffer HOT 2
- Improve PerspectiveCamera rotation (upvector) HOT 3
- possible type instability in translate_cam HOT 6
- Loading shader from file results in LazyShader error
- FrameBuffer, GLFramebuffer, scattered functionality... OpenGL package? HOT 13
- segfault on finalizer HOT 3
- How to dynamically update a texture? HOT 2
- LLVM.dll unknown line
- Failure to add package in Julia 1.0.1 HOT 11
- Static z-axis rotation HOT 5
- Info about upcoming removal of packages in the General registry
- Nothing exported? [Julia v1.1]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glabstraction.jl.