AnyCAD Rapid API 2023
Help you to create a better world!
载入中...
搜索中...
未找到
BufferShape类 参考
类 BufferShape 继承关系图:
GRepShape

Public 成员函数

 BufferShape (TopoShape shape, MaterialInstance faceMaterial, MaterialInstance edgeMaterial, double deflection)
 
PrimitiveShapeList GetFaces ()
 
PrimitiveShapeList GetEdges ()
 
boolean Build ()
 
boolean ComputeLineDistances ()
 
int GetFaceIndex (int faceTopoId)
 
void SetFaceMaterial (MaterialInstance material)
 
void SetFaceMaterial (long idx, MaterialInstance material)
 
int GetEdgeIndex (int edgeTopoId)
 
void SetEdgeMaterial (MaterialInstance material)
 
void SetEdgeMaterial (long idx, MaterialInstance material)
 
long GetFaceCount ()
 
void SetVertexColors (long faceIdx, Float32Buffer colorBuffer)
 
void ComputeBoundingBox ()
 
void Transform (Matrix4 trf)
 
Float32Array GetUV (long faceId)
 
BufferShape CloneMe ()
 
- Public 成员函数 继承自 GRepShape
AABox GetBoundingBox ()
 
void SetBoundingBox (AABox val)
 
double GetDeflection ()
 
void SetDeflection (double val)
 
boolean GetBuildVertex ()
 
void SetBuildVertex (boolean val)
 
EnumShapeFilter GetDisplayFilter ()
 
void SetDisplayFilter (EnumShapeFilter val)
 
boolean GetChildrenPickable ()
 
void SetChildrenPickable (boolean val)
 
MaterialInstance GetEdgeMaterial ()
 
MaterialInstance GetFaceMaterial ()
 
TopoShape GetShape ()
 
boolean GetReady ()
 
GRepShape Clone ()
 
boolean IsNull ()
 
boolean Build ()
 
void SetShape (TopoShape shape, boolean update)
 
void SetShape (TopoShape shape)
 
int GetFaceIndex (int faceTopoId)
 
long GetFaceCount ()
 
void SetFaceMaterial (MaterialInstance material)
 
void SetFaceMaterial (long idx, MaterialInstance material)
 
int GetEdgeIndex (int edgeTopoId)
 
long GetEdgeCount ()
 
void SetEdgeMaterial (MaterialInstance material)
 
void SetEdgeMaterial (long idx, MaterialInstance material)
 
void RequestUpdate ()
 
boolean ComputeLineDistances ()
 
void ComputeBoundingBox ()
 
void Transform (Matrix4 trf)
 
Float32Array GetUV (long faceId)
 

静态 Public 成员函数

static BufferShape Cast (GRepShape bs)
 
- 静态 Public 成员函数 继承自 GRepShape
static GRepShape Create (TopoShape shape, MaterialInstance material, MaterialInstance edgeMaterial, double deflection, boolean optimized)
 
static GRepShape Create (boolean optimized)
 

详细描述

<>
BufferShape

The bridge between BufferGeometry and SceneNode.

成员函数说明

◆ Build()

boolean BufferShape.Build ( )

triangulate the shape.

返回
true if done.

重载 GRepShape .

◆ ComputeBoundingBox()

void BufferShape.ComputeBoundingBox ( )

计算包围盒

重载 GRepShape .

◆ ComputeLineDistances()

boolean BufferShape.ComputeLineDistances ( )

为边增加距离索引数据。

返回
是否成功

重载 GRepShape .

◆ GetEdgeIndex()

int BufferShape.GetEdgeIndex ( int  edgeTopoId)

根据Edge的几何ID获取对应的显示索引

参数
edgeTopoId<br>
返回
-1没有找到

重载 GRepShape .

◆ GetFaceCount()

long BufferShape.GetFaceCount ( )

获得面的个数

返回
面的个数

重载 GRepShape .

◆ GetFaceIndex()

int BufferShape.GetFaceIndex ( int  faceTopoId)

根据Face的几何ID获取对应的显示索引

参数
faceTopoId
返回
-1没有找到

重载 GRepShape .

◆ GetUV()

Float32Array BufferShape.GetUV ( long  faceId)

获取面的UV数据

参数
faceId索引
返回
索引Buffer

重载 GRepShape .

◆ SetEdgeMaterial() [1/2]

void BufferShape.SetEdgeMaterial ( long  idx,
MaterialInstance  material 
)

设置指定边的材质

参数
idx边的索引
material材质

重载 GRepShape .

◆ SetEdgeMaterial() [2/2]

void BufferShape.SetEdgeMaterial ( MaterialInstance  material)

设置边的材质

参数
material边的材质

重载 GRepShape .

◆ SetFaceMaterial() [1/2]

void BufferShape.SetFaceMaterial ( long  idx,
MaterialInstance  material 
)

设置指定面的材质

参数
idx面的索引
material材质

重载 GRepShape .

◆ SetFaceMaterial() [2/2]

void BufferShape.SetFaceMaterial ( MaterialInstance  material)

设置面的材质

参数
material材质对象

重载 GRepShape .

◆ Transform()

void BufferShape.Transform ( Matrix4  trf)

整体偏移,修改顶点数据

参数
trf变换矩阵

重载 GRepShape .