TriMesh

TriMesh class

TriMesh는 GPU에서 직접 사용할 수 있는 원시 데이터를 포함합니다. 이 클래스는 정점당 데이터만 포함하는 메쉬를 구성하는 데 도움이 되는 유틸리티입니다.

메서드

constructor

이름설명
constructor(name, declaration)TriMesh 인스턴스를 초기화합니다

Parameters:

이름유형설명
nameString이 TriMesh의 이름
declarationVertexDeclaration버텍스 선언

Result:


getVertexDeclaration

이름설명
getVertexDeclaration()TriMesh의 버텍스 레이아웃.

Result:


getVerticesCount

이름설명
getVerticesCount()이 TriMesh의 버텍스 개수

Result:


getIndicesCount

이름설명
getIndicesCount()이 TriMesh의 인덱스 수

Result:


getUnmergedVerticesCount

이름설명
getUnmergedVerticesCount()beginVertex()와 endVertex()에 의해 전달된 병합되지 않은 정점의 수.

Result:


getCapacity

이름설명
getCapacity()미리 할당된 정점의 용량.

Result:


getVerticesSizeInBytes

이름설명
getVerticesSizeInBytes()모든 정점의 총 크기(바이트 단위)

Result:


getParentNodes

이름설명
getParentNodes()모든 부모 노드를 가져옵니다. 엔터티는 기하학 인스턴싱을 위해 여러 부모 노드에 부착될 수 있습니다.

Result:


getExcluded

이름설명
getExcluded()내보내기 중에 이 엔터티를 제외할지 여부를 가져오거나 설정합니다.

Result:


setExcluded

이름설명
setExcluded(value)내보내기 중에 이 엔터티를 제외할지 여부를 가져오거나 설정합니다.

Result:


getParentNode

이름설명
getParentNode()첫 번째 부모 노드를 가져오거나 설정합니다. 첫 번째 부모 노드를 설정하면 이 엔터티는 다른 부모 노드에서 분리됩니다. 부모 노드.

Result:


setParentNode

이름설명
setParentNode(value)첫 번째 부모 노드를 가져오거나 설정합니다. 첫 번째 부모 노드를 설정하면 이 엔터티는 다른 부모 노드에서 분리됩니다. 부모 노드.

Result:


getScene

이름설명
getScene()이 객체가 속한 씬을 가져옵니다.

Result:


getName

이름설명
getName()이름을 가져오거나 설정합니다. 이름.

Result:


setName

이름설명
setName(value)이름을 가져오거나 설정합니다. 이름.

Result:


getProperties

이름설명
getProperties()모든 속성의 컬렉션을 가져옵니다.

Result:


fromMesh

이름설명
fromMesh(declaration, mesh)주어진 메시 객체와 지정된 정점 레이아웃으로 TriMesh를 생성합니다.

Parameters:

이름유형설명
declaratioVertexDeclarationnull
mesMeshnull

Result: TriMesh


copyFrom

이름설명
copyFrom(input, vd)새 정점 레이아웃을 사용하여 입력에서 TriMesh를 복사합니다.

Parameters:

이름유형설명
inputTriMesh복사를 위한 입력 TriMesh
vdVertexDeclaration출력 TriMesh의 새로운 정점 선언

Result: TriMesh


fromMesh

이름설명
fromMesh(mesh, useFloat)주어진 메시 객체에서 TriMesh를 생성하며, 정점 선언은 입력 메시의 구조를 기반으로 합니다.

Parameters:

이름유형설명
mesMeshnull
useFloatboolean각 정점 요소 구성 요소에 대해 double 대신 float 타입을 사용합니다.

Result: TriMesh


beginVertex

이름설명
beginVertex()정점 추가 시작

Result: 정점


endVertex

이름설명
endVertex()정점 추가 종료

Result: 정점


verticesToArray

이름설명
verticesToArray()정점 데이터를 바이트 배열로 변환합니다

Result: byte[]


toString

이름설명
toString()

Result: String


fromRawData

이름설명
fromRawData(vd, vertices, indices, generateVertexMapping)원시 데이터에서 TriMesh를 생성합니다. 반환된 TriMesh는 성능을 위해 입력 바이트 배열을 복사하지 않으며, 배열에 대한 외부 변경이 이 인스턴스에 반영됩니다.

Parameters:

이름유형설명
vdVertexDeclaration정점 선언은 최소 하나의 필드를 포함해야 합니다.
verticesbyte[]입력 정점 데이터이며, 정점 배열의 최소 길이는 정점 선언 크기보다 크거나 같아야 합니다.
인덱스Number[]삼각형 인덱스
generateVertexMappingboolean생성

Result: TriMesh


loadVerticesFromBytes

이름설명
loadVerticesFromBytes(verticesInBytes)바이트에서 정점을 로드합니다. 바이트 길이는 정점 크기의 정수 배여야 합니다.

Parameters:

이름유형설명
verticesInBytebyte[]null

Result: TriMesh


readVector4

이름설명
readVector4(idx, field)vector4 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector4/FVector4 데이터 타입을 가진 필드

Result: Vector4


readFVector4

이름설명
readFVector4(idx, field)vector4 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector4/FVector4 데이터 타입을 가진 필드

Result: FVector4


readVector3

이름설명
readVector3(idx, field)vector3 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector3/FVector3 데이터 유형을 가진 필드

Result: Vector3


readFVector3

이름설명
readFVector3(idx, field)vector3 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector3/FVector3 데이터 유형을 가진 필드

Result: FVector3


readVector2

이름설명
readVector2(idx, field)vector2 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector2/FVector2 데이터 유형을 가진 필드

Result: Vector2


readFVector2

이름설명
readFVector2(idx, field)vector2 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldVector2/FVector2 데이터 유형을 가진 필드

Result: FVector2


readDouble

이름설명
readDouble(idx, field)double 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldfloat/double 호환 데이터 유형을 가진 필드

Result: 숫자


readFloat

이름설명
readFloat(idx, field)float 필드를 읽습니다

Parameters:

이름유형설명
idx숫자읽을 정점의 인덱스
fieldVertexFieldfloat/double 호환 데이터 유형을 가진 필드

Result: 숫자


getBoundingBox

이름설명
getBoundingBox()현재 엔터티의 객체 공간 좌표계에서 경계 상자를 가져옵니다.

Result: 숫자


getEntityRendererKey

이름설명
getEntityRendererKey()렌더러에 등록된 엔터티 렌더러의 키를 가져옵니다.

Result: EntityRendererKey


removeProperty

이름설명
removeProperty(property)동적 속성을 제거합니다.

Parameters:

이름유형설명
속성속성제거할 속성은 무엇입니까

Result: boolean


removeProperty

이름설명
removeProperty(property)이름으로 식별된 지정된 속성을 제거합니다.

Parameters:

이름유형설명
propertStringnull

Result: boolean


getProperty

이름설명
getProperty(property)지정된 속성의 값을 가져옵니다

Parameters:

이름유형설명
속성String속성 이름

Result: Object


setProperty

이름설명
setProperty(property, value)지정된 속성의 값을 설정합니다

Parameters:

이름유형설명
속성String속성 이름
valueObject속성의 값

Result: Object


findProperty

이름설명
findProperty(propertyName)속성을 찾습니다. 동적 속성 (Created by CreateDynamicProperty/SetProperty) 또는 네이티브 속성(Identified by its name) 일 수 있습니다

Parameters:

이름유형설명
propertyNameString속성 이름.

Result: 속성


iterator

이름설명
iterator()내부 사용을 위해 예약되었습니다.

Result: 속성