Fast Ply / Point Cloud loading

A custom built class with a Rubik’s Cube manipulation.

Two boxes, connected together. The first loads a .ply file:

// load a Ply file
var LoadPly = Java.type("")
var ply = new LoadPly("/Users/marc/Desktop/andre_playground/fused_small_ascii.ply")

// make a layer for it
var layer = _.stage.withName("pointLayer")
layer.is3D = true

// export it
_.ply = ply

We’ve put this in a separate box, since it might be slow to execute, we only really want to do it once. The second (the ‘child’ of the first), can contain animations like this:

var ply = _.ply
var layer = _.stage.withName("pointLayer")

// give us control over the shader

	// rotate around the center, direction up, by 0.01 radians 
	ply.planarRotate(vec(0,0,0), vec(0, 0, 1), 0.01), "theroom")

This yields: