Sphere

ภาพรวม

Sphere เป็นคลาสใน Aspose.3D FOSS สำหรับ Python. สืบทอดจาก: Primitive.

คลาสนี้ประกาศ 16 เมธอดสำหรับอ็อบเจ็กต์ Sphere ในโปรแกรม Python. เมธอดที่มีรวมถึง: __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, และเมธอดเพิ่มเติมอีก 2 รายการ. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้โดยแอปพลิเคชัน Python ใด ๆ หลังจากติดตั้งแพคเกจ Aspose.3D FOSS สำหรับ Python. คุณสมบัติ: cast_shadows, control_points, deformers, excluded, height_segments, name, และอีก 13 รายการ.

คุณสมบัติ

ชื่อประเภทการเข้าถึงคำอธิบาย
width_segmentsintอ่าน/เขียนรับหรือกำหนดเซกเมนต์ความกว้าง.
height_segmentsintอ่าน/เขียนรับหรือกำหนดส่วนความสูง.
phi_startfloatอ่าน/เขียนรับหรือกำหนดค่า phi start.
phi_lengthfloatอ่าน/เขียนรับหรือกำหนดความยาวของ phi.
theta_startfloatอ่าน/เขียนรับหรือกำหนดค่า theta start.
theta_lengthfloatอ่าน/เขียนรับหรือกำหนดความยาวของ theta.
radiusfloatอ่าน/เขียนรับหรือกำหนด radius.
cast_shadowsboolอ่าน/เขียนรับหรือกำหนดการสร้างเงา.
receive_shadowsboolอ่าน/เขียนรับหรือกำหนดการรับเงา.
visibleboolอ่าน/เขียนรับหรือกำหนดค่า visible.
deformersList['Deformer']อ่านรับค่า deformers.
vertex_elementsList['VertexElement']อ่านรับองค์ประกอบเวอร์เท็กซ์.
control_points'ArrayListAdapter[Vector4]'อ่านรับจุดควบคุม.
parent_nodesList['Node']อ่านรับโหนดแม่.
parent_nodeOptional['Node']อ่าน/เขียนรับหรือกำหนดโหนดแม่.
excludedboolอ่าน/เขียนรับหรือกำหนดค่า excluded.
scene``อ่าน/เขียนรับหรือกำหนดฉาก.
namestrอ่าน/เขียนรับหรือกำหนดชื่อ.
propertiesPropertyCollectionอ่านรับคุณสมบัติ.

วิธีการ

ลายเซ็นคำอธิบาย
__init__(name: str, radius: float, width_segments: int, height_segments: int, phi_start: float, phi_length: float, theta_start: float, theta_length: float)Calls init(name, radius, width_segments, height_segments, phi_start, phi_length, theta_start, theta_length) บนอินสแตนซ์ Sphere นี้.
to_mesh()เรียก to_mesh บนอินสแตนซ์ Sphere นี้.
__init__(name: str)Calls init(name) บนอินสแตนซ์ Sphere นี้.
get_deformers(deformer_type: type) → List['Deformer']ดึงตัวดัดรูปทั้งหมดของประเภทที่ระบุ, หรือดึงตัวดัดรูปทั้งหมดหากไม่ได้ระบุประเภท.
create_element(element_type: 'VertexElementType', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElement'เรียก create_element(element_type, mapping_mode, reference_mode) บนอินสแตนซ์ Sphere นี้.
create_element_uv(uv_mapping: 'TextureMapping', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElementUV'เรียก create_element_uv(uv_mapping, mapping_mode, reference_mode) บนอินสแตนซ์ Sphere นี้.
add_element(element: 'VertexElement')เรียก add_element(element) บนอินสแตนซ์ Sphere นี้.
get_element(element_type: 'VertexElementType')เรียก get_element(element_type) บนอินสแตนซ์ Sphere นี้.
get_vertex_element_of_uv(texture_mapping: 'TextureMapping') → Optional['VertexElementUV']เรียก get_vertex_element_of_uv(texture_mapping) บนอินสแตนซ์ Sphere นี้.
remove_property(property)เรียก remove_property(property) บนอินสแตนซ์ Sphere นี้.
remove_property(property_name: str)เรียก remove_property(property_name) บนอินสแตนซ์ Sphere นี้.
get_property(property: str)เรียก get_property(property) บนอินสแตนซ์ Sphere นี้.
set_property(property: str, value)ตั้งค่าคุณสมบัติ.
find_property(property: str)เรียก find_property(property) บนอินสแตนซ์ Sphere นี้.
get_bounding_box()คืนค่ากล่องขอบเขต.
get_entity_renderer_key()ไม่ได้ทำในรุ่น FOSS — จะโยนข้อผิดพลาดขณะทำงาน. คืนค่าคีย์ของเรนเดอร์เอนทิตี้.

ดูเพิ่มเติม

 ภาษาไทย