1 | <?php |
||
36 | final class Ring extends Entity implements RingPrimitiveIF |
||
37 | { |
||
38 | |||
39 | use MeshAttributes; |
||
40 | |||
41 | /** |
||
42 | * Set defaults |
||
43 | * |
||
44 | * {@inheritdoc} |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | 5 | public function init() |
|
58 | |||
59 | /** |
||
60 | * Radius of the inner hole of the ring. |
||
61 | * |
||
62 | * @param int|float $radiusInner |
||
63 | * @return RingPrimitiveIF |
||
64 | */ |
||
65 | 5 | public function radiusInner(float $radiusInner = 1): RingPrimitiveIF |
|
70 | |||
71 | /** |
||
72 | * Radius of the outer edge of the ring. |
||
73 | * |
||
74 | * @param int|float $radiusOuter |
||
75 | * @return RingPrimitiveIF |
||
76 | */ |
||
77 | 5 | public function radiusOuter(float $radiusOuter = 2): RingPrimitiveIF |
|
82 | |||
83 | /** |
||
84 | * Number of triangles within each face defined by segmentsTheta. |
||
85 | * |
||
86 | * @param int $segmentsPhi |
||
87 | * @return RingPrimitiveIF |
||
88 | */ |
||
89 | 5 | public function segmentsPhi(int $segmentsPhi = 8): RingPrimitiveIF |
|
94 | |||
95 | /** |
||
96 | * Number of segments. |
||
97 | * A higher number means the ring will be more round. |
||
98 | * |
||
99 | * @param int $segmentsTheta |
||
100 | * @return RingPrimitiveIF |
||
101 | */ |
||
102 | 5 | public function segmentsTheta(int $segmentsTheta = 32): RingPrimitiveIF |
|
107 | |||
108 | /** |
||
109 | * Central angle in degrees. |
||
110 | * |
||
111 | * @param int|float $thetaLength |
||
112 | * @return RingPrimitiveIF |
||
113 | */ |
||
114 | 5 | public function thetaLength(float $thetaLength = 360): RingPrimitiveIF |
|
119 | |||
120 | /** |
||
121 | * Starting angle in degrees. |
||
122 | * |
||
123 | * @param int|float $thetaStart |
||
124 | * @return RingPrimitiveIF |
||
125 | */ |
||
126 | 5 | public function thetaStart(float $thetaStart = 0): RingPrimitiveIF |
|
131 | |||
132 | } |
||
133 |