Changeset 336 in flair-src for trunk/lib/FlairFilter
- Timestamp:
- Oct 8, 2019, 4:41:35 PM (5 years ago)
- Location:
- trunk/lib/FlairFilter/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/JoyReference_impl.cpp
r318 r336 174 174 Vector3Df e_bar = theta_xy; 175 175 e_bar.Normalize(); 176 Quaternion q_xy(cos (theta_xy.GetNorm() / 2.0f),177 e_bar.x * sin (theta_xy.GetNorm() / 2.0f),178 e_bar.y * sin (theta_xy.GetNorm() / 2.0f), 0);176 Quaternion q_xy(cosf(theta_xy.GetNorm() / 2.0f), 177 e_bar.x * sinf(theta_xy.GetNorm() / 2.0f), 178 e_bar.y * sinf(theta_xy.GetNorm() / 2.0f), 0); 179 179 q_xy.Normalize(); 180 180 -
trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp
r318 r336 72 72 73 73 // configure trajectory 74 angle_off = atan2 (start_pos.y - pos_off.y, start_pos.x - pos_off.x);74 angle_off = atan2f(start_pos.y - pos_off.y, start_pos.x - pos_off.x); 75 75 CurrentTime = 0; 76 76 } … … 120 120 if (CurrentTime < V / A) { 121 121 theta = angle_off + A / 2 * CurrentTime * CurrentTime / R; 122 pos.x = R * cos (theta);123 pos.y = R * sin (theta);124 v.x = -A * CurrentTime * sin (theta);125 v.y = A * CurrentTime * cos (theta);122 pos.x = R * cosf(theta); 123 pos.y = R * sinf(theta); 124 v.x = -A * CurrentTime * sinf(theta); 125 v.y = A * CurrentTime * cosf(theta); 126 126 } else { 127 127 if (!is_finishing) { 128 128 theta = 129 129 angle_off + V * V / (2 * A * R) + (CurrentTime - V / A) * V / R; 130 pos.x = R * cos (theta);131 pos.y = R * sin (theta);132 v.x = -V * sin (theta);133 v.y = V * cos (theta);130 pos.x = R * cosf(theta); 131 pos.y = R * sinf(theta); 132 v.x = -V * sinf(theta); 133 v.y = V * cosf(theta); 134 134 } else { 135 135 theta = angle_off + V * V / (2 * A * R) + … … 138 138 (FinishTime - CurrentTime) / R + 139 139 V * (CurrentTime - FinishTime) / R; 140 pos.x = R * cos (theta);141 pos.y = R * sin (theta);142 v.x = -(V + A * (FinishTime - CurrentTime)) * sin (theta);143 v.y = (V + A * (FinishTime - CurrentTime)) * cos (theta);140 pos.x = R * cosf(theta); 141 pos.y = R * sinf(theta); 142 v.x = -(V + A * (FinishTime - CurrentTime)) * sinf(theta); 143 v.y = (V + A * (FinishTime - CurrentTime)) * cosf(theta); 144 144 } 145 145 }
Note:
See TracChangeset
for help on using the changeset viewer.