public JsonChildPosInfo(int childID, Vector3 pos, Vector3 rot, Vector3 scal) { this.childID = childID; JsonChildPos = new JsonVector3(pos); JsonChildRot = new JsonVector3(rot); JsonChildScal = new JsonVector3(scal); }
public JsonChildPosInfo(int childID, Transform transform) { this.childID = childID; JsonChildPos = new JsonVector3(transform.localPosition); JsonChildRot = new JsonVector3(transform.localEulerAngles); JsonChildScal = new JsonVector3(transform.localScale); }
public JsonChildPosInfo() { childID = -1; JsonChildPos = new JsonVector3(); JsonChildRot = new JsonVector3(); JsonChildScal = new JsonVector3(); }
public JsonLayer(Layer l) { List <JsonChunk> list = new List <JsonChunk>(); for (int i = 0; i < l.Resolution; i++) { for (int j = 0; j < l.Resolution; j++) { for (int k = 0; k < l.Resolution; k++) { if (l.chunks[i, j, k].voxels.Initialized) { JsonChunk jsonChunk = new JsonChunk(l.chunks[i, j, k]); if (jsonChunk.Values != null && jsonChunk.Values.Length != 0) { list.Add(jsonChunk); } } } } } Chunks = list.ToArray(); Name = l.name; Rotation = new JsonQuaternion(l.transform.rotation); Position = new JsonVector3(l.transform.position); Scale = new JsonVector3(l.transform.localScale); Size = l.Size; Smoothness = l.Smoothness; Metallic = l.Metallic; Resolution = l.Resolution; ChunkResolution = l.ChunkResolution; RenderType = (int)l.RenderType; }
public JsonWorldTransform(Transform transform) { JsonWorldPos = new JsonVector3(transform.position); JsonWorldRot = new JsonVector3(transform.rotation.eulerAngles); JsonWorldScal = new JsonVector3(transform.lossyScale); }
public JsonWorldTransform(Vector3 Pos, Vector3 rot, Vector3 scal) { JsonWorldPos = new JsonVector3(Pos); JsonWorldRot = new JsonVector3(rot); JsonWorldScal = new JsonVector3(scal); }
public JsonWorldTransform() { JsonWorldPos = new JsonVector3(); JsonWorldRot = new JsonVector3(); JsonWorldScal = new JsonVector3(); }