|
AnyCAD Rapid API 2024
Help you to create a better world!
|
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) |
| Vector3 | GetColor () |
| void | SetColor (Vector3 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 | SetFaceVisible (long idx, boolean visible) |
| boolean | GetFaceVisible (long idx) |
| void | SetFaceMaterial (MaterialInstance material) |
| void | SetFacesMaterial (MaterialInstance material) |
| void | SetFaceMaterial (long idx, MaterialInstance material) |
| void | SetFaceMaterialByIndex (long idx, MaterialInstance material) |
| void | SetFaceColor (long idx, Vector3 color) |
| Vector3 | GetFaceColor (long idx) |
| void | ClearFaceColor (long idx) |
| int | GetEdgeIndex (int edgeTopoId) |
| long | GetEdgeCount () |
| void | SetEdgeVisible (long idx, boolean visible) |
| boolean | GetEdgeVisible (long idx) |
| void | SetEdgeMaterial (MaterialInstance material) |
| void | SetEdgesMaterial (MaterialInstance material) |
| void | SetEdgeMaterial (long idx, MaterialInstance material) |
| void | SetEdgeMaterialByIndex (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 | CreateEmpty (boolean optimized) |
<> GRepShape
基于TopoShape生成显示对象,以便在引擎中显示。 创建后调用对象的Build方法进行离散。
| boolean GRepShape.Build | ( | ) |
执行生成
| GRepShape GRepShape.Clone | ( | ) |
复制一份,共享离散数据。
| void GRepShape.ComputeBoundingBox | ( | ) |
计算包围盒
|
static |
创建GRepShape实例,生成后需要调用Build来生成显示对象
| shape | 几何拓扑对象 |
| material | 面材质 |
| edgeMaterial | 边线材质 |
| deflection | 显示精度 |
| optimized | 是否需要优化显示性能。对于有多个面、边的对象,建议开启优化,简单的无需开启。 |
|
static |
创建空的GRep对象。
| optimized<br> |
| long GRepShape.GetEdgeCount | ( | ) |
获取边的个数
| int GRepShape.GetEdgeIndex | ( | int | edgeTopoId | ) |
根据Edge的几何ID获取对应的显示索引
| edgeTopoId<br> |
| boolean GRepShape.GetEdgeVisible | ( | long | idx | ) |
判断边是否可见
| idx | 边的索引 |
| long GRepShape.GetFaceCount | ( | ) |
获得面的个数
| int GRepShape.GetFaceIndex | ( | int | faceTopoId | ) |
根据Face的几何ID获取对应的显示索引
| faceTopoId<br> |
| boolean GRepShape.GetFaceVisible | ( | long | idx | ) |
判断面是否可见
| idx | 面的索引 |
| Float32Array GRepShape.GetUV | ( | long | faceId | ) |
获取面的UV数据
| faceId | 索引 |
| boolean GRepShape.IsNull | ( | ) |
是否为空
| void GRepShape.RequestUpdate | ( | ) |
请求更新重新生成对象.
| void GRepShape.SetEdgeColor | ( | long | idx, |
| Vector3 | color ) |
设置边的颜色
| idx | 索引 |
| color | 颜色 |
| void GRepShape.SetEdgeMaterial | ( | long | idx, |
| MaterialInstance | material ) |
设置指定边的材质
| idx | 边的索引 |
| material | 材质 |
| void GRepShape.SetEdgeMaterial | ( | MaterialInstance | material | ) |
设置边的材质
| material | 边的材质 |
| void GRepShape.SetEdgeVisible | ( | long | idx, |
| boolean | visible ) |
设置某个边的可见性
| idx | 边的索引 |
| visible | 是否可见 |
| void GRepShape.SetFaceColor | ( | long | idx, |
| Vector3 | color ) |
近设置颜色
| idx | 面的索引 |
| color | 颜色 |
| void GRepShape.SetFaceMaterial | ( | long | idx, |
| MaterialInstance | material ) |
设置指定面的材质
| idx | 面的索引 |
| material | 材质 |
| void GRepShape.SetFaceMaterial | ( | MaterialInstance | material | ) |
设置面的材质
| material | 材质对象 |
| void GRepShape.SetFaceVisible | ( | long | idx, |
| boolean | visible ) |
设置某个面的可见性
| idx | 面的索引 |
| visible | 是否可见 |
| void GRepShape.SetShape | ( | TopoShape | shape | ) |
更新TopoShape。
| shape | the new shape. |
| void GRepShape.SetShape | ( | TopoShape | shape, |
| boolean | update ) |
更新TopoShape。
| shape | the new shape. |
| update | request update. |
| void GRepShape.SetShapeColor | ( | Vector3 | color | ) |
设置整体颜色
| color | 颜色 |
| void GRepShape.Transform | ( | Matrix4 | trf | ) |
整体偏移,修改顶点数据
| trf | 变换矩阵 |