FindOverlappingItems
Overloads
| Name | Description |
|---|---|
| FindOverlappingItems(bool updateData) | 겹쳐진 노트 검색 |
| FindOverlappingItems(bool updateData, List<int> includedNote, List<int> excludedNote) | 겹쳐진 노트 검색 |
FindOverlappingItems(bool updateData)
public bool FindOverlappingItems(bool updateData)
겹쳐진 노트 검색
Parameters
| Name | Type | Description |
|---|---|---|
| updateData | bool | 가시화 정보 갱신 |
Returns
| Type | Description |
|---|---|
| bool | 겹쳐진 노트 검색 결과 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
if (vizcore3d.Model.IsOpen() == false) return;
if (vizcore3d.Review.Note.Items.Count == 0) return;
// 겹쳐진 노트 항목 검색
bool result = vizcore3d.Review.Note.FindOverlappingItems(true);
// 겹쳐진 노트 항목이 없음
if (result == false)
{
foreach (VIZCore3D.NET.Data.NoteItem item in vizcore3d.Review.Note.Items)
{
VIZCore3D.NET.Data.NoteStyle style = vizcore3d.Review.Note.GetStyle(item.ID);
style.BackgroundColor = Color.Yellow;
vizcore3d.Review.Note.SetStyle(item.ID, style);
}
return;
}
vizcore3d.BeginUpdate();
foreach (VIZCore3D.NET.Data.NoteItem item in vizcore3d.Review.Note.Items)
{
VIZCore3D.NET.Data.NoteStyle style = vizcore3d.Review.Note.GetStyle(item.ID);
// 현재 노트와 겹쳐진 노트가 없음
if (item.OverlappingItems.Count == 0)
{
style.BackgroundColor = Color.Yellow;
}
// 현재 노트와 겹쳐진 노트가 있음
else
{
// 겹쳐진 노트의 아이디가 현재보다 클 경우,
// 나중에 생성된 노트이고,
// 현재 노트보다 위에 그려짐.
if (item.ID < item.OverlappingItems[0])
{
style.BackgroundColor = Color.Red;
}
else
{
style.BackgroundColor = Color.White;
}
}
vizcore3d.Review.Note.SetStyle(item.ID, style);
}
vizcore3d.EndUpdate();
}
FindOverlappingItems(bool updateData, List<int> includedNote, List<int> excludedNote)
public bool FindOverlappingItems(bool updateData, List<int> includedNote, List<int> excludedNote)
겹쳐진 노트 검색
Parameters
| Name | Type | Description |
|---|---|---|
| updateData | bool | 가시화 정보 갱신 |
| includedNote | List<int> | 검사 포함 노트 아이디 목록. NULL 일 경우, 전체 노트를 포함하여 검색. NULL이 아닐 경우, 지정된 노트만 포함 검사 |
| excludedNote | List<int> | 검사 제외 노트 아디디 목록. NULL 일 경우, 전체 노트를 포함하여 검색. NULL이 아닐 경우, 지정된 노트만 제외 검사 |
Returns
| Type | Description |
|---|---|
| bool | 겹쳐진 노트 검색 결과 |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
if (vizcore3d.Model.IsOpen() == false) return;
if (vizcore3d.Review.Note.Items.Count == 0) return;
List<int> excludedNote = new List<int>();
excludedNote.Add(4);
excludedNote.Add(5);
// 겹쳐진 노트 항목 검색
bool result = vizcore3d.Review.Note.FindOverlappingItems(true, null, excludedNote);
// 겹쳐진 노트 항목이 없음
if (result == false)
{
foreach (VIZCore3D.NET.Data.NoteItem item in vizcore3d.Review.Note.Items)
{
VIZCore3D.NET.Data.NoteStyle style = vizcore3d.Review.Note.GetStyle(item.ID);
style.BackgroundColor = Color.Yellow;
vizcore3d.Review.Note.SetStyle(item.ID, style);
}
return;
}
vizcore3d.BeginUpdate();
foreach (VIZCore3D.NET.Data.NoteItem item in vizcore3d.Review.Note.Items)
{
VIZCore3D.NET.Data.NoteStyle style = vizcore3d.Review.Note.GetStyle(item.ID);
// 현재 노트와 겹쳐진 노트가 없음
if (item.OverlappingItems.Count == 0)
{
style.BackgroundColor = Color.Yellow;
}
// 현재 노트와 겹쳐진 노트가 있음
else
{
// 겹쳐진 노트의 아이디가 현재보다 클 경우,
// 나중에 생성된 노트이고,
// 현재 노트보다 위에 그려짐.
if (item.ID < item.OverlappingItems[0])
{
style.BackgroundColor = Color.Red;
}
else
{
style.BackgroundColor = Color.White;
}
}
vizcore3d.Review.Note.SetStyle(item.ID, style);
}
vizcore3d.EndUpdate();
}