1 | <?php |
||
26 | class TorusKnotMethods |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * The torus knot primitive defines a pretzel shape, the particular shape of which is defined by a pair of coprime integers, |
||
31 | * p and q. |
||
32 | * If p and q are not coprime the result will be a torus link. |
||
33 | */ |
||
34 | const DEFAULTS = array( |
||
35 | /* Radius that contains the torus knot. */ |
||
36 | 'radius' => 1, |
||
37 | /* Radius of the tubes of the torus knot. */ |
||
38 | 'radiusTubular' => 0.2, |
||
39 | /* Number of segments along the circumference of the tube ends. A higher number means the tube will be more round. */ |
||
40 | 'segmentsRadial' => 36, |
||
41 | /* Number of segments along the circumference of the tube face. A higher number means the tube will be more round. */ |
||
42 | 'segmentsTubular' => 32, |
||
43 | /* Number that helps define the pretzel shape. */ |
||
44 | 'p' => 2, |
||
45 | /* Number that helps define the pretzel shape. */ |
||
46 | 'q' => 3 |
||
47 | ); |
||
48 | |||
49 | /** |
||
50 | * Radius that contains the torus knot. |
||
51 | * |
||
52 | * @param &array $dom_attributes |
||
|
|||
53 | * @param float|int $radius |
||
54 | * @return void |
||
55 | */ |
||
56 | 1 | public function radius(array &$dom_attributes, float $radius) |
|
60 | |||
61 | /** |
||
62 | * Radius of the tubes of the torus knot. |
||
63 | * |
||
64 | * @param &array $dom_attributes |
||
65 | * @param float|int $radiusTubular |
||
66 | * @return void |
||
67 | */ |
||
68 | 1 | public function radiusTubular(array &$dom_attributes, float $radiusTubular) |
|
72 | |||
73 | /** |
||
74 | * Number of segments along the circumference of the tube ends. |
||
75 | * A higher number means the tube will be more round. |
||
76 | * |
||
77 | * @param &array $dom_attributes |
||
78 | * @param int $segmentsRadial |
||
79 | * @return void |
||
80 | */ |
||
81 | 1 | public function segmentsRadial(array &$dom_attributes, int $segmentsRadial) |
|
85 | |||
86 | /** |
||
87 | * Number of segments along the circumference of the tube face. |
||
88 | * A higher number means the tube will be more round. |
||
89 | * |
||
90 | * @param &array $dom_attributes |
||
91 | * @param int $segmentsTubular |
||
92 | * @return void |
||
93 | */ |
||
94 | 1 | public function segmentsTubular(array &$dom_attributes, int $segmentsTubular) |
|
98 | |||
99 | /** |
||
100 | * Number that helps define the pretzel shape. |
||
101 | * |
||
102 | * @param &array $dom_attributes |
||
103 | * @param int $p |
||
104 | * @return void |
||
105 | */ |
||
106 | 1 | public function p(array &$dom_attributes, int $p) |
|
110 | |||
111 | /** |
||
112 | * Number that helps define the pretzel shape. |
||
113 | * |
||
114 | * @param &array $dom_attributes |
||
115 | * @param int $q |
||
116 | * @return void |
||
117 | */ |
||
118 | 1 | public function q(array &$dom_attributes, int $q) |
|
122 | } |
||
123 |
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.