public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) { if (chunk.Has(PostRotationEulerXYZType)) { if (!chunk.DidChange(PostRotationEulerXYZType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerXYZs = chunk.GetNativeArray(PostRotationEulerXYZType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerXYZ(chunkPostRotationEulerXYZs[i].Value) }; } } else if (chunk.Has(PostRotationEulerXZYType)) { if (!chunk.DidChange(PostRotationEulerXZYType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerXZYs = chunk.GetNativeArray(PostRotationEulerXZYType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerXZY(chunkPostRotationEulerXZYs[i].Value) }; } } else if (chunk.Has(PostRotationEulerYXZType)) { if (!chunk.DidChange(PostRotationEulerYXZType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerYXZs = chunk.GetNativeArray(PostRotationEulerYXZType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerYXZ(chunkPostRotationEulerYXZs[i].Value) }; } } else if (chunk.Has(PostRotationEulerYZXType)) { if (!chunk.DidChange(PostRotationEulerYZXType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerYZXs = chunk.GetNativeArray(PostRotationEulerYZXType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerYZX(chunkPostRotationEulerYZXs[i].Value) }; } } else if (chunk.Has(PostRotationEulerZXYType)) { if (!chunk.DidChange(PostRotationEulerZXYType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerZXYs = chunk.GetNativeArray(PostRotationEulerZXYType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerZXY(chunkPostRotationEulerZXYs[i].Value) }; } } else if (chunk.Has(PostRotationEulerZYXType)) { if (!chunk.DidChange(PostRotationEulerZYXType, LastSystemVersion)) { return; } var chunkRotations = chunk.GetNativeArray(PostRotationType); var chunkPostRotationEulerZYXs = chunk.GetNativeArray(PostRotationEulerZYXType); for (var i = 0; i < chunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerZYX(chunkPostRotationEulerZYXs[i].Value) }; } } }
public void Execute(ArchetypeChunk batchInChunk, int batchIndex) { if (batchInChunk.Has(PostRotationEulerXyzTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerXyzTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerXYZs = batchInChunk.GetNativeArray(PostRotationEulerXyzTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerXYZ(chunkPostRotationEulerXYZs[i].Value) }; } } else if (batchInChunk.Has(PostRotationEulerXzyTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerXzyTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerXZYs = batchInChunk.GetNativeArray(PostRotationEulerXzyTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerXZY(chunkPostRotationEulerXZYs[i].Value) }; } } else if (batchInChunk.Has(PostRotationEulerYxzTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerYxzTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerYXZs = batchInChunk.GetNativeArray(PostRotationEulerYxzTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerYXZ(chunkPostRotationEulerYXZs[i].Value) }; } } else if (batchInChunk.Has(PostRotationEulerYzxTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerYzxTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerYZXs = batchInChunk.GetNativeArray(PostRotationEulerYzxTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerYZX(chunkPostRotationEulerYZXs[i].Value) }; } } else if (batchInChunk.Has(PostRotationEulerZxyTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerZxyTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerZXYs = batchInChunk.GetNativeArray(PostRotationEulerZxyTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerZXY(chunkPostRotationEulerZXYs[i].Value) }; } } else if (batchInChunk.Has(PostRotationEulerZyxTypeHandle)) { if (!batchInChunk.DidChange(PostRotationEulerZyxTypeHandle, LastSystemVersion)) { return; } var chunkRotations = batchInChunk.GetNativeArray(PostRotationTypeHandle); var chunkPostRotationEulerZYXs = batchInChunk.GetNativeArray(PostRotationEulerZyxTypeHandle); for (var i = 0; i < batchInChunk.Count; i++) { chunkRotations[i] = new PostRotation { Value = quaternion.EulerZYX(chunkPostRotationEulerZYXs[i].Value) }; } } }