TorusMethods   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 3 Features 0
Metric Value
wmc 5
c 5
b 3
f 0
lcom 0
cbo 0
dl 0
loc 64
ccs 15
cts 15
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A radius() 0 4 1
A radiusTubular() 0 4 1
A segmentsRadial() 0 4 1
A segmentsTubular() 0 4 1
A arc() 0 4 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 27, 2016 - 5:59:08 AM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 * 
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 * 
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         TorusMethods.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 * @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Core\Components\Geometry\Methods;
25
26
class TorusMethods
27
{
28
    /**
29
     * Radius of the outer edge of the torus.
30
     *
31
     * @param array $dom_attributes            
32
     * @param double $radius            
33
     * @return void
34
     */
35 3
    public function radius(array &$dom_attributes, float $radius)
36
    {
37 3
        $dom_attributes['radius'] = $radius;
38 3
    }
39
40
    /**
41
     * Radius of the tube.
42
     *
43
     * @param array $dom_attributes            
44
     * @param double $radiusTubular            
45
     * @return void
46
     */
47 3
    public function radiusTubular(array &$dom_attributes, float $radiusTubular)
48
    {
49 3
        $dom_attributes['radiusTubular'] = $radiusTubular;
50 3
    }
51
52
    /**
53
     * Number of segments along the circumference of the tube ends.
54
     * A higher number means the tube will be more round.
55
     *
56
     * @param array $dom_attributes            
57
     * @param int $segmentsRadial            
58
     * @return void
59
     */
60 3
    public function segmentsRadial(array &$dom_attributes, int $segmentsRadial)
61
    {
62 3
        $dom_attributes['segmentsRadial'] = $segmentsRadial;
63 3
    }
64
65
    /**
66
     * Number of segments along the circumference of the tube face.
67
     * A higher number means the tube will be more round.
68
     *
69
     * @param array $dom_attributes            
70
     * @param int $segmentsTubular            
71
     * @return void
72
     */
73 3
    public function segmentsTubular(array &$dom_attributes, int $segmentsTubular)
74
    {
75 3
        $dom_attributes['segmentsTubular'] = $segmentsTubular;
76 3
    }
77
78
    /**
79
     * Central angle.
80
     *
81
     * @param array $dom_attributes            
82
     * @param double $arc            
83
     * @return void
84
     */
85 3
    public function arc(array &$dom_attributes, float $arc)
86
    {
87 3
        $dom_attributes['arc'] = $arc;
88 3
    }
89
}
90