AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
GRepShape类 参考

Public 成员函数

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)
 
void SetShapeColor (Vector3 color)
 
void ClearShapeColor ()
 
int GetFaceIndex (int faceTopoId)
 
long GetFaceCount ()
 
void SetFaceMaterial (MaterialInstance material)
 
void SetFaceMaterial (long idx, MaterialInstance material)
 
void SetFaceColor (long idx, Vector3 color)
 
void ClearFaceColor (long idx)
 
int GetEdgeIndex (int edgeTopoId)
 
long GetEdgeCount ()
 
void SetEdgeMaterial (MaterialInstance material)
 
void SetEdgeMaterial (long idx, MaterialInstance material)
 
void SetEdgeColor (long idx, Vector3 color)
 
void ClearEdgeColor (long idx)
 
void RequestUpdate ()
 
void ComputeBoundingBox ()
 
void Transform (Matrix4 trf)
 
Float32Array GetUV (long faceId)
 

静态 Public 成员函数

static GRepShape Create (TopoShape shape, MaterialInstance material, MaterialInstance edgeMaterial, double deflection, boolean optimized)
 
static GRepShape Create (boolean optimized)
 

详细描述

<> GRepShape
基于TopoShape生成显示对象,以便在引擎中显示。 创建后调用对象的Build方法进行离散。

参见
GRepIterator

成员函数说明

◆ Build()

boolean GRepShape.Build ( )

执行生成

返回
true if done.

◆ Clone()

GRepShape GRepShape.Clone ( )

复制一份,共享离散数据。

返回
新的对象

◆ ComputeBoundingBox()

void GRepShape.ComputeBoundingBox ( )

计算包围盒

◆ Create() [1/2]

static GRepShape GRepShape.Create ( boolean optimized)
static

创建空的GRep对象。

参数
optimized<br>
返回
返回GRepShape

◆ Create() [2/2]

static GRepShape GRepShape.Create ( TopoShape shape,
MaterialInstance material,
MaterialInstance edgeMaterial,
double deflection,
boolean optimized )
static

创建GRepShape实例,生成后需要调用Build来生成显示对象

参数
shape几何拓扑对象
material面材质
edgeMaterial边线材质
deflection显示精度
optimized是否需要优化显示性能。对于有多个面、边的对象,建议开启优化,简单的无需开启。

◆ GetEdgeCount()

long GRepShape.GetEdgeCount ( )

获取边的个数

返回
边的个数

◆ GetEdgeIndex()

int GRepShape.GetEdgeIndex ( int edgeTopoId)

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

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

◆ GetFaceCount()

long GRepShape.GetFaceCount ( )

获得面的个数

返回
面的个数

◆ GetFaceIndex()

int GRepShape.GetFaceIndex ( int faceTopoId)

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

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

◆ GetUV()

Float32Array GRepShape.GetUV ( long faceId)

获取面的UV数据

参数
faceId索引
返回
索引Buffer

◆ IsNull()

boolean GRepShape.IsNull ( )

是否为空

返回
true则为空

◆ RequestUpdate()

void GRepShape.RequestUpdate ( )

请求更新重新生成对象.

◆ SetEdgeColor()

void GRepShape.SetEdgeColor ( long idx,
Vector3 color )

设置边的颜色

参数
idx索引
color颜色

◆ SetEdgeMaterial() [1/2]

void GRepShape.SetEdgeMaterial ( long idx,
MaterialInstance material )

设置指定边的材质

参数
idx边的索引
material材质

◆ SetEdgeMaterial() [2/2]

void GRepShape.SetEdgeMaterial ( MaterialInstance material)

设置边的材质

参数
material边的材质

◆ SetFaceColor()

void GRepShape.SetFaceColor ( long idx,
Vector3 color )

近设置颜色

参数
idx面的索引
color颜色

◆ SetFaceMaterial() [1/2]

void GRepShape.SetFaceMaterial ( long idx,
MaterialInstance material )

设置指定面的材质

参数
idx面的索引
material材质

◆ SetFaceMaterial() [2/2]

void GRepShape.SetFaceMaterial ( MaterialInstance material)

设置面的材质

参数
material材质对象

◆ SetShape() [1/2]

void GRepShape.SetShape ( TopoShape shape)

更新TopoShape。

参数
shapethe new shape.

◆ SetShape() [2/2]

void GRepShape.SetShape ( TopoShape shape,
boolean update )

更新TopoShape。

参数
shapethe new shape.
updaterequest update.

◆ SetShapeColor()

void GRepShape.SetShapeColor ( Vector3 color)

设置整体颜色

参数
color颜色

◆ Transform()

void GRepShape.Transform ( Matrix4 trf)

整体偏移,修改顶点数据

参数
trf变换矩阵