Skip to content

Commit

Permalink
Merge pull request #10 from CarlBittendorf/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
CarlBittendorf committed Jul 23, 2021
2 parents 7079927 + dd8a644 commit 79aa4c4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BVHFiles"
uuid = "25714dd2-c69e-4994-8c66-7895118b2050"
authors = ["Carl Bittendorf"]
version = "0.2.0"
version = "0.2.1"

[deps]
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
Expand Down
1 change: 1 addition & 0 deletions src/BVHGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Base.@kwdef mutable struct EProps
offset::Vector{Float64} = zeros(Float64, 3)
end


"""
struct BVHGraph{T <: Integer} <: AbstractGraph{T}
Expand Down
4 changes: 2 additions & 2 deletions src/transformation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ function replace_offset!(g::BVHGraph, h::BVHGraph, gv₊₁::Integer, T::Matrix{

for f in frames(g)
Rᵥ = rotation(g, gv, f)
rotation!(g, gv, f, B * Rᵥ)
rotation!(g, gv, f, Rᵥ * B)

for n in outneighbors(g, gv)

if outneighbors(g, n) != []
Rᵥ₊₁ = rotation(g, n, f)
rotation!(g, n, f, inv(Rᵥ) * inv(B) * Rᵥ * Rᵥ₊₁)
rotation!(g, n, f, inv(B) * Rᵥ₊₁)
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ using Flux
scale!(7.0)

d = load("DAZ3D.bvh") |>
zero! |>
add_frames!(240) |>
project!(g, T)
zero! |>
add_frames!(240) |>
project!(g, T)

@test nframes(d) == nframes(g)
end

0 comments on commit 79aa4c4

Please sign in to comment.