본문으로 건너뛰기

GetCorrectionTerms

Overloads​

NameDescription
GetCorrectionTerms(int id)노트에 지정된 보정 성분 반환.
GetCorrectionTerms(NoteItem note)노트에 지정된 보정 성분 반환.

GetCorrectionTerms(int id)​

public List<CorrectionTerm> GetCorrectionTerms(int id)

노트에 지정된 보정 성분 반환.

Remarks​

지정된 적이 없으면 빈 목록 반환. 지정한 방향 벡터는 입력값 그대로 반환됨(단위화는 계산 시점에만 적용).

Parameters​

NameTypeDescription
idint대상 노트 아이디(ID)

Returns​

TypeDescription
List<CorrectionTerm>보정 성분 목록

Examples​

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example(int id)
{
List<VIZCore3D.NET.Data.CorrectionTerm> terms = vizcore3d.Review.Note.GetCorrectionTerms(id);

// 목록이 비어 있으면 보정 성분이 지정된 적이 없다는 뜻(좌표 표기 노트여도 성분은 없을 수 있음).
if (terms.Count == 0) return;

// 지정한 값이 그대로 돌아오므로 편집 UI 의 입력값 복원에 쓸 수 있음.
foreach (VIZCore3D.NET.Data.CorrectionTerm term in terms)
{
float value = term.Value;
VIZCore3D.NET.Data.Vector3D direction = term.Direction;
}

// 성분들을 합친 최종 이동량. 각 방향은 단위 벡터로 정규화된 뒤 합산됨.
VIZCore3D.NET.Data.Vector3D offset = VIZCore3D.NET.Data.CorrectionTerm.GetOffset(terms);
}

GetCorrectionTerms(NoteItem note)​

public List&lt;CorrectionTerm&gt; GetCorrectionTerms(NoteItem note)

노트에 지정된 보정 성분 반환.

Remarks​

지정된 적이 없으면 빈 목록 반환. 지정한 방향 벡터는 입력값 그대로 반환됨(단위화는 계산 시점에만 적용).

Parameters​

NameTypeDescription
noteNoteItem대상 노트

Returns​

TypeDescription
List<CorrectionTerm>보정 성분 목록

Examples​

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
// 전제조건 — 노트가 하나 이상 있어야 함.
List<VIZCore3D.NET.Data.NoteItem> notes = vizcore3d.Review.Note.GetNoteItems();
if (notes.Count == 0) return;

// 보정이 지정된 노트만 골라낸다.
List<VIZCore3D.NET.Data.NoteItem> withTerms = new List<VIZCore3D.NET.Data.NoteItem>();

foreach (VIZCore3D.NET.Data.NoteItem note in notes)
{
if (vizcore3d.Review.Note.GetCorrectionTerms(note).Count == 0) continue;

withTerms.Add(note);
}
}