@@ -305,6 +305,42 @@ function render!(scene, ::typeof(World), sys, sol, t)
305
305
true
306
306
end
307
307
308
+ function render! (scene, :: typeof (Frame), sys, sol, t)
309
+ sol (sol. t[1 ], idxs= sys. render)== true || return true # yes, == true
310
+ radius = sol (sol. t[1 ], idxs= sys. radius) |> Float32
311
+ length = sol (sol. t[1 ], idxs= sys. length) |> Float32
312
+ T = get_frame_fun (sol, sys)
313
+
314
+ thing = @lift begin
315
+ Ti = T ($ t)
316
+ Rx = Ti[:, 1 ]
317
+ O = Point3f (Ti[1 : 3 , 4 ]) # Assume world is never moving
318
+ x = O .+ Point3f (length* Rx)
319
+ Makie. GeometryBasics. Cylinder (O, x, radius)
320
+ end
321
+ mesh! (scene, thing, color= :red )
322
+
323
+ thing = @lift begin
324
+ Ti = T ($ t)
325
+ Ry = Ti[:, 2 ]
326
+ O = Point3f (Ti[1 : 3 , 4 ]) # Assume world is never moving
327
+ y = O .+ Point3f (length* Ry)
328
+ Makie. GeometryBasics. Cylinder (O, y, radius)
329
+ end
330
+ mesh! (scene, thing, color= :green )
331
+
332
+ thing = @lift begin
333
+ Ti = T ($ t)
334
+ Rz = Ti[:, 3 ]
335
+ O = Point3f (Ti[1 : 3 , 4 ]) # Assume world is never moving
336
+ z = O .+ Point3f (length* Rz)
337
+ Makie. GeometryBasics. Cylinder (O, z, radius)
338
+ end
339
+ mesh! (scene, thing, color= :blue )
340
+
341
+ true
342
+ end
343
+
308
344
function render! (scene, T:: Union{typeof(Revolute), typeof(RevolutePlanarLoopConstraint)} , sys, sol, t)
309
345
r_0 = get_fun (sol, collect (sys. frame_a. r_0))
310
346
n = get_fun (sol, collect (sys. n))
0 commit comments