Plane

Tổng quan

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

Lớp Plane có thể được chuyển đổi thành Mesh bằng cách gọi phương thức to_mesh() của nó, cho phép xử lý mesh tiếp theo.

Lớp này khai báo 16 phương thức cho các đối tượng Plane trong các chương trình Python. Các phương thức có sẵn 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 cộng đề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, length, length_segments, và 11 mục khác.

Thuộc tính

TênKiểuTruy cậpMô tả
upVector3Đọc/GhiLấy hoặc đặt up.
lengthfloatĐọc/GhiLấy hoặc đặt độ dài.
widthfloatĐọc/GhiLấy hoặc đặt chiều rộng.
length_segmentsintĐọc/GhiLấy hoặc đặt các đoạn độ dài.
width_segmentsintĐọc/GhiLấy hoặc đặt các phân đoạn chiều rộng.
cast_shadowsboolĐọc/GhiLấy hoặc đặt các bóng đổ.
receive_shadowsboolĐọc/GhiLấy hoặc đặt nhận bóng.
visibleboolĐọc/GhiLấy hoặc đặt thuộc tính visible.
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, length: float, width: float, length_segments: int, width_segments: int)Calls init(name, length, width, length_segments, width_segments) trên đối tượng Plane này.
to_mesh() → 'Mesh'Gọi to_mesh trên đối tượng Plane này.
__init__(name: str)Calls init(name) trên đối tượng Plane 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 thể hiện Plane 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 Plane này.
add_element(element: 'VertexElement')Gọi add_element(element) trên thể hiện Plane này.
get_element(element_type: 'VertexElementType')Gọi get_element(element_type) trên instance Plane 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 Plane này.
remove_property(property)Gọi remove_property(property) trên đối tượng Plane này.
remove_property(property_name: str)Gọi remove_property(property_name) trên đối tượng Plane này.
get_property(property: str)Gọi get_property(property) trên đối tượng Plane 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 Plane này.
get_bounding_box()Trả về bounding box.
get_entity_renderer_key()Chưa được triển khai trong phiên bản FOSS — ném lỗi tại thời gian chạy. Trả về entity renderer key.

Xem thêm

 Tiếng Việt