1 | <?php |
||
26 | class TorusMethods |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * The torus primitive defines a donut shape. |
||
31 | */ |
||
32 | const DEFAULTS = array( |
||
33 | /* Radius of the outer edge of the torus. */ |
||
34 | 'radius' => 1, |
||
35 | /* Radius of the tube. */ |
||
36 | 'radiusTubular' => 0.2, |
||
37 | /* Number of segments along the circumference of the tube ends. A higher number means the tube will be more round. */ |
||
38 | 'segmentsRadial' => 36, |
||
39 | /* Number of segments along the circumference of the tube face. A higher number means the tube will be more round. */ |
||
40 | 'segmentsTubular' => 32, |
||
41 | /* Central angle. */ |
||
42 | 'arc' => 360 |
||
43 | ); |
||
44 | |||
45 | /** |
||
46 | * Radius of the outer edge of the torus. |
||
47 | * |
||
48 | * @param &array $dom_attributes |
||
|
|||
49 | * @param float|int $radius |
||
50 | * @return void |
||
51 | */ |
||
52 | 1 | public function radius(array &$dom_attributes, float $radius) |
|
56 | |||
57 | /** |
||
58 | * Radius of the tube. |
||
59 | * |
||
60 | * @param &array $dom_attributes |
||
61 | * @param float|int $radiusTubular |
||
62 | * @return void |
||
63 | */ |
||
64 | 1 | public function radiusTubular(array &$dom_attributes, float $radiusTubular) |
|
68 | |||
69 | /** |
||
70 | * Number of segments along the circumference of the tube ends. |
||
71 | * A higher number means the tube will be more round. |
||
72 | * |
||
73 | * @param &array $dom_attributes |
||
74 | * @param int $segmentsRadial |
||
75 | * @return void |
||
76 | */ |
||
77 | 1 | public function segmentsRadial(array &$dom_attributes, int $segmentsRadial) |
|
81 | |||
82 | /** |
||
83 | * Number of segments along the circumference of the tube face. |
||
84 | * A higher number means the tube will be more round. |
||
85 | * |
||
86 | * @param &array $dom_attributes |
||
87 | * @param int $segmentsTubular |
||
88 | * @return void |
||
89 | */ |
||
90 | 1 | public function segmentsTubular(array &$dom_attributes, int $segmentsTubular) |
|
94 | |||
95 | /** |
||
96 | * Central angle. |
||
97 | * |
||
98 | * @param &array $dom_attributes |
||
99 | * @param float|int $radiusTubular |
||
100 | * @return void |
||
101 | */ |
||
102 | 1 | public function arc(array &$dom_attributes, float $arc) |
|
106 | } |
||
107 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.