void RegisterMeshWithoutLightmap(MeshContainer n) { AbstractGeometryElem geo = null; if (n.Mesh.name == "Sphere") { geo = new SphereBufferGeometryElem(n); } else if (n.Mesh.name == "Cylinder") { geo = new CylinderBufferGeometryElem(n); } else if (n.Mesh.name == "Quad") { geo = new QuadBufferGeometry(n); //} else if(n.Mesh.name == "Cube") { // geo = new BoxBufferGeometryElem(n); } else { geo = new BufferGeometryElem(n, false, Vector4.zero); } geo.Uuid = "geo-" + n.InstanceId; root.SharedNodeTable.Add(geo, n.InstanceId); }
public AFrameNode Create(CylinderBufferGeometryElem el) { var node = new AFrameNode("a-cylinder"); node.AddAttribute("height", el.Height); node.AddAttribute("radius", el.Radius); return(node); }
public void Visit(CylinderBufferGeometryElem el) { using (var scope = new JsonScopeObjectWriter(writer)) { scope.WriteKeyValue("uuid", el.Uuid); scope.WriteKeyValue("type", el.Type); scope.WriteKeyValue("radiusTop", el.Radius); scope.WriteKeyValue("radiusBottom", el.Radius); scope.WriteKeyValue("height", el.Height); scope.WriteKeyValue("radiusSegments", 16); } }
public void Visit(CylinderBufferGeometryElem el) { Node = factory.Create(el); }