line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Geometry::Construction::DerivedPoint; |
2
|
1
|
|
|
1
|
|
1807
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
extends 'Math::Geometry::Construction::Point'; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use 5.008008; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Math::Geometry::Construction::Types qw(Derivate); |
8
|
|
|
|
|
|
|
use Carp; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
C<Math::Geometry::Construction::DerivedPoint> - point derived from other objects, e.g. intersection point |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Version 0.019 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.019'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
########################################################################### |
24
|
|
|
|
|
|
|
# # |
25
|
|
|
|
|
|
|
# Class Variables and Methods # |
26
|
|
|
|
|
|
|
# # |
27
|
|
|
|
|
|
|
########################################################################### |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our $ID_TEMPLATE = 'S%09d'; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub id_template { return $ID_TEMPLATE } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
########################################################################### |
34
|
|
|
|
|
|
|
# # |
35
|
|
|
|
|
|
|
# Accessors # |
36
|
|
|
|
|
|
|
# # |
37
|
|
|
|
|
|
|
########################################################################### |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
with 'Math::Geometry::Construction::Role::Object'; |
40
|
|
|
|
|
|
|
with 'Math::Geometry::Construction::Role::Output'; |
41
|
|
|
|
|
|
|
with 'Math::Geometry::Construction::Role::Buffering'; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'derivate' => (isa => Derivate, |
44
|
|
|
|
|
|
|
is => 'ro', |
45
|
|
|
|
|
|
|
required => 1); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has 'position_selector' => (isa => 'ArrayRef[Defined]', |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
reader => '_position_selector', |
50
|
|
|
|
|
|
|
default => sub { ['indexed_position', [0]] }, |
51
|
|
|
|
|
|
|
required => 1); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
########################################################################### |
54
|
|
|
|
|
|
|
# # |
55
|
|
|
|
|
|
|
# Retrieve Data # |
56
|
|
|
|
|
|
|
# # |
57
|
|
|
|
|
|
|
########################################################################### |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub position { |
60
|
|
|
|
|
|
|
my ($self) = @_; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
return $self->buffer('position') if($self->is_buffered('position')); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my ($selection_method, $args) = @{$self->_position_selector}; |
65
|
|
|
|
|
|
|
my $position = $self->derivate->$selection_method(@$args); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$self->buffer('position', $position) |
68
|
|
|
|
|
|
|
if($self->construction->buffer_results); |
69
|
|
|
|
|
|
|
return $position; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
########################################################################### |
73
|
|
|
|
|
|
|
# # |
74
|
|
|
|
|
|
|
# Change Data # |
75
|
|
|
|
|
|
|
# # |
76
|
|
|
|
|
|
|
########################################################################### |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=pod |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SYNOPSIS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 INTERFACE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 Public Attributes |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 Methods for Users |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 Methods for Subclass Developers |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head3 draw |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head3 id_template |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 AUTHOR |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Lutz Gehlen, C<< <perl at lutzgehlen.de> >> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Copyright 2011 Lutz Gehlen. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
114
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
115
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|