V-ART
scaleaction.cpp
Go to the documentation of this file.
1 
5 #include "vart/scaleaction.h"
6 #include "vart/transform.h"
7 
8 #include <iostream>
9 using namespace std;
10 
11 VART::ScaleAction::ScaleAction() : goalX(1), goalY(1), goalZ(1)
12 {
13 }
14 
15 void VART::ScaleAction::SetScale(double sX, double sY, double sZ)
16 {
17  goalX = sX;
18  goalY = sY;
19  goalZ = sZ;
20 }
21 
22 //virtual
24 {
25  bool cycled;
26  ComputePositionIndex(&cycled);
27  // use postionIndex to go from 1 to goal
28  targetPtr->MakeScale((goalX - 1) * positionIndex + 1,
29  (goalY - 1) * positionIndex + 1,
30  (goalZ - 1) * positionIndex + 1);
31 }
virtual void Move()
Make the action update its targets.
Definition: scaleaction.cpp:23
Header file for V-ART class "Transform".
void SetScale(double sX, double sY, double sZ)
Definition: scaleaction.cpp:15
Header file for V-ART class "ScaleAction".