line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Geometry::Construction::Derivate::TranslatedPoint; |
2
|
1
|
|
|
1
|
|
1976
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
extends 'Math::Geometry::Construction::Derivate'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use 5.008008; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Math::Geometry::Construction::Types qw(Vector Point); |
8
|
|
|
|
|
|
|
use Carp; |
9
|
|
|
|
|
|
|
use Math::Vector::Real; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
C<Math::Geometry::Construction::Derivate::TranslatedPoint> - point translated by a given vector |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Version 0.024 |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.024'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
########################################################################### |
25
|
|
|
|
|
|
|
# # |
26
|
|
|
|
|
|
|
# Accessors # |
27
|
|
|
|
|
|
|
# # |
28
|
|
|
|
|
|
|
########################################################################### |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
with 'Math::Geometry::Construction::Role::Buffering'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has 'input' => (isa => Point, |
33
|
|
|
|
|
|
|
coerce => 1, |
34
|
|
|
|
|
|
|
is => 'ro', |
35
|
|
|
|
|
|
|
required => 1); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'translator' => (isa => Vector, |
38
|
|
|
|
|
|
|
coerce => 1, |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
required => 1, |
41
|
|
|
|
|
|
|
trigger => \&clear_global_buffer); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
########################################################################### |
44
|
|
|
|
|
|
|
# # |
45
|
|
|
|
|
|
|
# Retrieve Data # |
46
|
|
|
|
|
|
|
# # |
47
|
|
|
|
|
|
|
########################################################################### |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub calculate_positions { |
50
|
|
|
|
|
|
|
my ($self) = @_; |
51
|
|
|
|
|
|
|
my $reference = $self->input; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $position = $reference->position; |
54
|
|
|
|
|
|
|
return if(!$position); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
return($position + $self->translator->value); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
########################################################################### |
60
|
|
|
|
|
|
|
# # |
61
|
|
|
|
|
|
|
# Change Data # |
62
|
|
|
|
|
|
|
# # |
63
|
|
|
|
|
|
|
########################################################################### |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=pod |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SYNOPSIS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 INTERFACE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 Public Attributes |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 Methods for Users |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 Methods for Subclass Developers |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Lutz Gehlen, C<< <perl at lutzgehlen.de> >> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Copyright 2011, 2013 Lutz Gehlen. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
97
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
98
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|