| 1 | package Math::Geometry::Construction::Derivate::TranslatedPoint; | ||||||||||
| 2 | 9 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 9 | extends 'Math::Geometry::Construction::Derivate'; | |||||||||
| 4 | |||||||||||
| 5 | 9 | ▶ | use 5.008008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 9 | ▶ | use Math::Geometry::Construction::Types qw(Vector Point); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 9 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 9 | ▶ | use Math::Vector::Real; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 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 | 9 | our $VERSION = '0.024'; | |||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | ########################################################################### | ||||||||||
| 25 | # # | ||||||||||
| 26 | # Accessors # | ||||||||||
| 27 | # # | ||||||||||
| 28 | ########################################################################### | ||||||||||
| 29 | |||||||||||
| 30 | 9 | with 'Math::Geometry::Construction::Role::Buffering'; | |||||||||
| 31 | |||||||||||
| 32 | 9 | has 'input' => (isa => Point, | |||||||||
| 33 | coerce => 1, | ||||||||||
| 34 | is => 'ro', | ||||||||||
| 35 | required => 1); | ||||||||||
| 36 | |||||||||||
| 37 | 9 | 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 | 44 | ▶ | sub calculate_positions { | ||||||||
|
Subroutine
calculate_positions: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 50 | 44 | my ($self) = @_; | |||||||||
| 51 | 44 | my $reference = $self->input; | |||||||||
| 52 | |||||||||||
| 53 | 44 | my $position = $reference->position; | |||||||||
| 54 | 44 | ▶ | return if(!$position); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 55 | |||||||||||
| 56 | 44 | return($position + $self->translator->value); | |||||||||
| 57 | } | ||||||||||
| 58 | |||||||||||
| 59 | ########################################################################### | ||||||||||
| 60 | # # | ||||||||||
| 61 | # Change Data # | ||||||||||
| 62 | # # | ||||||||||
| 63 | ########################################################################### | ||||||||||
| 64 | |||||||||||
| 65 | 9 | 1; | |||||||||
| 66 | |||||||||||
| 67 | |||||||||||
| 68 | __END__ | ||||||||||