RectangularTorus
Tổng quan
RectangularTorus là một lớp trong Aspose.3D FOSS cho Python. Kế thừa từ: Primitive.
Thực thể torus hình chữ nhật có tham số.
Lớp này khai báo 16 phương thức cho các đối tượng RectangularTorus trong các chương trình Python. Các phương thức khả dụng bao gồm: __init__, add_element, create_element, create_element_uv, find_property, get_bounding_box, get_deformers, get_element, get_entity_renderer_key, get_property, get_vertex_element_of_uv, remove_property, và 2 phương thức bổ sung. Tất cả các thành viên công khai đều có thể truy cập bởi bất kỳ ứng dụng Python nào sau khi cài đặt gói Aspose.3D FOSS cho Python. Thuộc tính: angle_start, arc, cast_shadows, control_points, deformers, excluded, và 12 mục khác.
Thuộc tính
| Tên | Kiểu | Truy cập | Mô tả |
|---|---|---|---|
inner_radius | float | Đọc/Ghi | Lấy bán kính trong của torus hình chữ nhật. |
outer_radius | float | Đọc/Ghi | Lấy bán kính ngoài của torus hình chữ nhật. |
height | float | Đọc/Ghi | Lấy chiều cao của torus hình chữ nhật. |
arc | float | Đọc/Ghi | Lấy tổng góc của cung, được đo bằng radian. |
angle_start | float | Đọc/Ghi | Lấy góc bắt đầu của cung, đo bằng radian. |
radial_segments | int | Đọc/Ghi | Lấy các đoạn bán kính. |
cast_shadows | bool | Đọc/Ghi | Lấy hoặc đặt bóng đổ. |
receive_shadows | bool | Đọc/Ghi | Lấy hoặc đặt nhận bóng. |
visible | bool | Đọc/Ghi | Lấy hoặc đặt Visible. |
deformers | List['Deformer'] | Đọc | Lấy các bộ biến dạng. |
vertex_elements | List['VertexElement'] | Đọc | Lấy các phần tử đỉnh. |
control_points | 'ArrayListAdapter[Vector4]' | Đọc | Lấy các điểm điều khiển. |
parent_nodes | List['Node'] | Đọc | Lấy các nút cha. |
parent_node | Optional['Node'] | Đọc/Ghi | Lấy hoặc đặt nút cha. |
excluded | bool | Đọc/Ghi | Lấy hoặc đặt giá trị bị loại trừ. |
scene | `` | Đọc/Ghi | Lấy hoặc đặt cảnh. |
name | str | Đọc/Ghi | Lấy hoặc đặt tên. |
properties | PropertyCollection | Đọc | Lấy các thuộc tính. |
Phương thức
| Chữ ký | Mô tả |
|---|---|
__init__(name: str, inner_radius: float, outer_radius: float, height: float, arc: float, angle_start: float, radial_segments: int) | Constructor của RectangularTorus. |
to_mesh() → 'Mesh' | Chuyển primitive này sang mesh. |
__init__(name: str) | Calls init(name) trên đối tượng RectangularTorus này. |
get_deformers(deformer_type: type) → List['Deformer'] | Lấy tất cả các deformers của loại được chỉ định, hoặc tất cả các deformers nếu không có loại nào được chỉ định. |
create_element(element_type: 'VertexElementType', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElement' | Gọi create_element(element_type, mapping_mode, reference_mode) trên đối tượng RectangularTorus này. |
create_element_uv(uv_mapping: 'TextureMapping', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElementUV' | Gọi create_element_uv(uv_mapping, mapping_mode, reference_mode) trên đối tượng RectangularTorus này. |
add_element(element: 'VertexElement') | Gọi add_element(element) trên đối tượng RectangularTorus này. |
get_element(element_type: 'VertexElementType') | Gọi get_element(element_type) trên instance RectangularTorus này. |
get_vertex_element_of_uv(texture_mapping: 'TextureMapping') → Optional['VertexElementUV'] | Gọi get_vertex_element_of_uv(texture_mapping) trên instance RectangularTorus này. |
remove_property(property) | Gọi remove_property(property) trên instance RectangularTorus này. |
remove_property(property_name: str) | Gọi remove_property(property_name) trên instance RectangularTorus này. |
get_property(property: str) | Gọi get_property(property) trên instance RectangularTorus này. |
set_property(property: str, value) | Đặt giá trị thuộc tính. |
find_property(property: str) | Gọi find_property(property) trên instance RectangularTorus này. |
get_bounding_box() | Trả về hộp bao. |
get_entity_renderer_key() | Không được triển khai trong phiên bản FOSS — sẽ ném ra lỗi khi chạy. Trả về khóa trình diễn thực thể. |