Cylinder

Tổng quan

Cylinder là một lớp trong Aspose.3D FOSS cho Python. Kế thừa từ: Primitive.

Cylinder.to_mesh() chuyển đổi primitive hình trụ thành một đối tượng Mesh để xử lý tiếp theo.

Lớp này khai báo 16 phương thức cho các đối tượng Cylinder 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: cast_shadows, control_points, deformers, excluded, generate_fan_cylinder, height, và còn 19 mục nữa.

Thuộc tính

TênKiểuTruy cậpMô tả
offset_bottom``Đọc/GhiLấy hoặc đặt độ lệch phía dưới.
offset_top``Đọc/GhiLấy hoặc đặt độ lệch trên.
generate_fan_cylinderboolĐọc/GhiLấy hoặc đặt giá trị của generate fan cylinder.
shear_bottom``Đọc/GhiLấy hoặc thiết lập shear bottom.
shear_top``Đọc/GhiLấy hoặc thiết lập shear top.
radius_topfloatĐọc/GhiLấy hoặc đặt bán kính trên.
radius_bottomfloatĐọc/GhiLấy hoặc đặt bán kính đáy.
heightfloatĐọc/GhiLấy hoặc đặt chiều cao.
radial_segmentsintĐọc/GhiLấy hoặc đặt các phân đoạn bán kính.
height_segmentsintĐọc/GhiLấy hoặc đặt các đoạn chiều cao.
open_endedboolĐọc/GhiLấy hoặc đặt giá trị mở.
theta_startfloatĐọc/GhiLấy hoặc đặt theta start.
theta_lengthfloatĐọc/GhiLấy hoặc đặt độ dài theta.
cast_shadowsboolĐọc/GhiLấy hoặc đặt bóng đổ.
receive_shadowsboolĐọc/GhiLấy hoặc đặt nhận bóng.
visibleboolĐọc/GhiLấy hoặc đặt giá trị hiển thị.
deformersList['Deformer']ĐọcLấy các bộ biến dạng.
vertex_elementsList['VertexElement']ĐọcLấy các phần tử đỉnh.
control_points'ArrayListAdapter[Vector4]'ĐọcLấy các điểm điều khiển.
parent_nodesList['Node']ĐọcLấy các nút cha.
parent_nodeOptional['Node']Đọc/GhiLấy hoặc đặt nút cha.
excludedboolĐọc/GhiLấy hoặc đặt giá trị bị loại trừ.
scene``Đọc/GhiLấy hoặc đặt cảnh.
namestrĐọc/GhiLấy hoặc đặt tên.
propertiesPropertyCollectionĐọcLấy các thuộc tính.

Phương thức

Chữ kýMô tả
__init__(name: str, radius_top: float, radius_bottom: float, height: float, radial_segments: int, height_segments: int, open_ended: bool, theta_start: float, theta_length: float)Calls init(name, radius_top, radius_bottom, height, radial_segments, height_segments, open_ended, theta_start, theta_length) trên đối tượng Cylinder này.
to_mesh()Chuyển đổi primitive hình trụ thành đối tượng Mesh để xử lý tiếp theo
__init__(name: str)Calls init(name) trên thể hiện Cylinder này.
get_deformers(deformer_type: type) → List['Deformer']Lấy tất cả các bộ biến dạng của loại đã chỉ định, hoặc tất cả các bộ biến dạng 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 thể hiện Cylinder 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 thể hiện Cylinder này.
add_element(element: 'VertexElement')Gọi add_element(element) trên đối tượng Cylinder này.
get_element(element_type: 'VertexElementType')Gọi get_element(element_type) trên đối tượng Cylinder này.
get_vertex_element_of_uv(texture_mapping: 'TextureMapping') → Optional['VertexElementUV']Gọi get_vertex_element_of_uv(texture_mapping) trên đối tượng Cylinder này.
remove_property(property)Gọi remove_property(property) trên đối tượng Cylinder này.
remove_property(property_name: str)Gọi remove_property(property_name) trên đối tượng Cylinder này.
get_property(property: str)Gọi get_property(property) trên đối tượng Cylinder 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 đối tượng Cylinder này.
get_bounding_box()Trả về hộp bao.
get_entity_renderer_key()Chưa được triển khai trong phiên bản FOSS — ném lỗi khi chạy. Trả về khóa trình render thực thể.

Xem thêm

 Tiếng Việt