1 | <?php |
||
36 | final class Torus extends Entity implements TorusPrimitiveIF |
||
37 | { |
||
38 | |||
39 | use MeshAttributes; |
||
40 | |||
41 | /** |
||
42 | * Init <a-sphere> |
||
43 | * |
||
44 | * The sphere primitive creates a spherical or polyhedron shapes. |
||
45 | * It wraps an entity that prescribes the geometry component with its geometric primitive set to sphere. |
||
46 | * |
||
47 | * {@inheritdoc} |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | 5 | public function init() |
|
63 | |||
64 | /** |
||
65 | * Radius of the outer edge of the torus. |
||
66 | * |
||
67 | * @param int|float $radius |
||
68 | * @return TorusPrimitiveIF |
||
69 | */ |
||
70 | 5 | public function radius(float $radius = 1): TorusPrimitiveIF |
|
75 | |||
76 | /** |
||
77 | * Radius of the tube. |
||
78 | * |
||
79 | * @param double $radiusTubular |
||
80 | * @return TorusPrimitiveIF |
||
81 | */ |
||
82 | 5 | public function radiusTubular(float $radiusTubular = 0.2): TorusPrimitiveIF |
|
87 | |||
88 | /** |
||
89 | * Number of segments along the circumference of the tube ends. |
||
90 | * A higher number means the tube will be more round. |
||
91 | * |
||
92 | * @param int $segmentsRadial |
||
93 | * @return TorusPrimitiveIF |
||
94 | */ |
||
95 | 5 | public function segmentsRadial(int $segmentsRadial = 36): TorusPrimitiveIF |
|
100 | |||
101 | /** |
||
102 | * Number of segments along the circumference of the tube face. |
||
103 | * A higher number means the tube will be more round. |
||
104 | * |
||
105 | * @param int $segmentsTubular |
||
106 | * @return TorusPrimitiveIF |
||
107 | */ |
||
108 | 5 | public function segmentsTubular(int $segmentsTubular = 8): TorusPrimitiveIF |
|
113 | |||
114 | /** |
||
115 | * Central angle. |
||
116 | * |
||
117 | * @param int|float $arc |
||
118 | * @return TorusPrimitiveIF |
||
119 | */ |
||
120 | 5 | public function arc(float $arc = 360): TorusPrimitiveIF |
|
125 | } |
||
126 |