// Magica Cloth.
// Copyright (c) MagicaSoft, 2020-2022.
// https://magicasoft.jp
namespace MagicaCloth
{
///
/// FixedChunkNativeList / FixedMultiNativeListで使用するチャンク情報
///
public struct ChunkData
{
public int chunkNo;
///
/// データ配列のこのチャンクの開始インデックス
///
public int startIndex;
///
/// データ数
///
public int dataLength;
///
/// データ数内の使用されているローカルインデックス
/// (FixedMultiNativeListで使用)
///
public int useLength;
public void Clear()
{
chunkNo = 0;
startIndex = 0;
dataLength = 0;
useLength = 0;
}
public bool IsValid()
{
return dataLength > 0;
}
public override string ToString()
{
string str = string.Empty;
str += "[chunkNo=" + chunkNo + ",startIndex=" + startIndex + ",dataLength=" + dataLength + ",useLength=" + useLength + "\n";
return str;
}
}
}