mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-17 05:34:50 -04:00
--User changes
-Add variations changes to the list of functionality that can be applied to all xforms using the Select tab. -Allow for graphical affine adjustments to apply to multiple selected xforms. -Slight optimization of the pie variation. -Undo state is only saved when the render completes and the mouse buttons are released. This helps avoid intermediate steps for quickly completing renders while dragging. -Add some keyboard shortcuts for toolbar and menu items. -Make info tab tree always expanded. --Bug fixes -Make precalcs for all hypertile variations safer by using Zeps() for denominators. -Changing the current xform with more than one selected would set all xform's color index value that of the current one. -Use hard found palette path information for randoms as well. -OpenCL build and assignment errors for Z value in epispiral variation. -Unitialized local variables in hexaplay3D, crob, pRose3D. --Code changes -Change static member variables from m_ to s_. -Get rid of excessive endl and replace with "\n". -Remove old IMAGEGL2D define from before Nvidia supported OpenCL 1.2. -Remove old CriticalSection code and use std::recursive_mutex. -Make Affine2D Rotate() and RotateTrans() take radians instead of angles. -More C++11 work. -General cleanup.
This commit is contained in:
@ -103,6 +103,20 @@ T GLEmberController<T>::CalcRotation()
|
||||
return rotStart - rot;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Snap the passed in world cartesian coordinate to the grid for rotation, scale or translation.
|
||||
/// </summary>
|
||||
/// <param name="vec">The world cartesian coordinate to be snapped</param>
|
||||
/// <returns>The snapped world cartesian coordinate</returns>
|
||||
template <typename T>
|
||||
typename v2T GLEmberController<T>::SnapToGrid(v2T& vec)
|
||||
{
|
||||
v2T ret;
|
||||
ret.x = glm::round(vec.x / GridStep) * GridStep;
|
||||
ret.y = glm::round(vec.y / GridStep) * GridStep;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Snap the passed in world cartesian coordinate to the grid for rotation, scale or translation.
|
||||
/// </summary>
|
||||
@ -135,8 +149,8 @@ typename v3T GLEmberController<T>::SnapToNormalizedAngle(v3T& vec, uint division
|
||||
for (uint i = 0; i < divisions; i++)
|
||||
{
|
||||
theta = 2.0 * M_PI * T(i) / T(divisions);
|
||||
c.x = cos(theta);
|
||||
c.y = sin(theta);
|
||||
c.x = std::cos(theta);
|
||||
c.y = std::sin(theta);
|
||||
rsq = glm::distance(vec, c);
|
||||
|
||||
if (rsq < bestRsq)
|
||||
@ -220,7 +234,7 @@ void GLEmberController<double>::MultMatrix(tmat4x4<double, glm::defaultp>& mat)
|
||||
template <typename T>
|
||||
void GLEmberController<T>::QueryMatrices(bool print)
|
||||
{
|
||||
RendererBase* renderer = m_FractoriumEmberController->Renderer();
|
||||
auto renderer = m_FractoriumEmberController->Renderer();
|
||||
|
||||
if (renderer)
|
||||
{
|
||||
@ -242,13 +256,13 @@ void GLEmberController<T>::QueryMatrices(bool print)
|
||||
if (print)
|
||||
{
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
qDebug() << "Viewport[" << i << "] = " << m_Viewport[i] << endl;
|
||||
qDebug() << "Viewport[" << i << "] = " << m_Viewport[i] << "\n";
|
||||
|
||||
for (size_t i = 0; i < 16; i++)
|
||||
qDebug() << "Modelview[" << i << "] = " << glm::value_ptr(m_Modelview)[i] << endl;
|
||||
qDebug() << "Modelview[" << i << "] = " << glm::value_ptr(m_Modelview)[i] << "\n";
|
||||
|
||||
for (size_t i = 0; i < 16; i++)
|
||||
qDebug() << "Projection[" << i << "] = " << glm::value_ptr(m_Projection)[i] << endl;
|
||||
qDebug() << "Projection[" << i << "] = " << glm::value_ptr(m_Projection)[i] << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user