Torus
Przegląd
Torus jest klasą w Aspose.3D FOSS dla Python. Dziedziczy po: Primitive.
Parametryzowana encja torusa.
Ta klasa deklaruje 16 metod dla obiektów Torus w programach Python. Dostępne metody obejmują: __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 oraz 2 dodatkowe metody. Wszystkie publiczne członkowie są dostępne dla dowolnej aplikacji Python po zainstalowaniu pakietu Aspose.3D FOSS dla Python. Właściwości: arc, cast_shadows, control_points, deformers, excluded, name oraz 11 kolejnych.
Właściwości
| Nazwa | Typ | Dostęp | Opis |
|---|---|---|---|
radius | float | Odczyt/zapis | Pobiera lub ustawia promień torusa. |
tube | float | Odczyt/zapis | Pobiera lub ustawia promień rury. |
radial_segments | int | Odczyt/zapis | Pobiera lub ustawia segmenty promieniowe. |
tubular_segments | int | Odczyt/zapis | Pobiera lub ustawia segmenty rurowe. |
arc | float | Odczyt/zapis | Pobiera lub ustawia kąt łuku. |
cast_shadows | bool | Odczyt/zapis | Pobiera lub ustawia rzucanie cieni. |
receive_shadows | bool | Odczyt/zapis | Pobiera lub ustawia odbieranie cieni. |
visible | bool | Odczyt/zapis | Pobiera lub ustawia widoczność. |
deformers | List['Deformer'] | Odczyt | Pobiera deformatory. |
vertex_elements | List['VertexElement'] | Odczyt | Pobiera elementy wierzchołków. |
control_points | 'ArrayListAdapter[Vector4]' | Odczyt | Pobiera punkty kontrolne. |
parent_nodes | List['Node'] | Odczyt | Pobiera węzły nadrzędne. |
parent_node | Optional['Node'] | Odczyt/zapis | Pobiera lub ustawia węzeł nadrzędny. |
excluded | bool | Odczyt/zapis | Pobiera lub ustawia wykluczone. |
scene | `` | Odczyt/zapis | Pobiera lub ustawia scenę. |
name | str | Odczyt/zapis | Pobiera lub ustawia nazwę. |
properties | PropertyCollection | Odczyt | Pobiera właściwości. |
Metody
| Sygnatura | Opis |
|---|---|
__init__(name: str, radius: float, tube: float, radial_segments: int, tubular_segments: int, arc: float) | Konstruktor torusa. |
to_mesh() → 'Mesh' | Konwertuj bieżący obiekt na siatkę. |
__init__(name: str) | Calls init(name) na tej instancji torusa. |
get_deformers(deformer_type: type) → List['Deformer'] | Pobiera wszystkie deformery określonego typu lub wszystkie deformery, jeśli nie podano typu. |
create_element(element_type: 'VertexElementType', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElement' | ` tworzy niestandardowy element wierzchołka, który może być dołączony do geometrii torusa |
create_element_uv(uv_mapping: 'TextureMapping', mapping_mode: 'MappingMode', reference_mode: 'ReferenceMode') → 'VertexElementUV' | Wywołuje create_element_uv(uv_mapping, mapping_mode, reference_mode) na tej instancji Torus. |
add_element(element: 'VertexElement') | Wywołuje add_element(element) na tej instancji Torus. |
get_element(element_type: 'VertexElementType') | Wywołuje get_element(element_type) na tej instancji Torus. |
get_vertex_element_of_uv(texture_mapping: 'TextureMapping') → Optional['VertexElementUV'] | Wywołuje get_vertex_element_of_uv(texture_mapping) na tej instancji Torus. |
remove_property(property) | Wywołuje remove_property(property) na tej instancji Torus. |
remove_property(property_name: str) | Wywołuje remove_property(property_name) na tej instancji Torus. |
get_property(property: str) | Wywołuje get_property(property) na tej instancji Torus. |
set_property(property: str, value) | Ustawia wartość właściwości. |
find_property(property: str) | Wywołuje find_property(property) na tej instancji Torus. |
get_bounding_box() | Zwraca ramkę ograniczającą. |
get_entity_renderer_key() | Niezaimplementowane w edycji FOSS — rzuca wyjątek w czasie wykonywania. Zwraca klucz renderera encji. |