Box

概述

Box 是 Aspose.3D FOSS 中用于 .NET 的类。继承自:Primitive。

Box。

此类提供 26 个方法,用于在 .NET 程序中处理 Box 对象。可用的方法包括:A3DObject、AddElement、Box、CreateElement、CreateElementUV、Entity、FindProperty、Geometry、GetBoundingBox、GetDeformers、GetElement、GetEntityRendererKey,以及另外 7 个方法。安装 Aspose.3D FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:CastShadows、ControlPoints、Deformers、Excluded、Height、HeightSegments,以及另外 12 项。

属性

名称类型访问描述
LengthSegmentsint读写获取或设置长度段。
WidthSegmentsint读写获取或设置宽度段
HeightSegmentsint读写获取或设置高度段。
Lengthdouble读写获取或设置沿 z 轴对齐的盒子长度。
Widthdouble读写获取或设置沿 x 轴对齐的 Box 的宽度。
Heightdouble读写获取或设置沿 y 轴对齐的盒子的高度。
CastShadowsbool读写获取或设置此几何体是否可以投射阴影
ReceiveShadowsbool读写获取或设置此几何体是否能够接收阴影。
Visiblebool读写获取或设置几何体是否可见
DeformersIList<Deformer>读取获取与此几何体关联的所有变形器。
ControlPointsIArrayList<Vector4>读取获取所有控制点
VertexElementsIList<VertexElement>读取获取所有顶点元素
Excludedbool读写获取或设置是否在导出期间排除此实体。
ParentNodesList<Node>读取获取所有父节点,一个实体可以附加到多个父节点以实现几何实例化
ParentNodeNode读写获取或设置第一个父节点,如果设置了第一个父节点,则该实体将从其他父节点分离。
SceneScene读取获取此对象所属的场景
Namestring读写获取或设置名称。
PropertiesPropertyCollection读取获取所有属性的集合。

方法

签名描述
Box()初始化 Box 类的新实例。
Box(length: double, width: double, height: double)初始化 Box 类的新实例。
Box(name: string, length: double, width: double, height: double, lengthSegments: int, widthSegments: int, heightSegments: int)初始化 Box 类的新实例。
ToMesh()将当前对象转换为网格
Primitive(name: string)初始化一个新的 类实例。
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)查找属性。

另请参阅

 中文