跳到主要内容
版本:v10.0

M3D / M3D / VertexHelper

Class: VertexHelper

M3D.VertexHelper

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new VertexHelper(): VertexHelper

Returns

VertexHelper

Properties

faceToIndexMap

Static faceToIndexMap: Map<Face, number[]>


modelToNoramlMap

Static modelToNoramlMap: Map<Model, Vector3[]>


modelToVertexMap

Static modelToVertexMap: Map<Model, Vector3[]>

Methods

clear

clear(): void

Returns

void

Description

数据清空


getFaceIndexArray

getFaceIndexArray(face): number[]

Parameters

NameType
faceFace

Returns

number[]

Description

组织面索引数据


getIndexData

getIndexData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


getModelNormalArray

getModelNormalArray(model): Vector3[]

Parameters

NameType
modelModel

Returns

Vector3[]

Description

组织模型法向数据


getModelVertexArray

getModelVertexArray(model): Vector3[]

Parameters

NameType
modelModel

Returns

Vector3[]

Description

组织模型顶点数据


getNormalData

getNormalData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


getTriangleIndexData

getTriangleIndexData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


getUVData

getUVData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


getVertexBlockData

getVertexBlockData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


getVertexData

getVertexData(scene, shape): BlockInfo

Parameters

NameType
sceneScene
shapeShape

Returns

BlockInfo


setVertexBlockData

setVertexBlockData(vertexHeader, vertexData, normalData, nvData, indexData): void

Parameters

NameType
vertexHeaderVertexHeader
vertexDataany
normalDataany
nvDataany
indexDataany

Returns

void