Pyramid
概述
Pyramid 是 Aspose.3D FOSS 中用于 .NET 的一个类。继承自:Primitive、INamedObject、IMeshConvertible。
参数化金字塔。
此类提供 27 个方法,用于在 .NET 程序中处理 Pyramid 对象。可用方法包括:A3DObject、AddElement、CreateElement、CreateElementUV、Entity、FindProperty、Geometry、GetBoundingBox、GetDeformers、GetElement、GetEntityRendererKey、GetProperty,以及另外 7 个方法。安装 Aspose.3D FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:BottomArea、BottomOffset、CastShadows、ControlPoints、Deformers、Excluded,以及另外 10 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
BottomArea | Vector2 | 读写 | 底部盖的面积 |
TopArea | Vector2 | 读写 | 顶部盖的面积 |
BottomOffset | Vector3 | 读写 | 底部顶点的偏移 |
Height | double | 读写 | 金字塔的高度 |
CastShadows | bool | 读写 | 获取或设置此几何体是否可以投射阴影 |
ReceiveShadows | bool | 读写 | 获取或设置此几何体是否可以接收阴影。 |
Visible | bool | 读写 | 获取或设置几何体是否可见 |
Deformers | IList<Deformer> | 读取 | 获取与此几何体关联的所有变形器。 |
ControlPoints | IArrayList<Vector4> | 读取 | 获取所有控制点 |
VertexElements | IList<VertexElement> | 读取 | 获取所有顶点元素 |
Excluded | bool | 读写 | 获取或设置在导出时是否排除此实体。 |
ParentNodes | List<Node> | 读取 | 获取所有父节点,实体可以附加到多个父节点以进行几何实例化 |
ParentNode | Node | 读写 | 获取或设置第一个父节点,如果设置了第一个父节点,则此实体将从其他父节点分离。 |
Scene | Scene | 读取 | 获取此对象所属的场景 |
Name | string | 读写 | 获取或设置名称。 |
Properties | PropertyCollection | 读取 | 获取所有属性的集合。 |
方法
| 签名 | 描述 |
|---|---|
Pyramid() | 使用默认底面积(10, 10)和默认高度(5)构造一个新的金字塔实例 |
Pyramid(xbottom: double, ybottom: double, height: double) | 使用指定的底面积构造一个新的金字塔实例 |
Pyramid(xbottom: double, ybottom: double, xtop: double, ytop: double, height: double) | 使用指定的底面积、顶面积和高度构造一个新的金字塔实例。 |
Pyramid(name: string, xbottom: double, ybottom: double, xtop: double, ytop: double, height: double) | 使用指定的底面积、顶面积和高度构造一个新的金字塔实例。 |
ToMesh() | 将当前对象转换为网格 |
Primitive(name: string) | 初始化一个新的 class 实例。 |
Geometry(name: string) | 初始化 Geometry 类的一个新实例。 |
GetDeformers() | 获取所有变形器 |
GetElement(type: VertexElementType) | 获取具有指定类型的顶点元素 |
GetVertexElementOfUV(textureMapping: TextureMapping) | 获取具有给定纹理映射类型的 VertexElementUV 实例 |
CreateElement(type: VertexElementType) | 创建具有指定类型的顶点元素并将其添加到几何体中。 |
AddElement(element: VertexElement) | 将现有的顶点元素添加到当前几何体中 |
CreateElement(type: VertexElementType, mappingMode: MappingMode, referenceMode: ReferenceMode) | 创建一个具有指定类型的顶点元素并将其添加到几何体中。 |
CreateElementUV(uvMapping: TextureMapping) | 创建一个 VertexElementUV,使用给定的纹理映射类型。 |
CreateElementUV(uvMapping: TextureMapping, mappingMode: MappingMode, referenceMode: ReferenceMode) | 创建一个具有给定纹理映射类型的VertexElementUV。 |
Entity(name: string) | 初始化 Entity 类的新实例。 |
GetBoundingBox() | 获取当前实体在其对象空间坐标系中的包围盒。 |
GetEntityRendererKey() | 获取已在渲染器中注册的实体渲染器的键。 |
SceneObject(name: string) | 使用默认名称初始化一个 SceneObject |
SceneObject() | 初始化一个 SceneObject。 |
A3DObject() | 初始化 A3DObject 类的一个新实例,未指定名称。 |
A3DObject(name: string) | 初始化 A3DObject 类的一个新实例。 |
RemoveProperty(property: Property) | 移除动态属性。 |
RemoveProperty(property: string) | 移除通过名称标识的指定属性。 |
GetProperty(property: string) | 获取指定属性的值 |
SetProperty(property: string, value: object?) | 设置指定属性的值 |
FindProperty(propertyName: string) | 查找属性。 |