├── .gitignore ├── Math.sln ├── Math.vcxproj ├── Math.vcxproj.filters ├── README.md ├── addons.make ├── bin ├── data │ └── .gitkeep └── imgui.ini ├── demo.gif ├── icon.rc └── src ├── main.cpp ├── ofApp.cpp └── ofApp.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X cruft 2 | *.pbxuser 3 | *.mode1v3 4 | *.mode2v3 5 | *.user 6 | project.xcworkspace 7 | xcuserdata/ 8 | *.xccheckout 9 | .DS_Store 10 | 11 | # Windows cruft 12 | *.suo 13 | *.ncb 14 | *.sdf 15 | *.VC.opendb 16 | *.VC.db 17 | *.opensdf 18 | Debug/ 19 | Release/ 20 | Debug_ANGLE/ 21 | Release_ANGLE/ 22 | ipch/ 23 | 24 | # doxygen generated files 25 | docs/html 26 | docs/xml 27 | docs/doxygen/cinder.tag 28 | docs/*/node_modules 29 | *.pyc 30 | 31 | 32 | *.exe 33 | *.exp 34 | *.ilk 35 | *.lib 36 | *.pdb 37 | 38 | FreeImage.dll 39 | Zlib.dll 40 | assimp.dll 41 | fmodex.dll 42 | fmodexL.dll 43 | freetype.dll 44 | glut32.dll 45 | libeay32.dll 46 | ssleay32.dll -------------------------------------------------------------------------------- /Math.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 14 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Math", "Math.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}" 4 | EndProject 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Win32 = Debug|Win32 10 | Debug|x64 = Debug|x64 11 | Release|Win32 = Release|Win32 12 | Release|x64 = Release|x64 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32 16 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32 17 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64 18 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64 19 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32 20 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32 21 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64 22 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64 23 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32 24 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32 25 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64 26 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64 27 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32 28 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32 29 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64 30 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64 31 | EndGlobalSection 32 | GlobalSection(SolutionProperties) = preSolution 33 | HideSolutionNode = FALSE 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /Math.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {7FD42DF7-442E-479A-BA76-D0022F99702A} 23 | Win32Proj 24 | Math 25 | 26 | 27 | 28 | Application 29 | Unicode 30 | v140 31 | 32 | 33 | Application 34 | Unicode 35 | v140 36 | 37 | 38 | Application 39 | Unicode 40 | true 41 | v140 42 | 43 | 44 | Application 45 | Unicode 46 | true 47 | v140 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | bin\ 69 | obj\$(Configuration)\ 70 | $(ProjectName)_debug 71 | true 72 | true 73 | 74 | 75 | bin\ 76 | obj\$(Configuration)\ 77 | $(ProjectName)_debug 78 | true 79 | true 80 | 81 | 82 | bin\ 83 | obj\$(Configuration)\ 84 | false 85 | 86 | 87 | bin\ 88 | obj\$(Configuration)\ 89 | false 90 | 91 | 92 | 93 | Disabled 94 | EnableFastChecks 95 | %(PreprocessorDefinitions) 96 | MultiThreadedDebugDLL 97 | Level3 98 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxImGui\libs;..\..\..\addons\ofxImGui\libs\imgui;..\..\..\addons\ofxImGui\libs\imgui\src;..\..\..\addons\ofxImGui\src;..\..\..\addons\glm 99 | CompileAsCpp 100 | 101 | 102 | true 103 | Console 104 | false 105 | %(AdditionalDependencies) 106 | %(AdditionalLibraryDirectories) 107 | 108 | 109 | 110 | 111 | 112 | Disabled 113 | EnableFastChecks 114 | %(PreprocessorDefinitions) 115 | MultiThreadedDebugDLL 116 | Level3 117 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxImGui\libs;..\..\..\addons\ofxImGui\libs\imgui;..\..\..\addons\ofxImGui\libs\imgui\src;..\..\..\addons\ofxImGui\src;..\..\..\addons\glm 118 | CompileAsCpp 119 | true 120 | 121 | 122 | true 123 | Console 124 | false 125 | %(AdditionalDependencies) 126 | %(AdditionalLibraryDirectories) 127 | 128 | 129 | 130 | 131 | 132 | false 133 | %(PreprocessorDefinitions) 134 | MultiThreadedDLL 135 | Level3 136 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxImGui\libs;..\..\..\addons\ofxImGui\libs\imgui;..\..\..\addons\ofxImGui\libs\imgui\src;..\..\..\addons\ofxImGui\src;..\..\..\addons\glm 137 | CompileAsCpp 138 | true 139 | 140 | 141 | false 142 | false 143 | Console 144 | true 145 | true 146 | false 147 | %(AdditionalDependencies) 148 | %(AdditionalLibraryDirectories) 149 | 150 | 151 | 152 | 153 | 154 | false 155 | %(PreprocessorDefinitions) 156 | MultiThreadedDLL 157 | Level3 158 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxImGui\libs;..\..\..\addons\ofxImGui\libs\imgui;..\..\..\addons\ofxImGui\libs\imgui\src;..\..\..\addons\ofxImGui\src;..\..\..\addons\glm 159 | CompileAsCpp 160 | 161 | 162 | false 163 | false 164 | Console 165 | true 166 | true 167 | false 168 | %(AdditionalDependencies) 169 | %(AdditionalLibraryDirectories) 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | {5837595d-aca9-485c-8e76-729040ce4b0b} 203 | 204 | 205 | 206 | 207 | /D_DEBUG %(AdditionalOptions) 208 | /D_DEBUG %(AdditionalOptions) 209 | $(OF_ROOT)\libs\openFrameworksCompiled\project\vs 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /Math.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | src 6 | 7 | 8 | src 9 | 10 | 11 | addons\ofxImGui\src 12 | 13 | 14 | addons\ofxImGui\src 15 | 16 | 17 | addons\ofxImGui\src 18 | 19 | 20 | addons\ofxImGui\src 21 | 22 | 23 | addons\ofxImGui\src 24 | 25 | 26 | addons\ofxImGui\libs\imgui\src 27 | 28 | 29 | addons\ofxImGui\libs\imgui\src 30 | 31 | 32 | addons\ofxImGui\libs\imgui\src 33 | 34 | 35 | 36 | 37 | {d8376475-7454-4a24-b08a-aac121d3ad6f} 38 | 39 | 40 | {71834F65-F3A9-211E-73B8-DC85} 41 | 42 | 43 | {0CD6A942-69FF-3BAA-3AF1-ADD1} 44 | 45 | 46 | {18028A43-13D3-1DD5-471A-BE87} 47 | 48 | 49 | {BE2F957E-7DA7-055C-DC70-3070} 50 | 51 | 52 | {296AD70B-2F2E-1462-9E7C-6030} 53 | 54 | 55 | {5962BF19-1468-EB82-01C0-2E72} 56 | 57 | 58 | 59 | 60 | src 61 | 62 | 63 | addons\ofxImGui\src 64 | 65 | 66 | addons\ofxImGui\src 67 | 68 | 69 | addons\ofxImGui\src 70 | 71 | 72 | addons\ofxImGui\src 73 | 74 | 75 | addons\ofxImGui\src 76 | 77 | 78 | addons\ofxImGui\src 79 | 80 | 81 | addons\ofxImGui\src 82 | 83 | 84 | addons\ofxImGui\libs\imgui\src 85 | 86 | 87 | addons\ofxImGui\libs\imgui\src 88 | 89 | 90 | addons\ofxImGui\libs\imgui\src 91 | 92 | 93 | addons\ofxImGui\libs\imgui\src 94 | 95 | 96 | addons\ofxImGui\libs\imgui\src 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Math Based CoverFlow System 2 | https://www.desmos.com/calculator/xvjxzugwdn 3 | 4 | ![demo](demo.gif) 5 | -------------------------------------------------------------------------------- /addons.make: -------------------------------------------------------------------------------- 1 | ofxImGui 2 | -------------------------------------------------------------------------------- /bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushio/MathBasedCoverFlow/d98364b63fb54fe0225241805e17a7a7c174d7ce/bin/data/.gitkeep -------------------------------------------------------------------------------- /bin/imgui.ini: -------------------------------------------------------------------------------- 1 | [Debug] 2 | Pos=60,60 3 | Size=400,400 4 | Collapsed=0 5 | 6 | [Config] 7 | Pos=11,16 8 | Size=349,603 9 | Collapsed=0 10 | 11 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ushio/MathBasedCoverFlow/d98364b63fb54fe0225241805e17a7a7c174d7ce/demo.gif -------------------------------------------------------------------------------- /icon.rc: -------------------------------------------------------------------------------- 1 | // Icon Resource Definition 2 | #define MAIN_ICON 102 3 | 4 | #if defined(_DEBUG) 5 | MAIN_ICON ICON "icon_debug.ico" 6 | #else 7 | MAIN_ICON ICON "icon.ico" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | #include 4 | #include 5 | 6 | template 7 | void imgui_draw_tree_node(const char *name, bool isOpen, T f) { 8 | if (isOpen) { 9 | ImGui::SetNextTreeNodeOpen(true, ImGuiSetCond_Once); 10 | } 11 | if (ImGui::TreeNode(name)) { 12 | f(); 13 | ImGui::TreePop(); 14 | } 15 | } 16 | 17 | //-------------------------------------------------------------- 18 | void ofApp::setup(){ 19 | _camera.setDistance(20); 20 | _camera.setNearClip(0.1); 21 | _camera.setFarClip(300.0); 22 | 23 | _imgui.setup(); 24 | } 25 | 26 | //-------------------------------------------------------------- 27 | void ofApp::update() { 28 | double d = std::min(ofGetLastFrameTime(), 1.0 / 30.0); 29 | 30 | auto impluse = [](double x, double a) { 31 | double over_a = 1.0 / a; 32 | return over_a * x * glm::exp(1.0 - over_a * x); 33 | }; 34 | auto near_more = [](double d, double s) { 35 | return glm::exp(-(d * d) / (s * s)); 36 | }; 37 | 38 | int N = 10; 39 | double delta = d / N; 40 | for (int i = 0; i < N; ++i) { 41 | // 差 42 | double d = _to_x - _x; 43 | 44 | // 比例制御(P) 45 | auto pv = d * _kP; 46 | 47 | // 距離の近いときの+速度 48 | auto nv = impluse(glm::abs(d), 0.5) * _approach; 49 | if (pv < 0.0) { 50 | nv = -nv; 51 | } 52 | 53 | auto v = pv + nv; 54 | 55 | // 速度制限 56 | v = std::min(v, (double)_vMax); 57 | v = std::max(v, (double)-_vMax); 58 | 59 | // 加速だけ制限をかけたい 60 | if (glm::abs(_v) < glm::abs(v)) { 61 | auto amax = _aMax * delta; 62 | double a = v - _v; 63 | a = std::min(a, amax); 64 | a = std::max(a, -amax); 65 | v = _v + a; 66 | } 67 | 68 | _v = v; 69 | _x += _v * delta; 70 | } 71 | 72 | } 73 | 74 | //-------------------------------------------------------------- 75 | void ofApp::draw(){ 76 | ofClear(0); 77 | 78 | ofSetColor(255); 79 | _camera.begin(); 80 | 81 | glPushMatrix(); 82 | ofRotateZ(90); 83 | ofDrawGridPlane(1, 10); 84 | ofPopMatrix(); 85 | 86 | ofDrawAxis(10); 87 | 88 | ofEnableDepthTest(); 89 | 90 | // 位置場 91 | // Integrate[t + w*exp(-(x^2)/s^2), {x, 0, z}] 92 | auto position_field = [](double z, double s, double t, double w) { 93 | return 0.5 * glm::sqrt(glm::pi()) * s * w * std::erf(z / s) + t * z; 94 | }; 95 | 96 | // 回転場 97 | auto rotation_field = [](double z, double s) { 98 | auto v = glm::exp(-(z * z) / (s * s)) - 1.0; 99 | return 0.0 < z ? v : -v; 100 | }; 101 | 102 | // ズーム場 103 | auto zoom_field = [](double z, double s) { 104 | return glm::exp(-(z * z) / (s * s)); 105 | }; 106 | 107 | // 奥に並ぶようなやつ 108 | // Integrate[erf(u*sqrt(pi) x), {x, 0, z}] 109 | //auto zf = [](double z, double u) { 110 | // double sqPI = glm::sqrt(glm::pi()); 111 | // double a = -glm::pi() * u * z * std::erf(sqPI * u * z) - glm::exp(-glm::pi() * u * u * z * z) + 1.0; 112 | // double b = glm::pi() * u; 113 | // return -a / b; 114 | //}; 115 | 116 | double step = 1.0; 117 | 118 | // double ofs = -(glm::sin(ofGetElapsedTimef() * 0.5) * 0.5 + 0.5) * 5.0; 119 | for (int i = 0; i < kSlideN; ++i) { 120 | double x = i * step - _x; 121 | double position = position_field(x, _positionRoughness, _edgeSlope, _centerArea); 122 | double rot = rotation_field(x, _rotationArea); 123 | double zoomValue = zoom_field(x, _zoomArea); 124 | // double ofz = - 1.0 * zf(x, 2.0); 125 | 126 | ofSetColor(i % 2 == 0 ? 128 : 200); 127 | ofPushMatrix(); 128 | ofTranslate(position, 0, zoomValue * _zoom); 129 | ofRotateY(rot * _rotation); 130 | 131 | // 縦 132 | ofDrawRectangle(-0.5, -0.5, 1.0f, 1.0f); 133 | ofPopMatrix(); 134 | } 135 | 136 | // テスト描画 137 | //ofSetColor(ofColor::red); 138 | //ofDrawSphere(_x, 1.0f, 0.5f); 139 | //ofSetColor(ofColor::green); 140 | //ofDrawSphere(_to_x, 1.0f, 0.4f); 141 | 142 | _camera.end(); 143 | 144 | _imgui.begin(); 145 | ImGui::PushStyleColor(ImGuiCol_WindowBg, ofVec4f(0.0f, 0.2f, 0.2f, 0.8f)); 146 | ImGui::SetNextWindowPos(ofVec2f(10, 30), ImGuiSetCond_Once); 147 | ImGui::SetNextWindowSize(ofVec2f(500, ofGetHeight() * 0.8), ImGuiSetCond_Once); 148 | 149 | ImGui::Begin("Config"); 150 | 151 | imgui_draw_tree_node("Cover Flow", true, [=]() { 152 | // 両端の間隔 153 | ImGui::SliderFloat("edgeSlope", &_edgeSlope, 0.0f, 1.0f); 154 | 155 | // 真ん中エリアの幅 156 | ImGui::SliderFloat("positionRoughness", &_positionRoughness, 0.0f, 4.0f); 157 | 158 | // 真ん中エリアの幅拡張 159 | ImGui::SliderFloat("centerArea", &_centerArea, 0.0f, 10.0f); 160 | 161 | // 回転エリアの幅 162 | ImGui::SliderFloat("rotationArea", &_rotationArea, 0.0f, 4.0f); 163 | 164 | // 回転量 165 | ImGui::SliderFloat("rotation", &_rotation, 0.0f, 90.0f); 166 | 167 | // z方向ズーム幅 168 | ImGui::SliderFloat("zoomArea", &_zoomArea, 0.0f, 4.0f); 169 | 170 | // z方向ズーム量 171 | ImGui::SliderFloat("zoom", &_zoom, 0.0f, 2.0f); 172 | }); 173 | 174 | 175 | imgui_draw_tree_node("Movement", true, [=]() { 176 | // 差に比例する量 = ベース速度を決める 177 | ImGui::SliderFloat("kP", &_kP, 0.0f, 10.0f); 178 | 179 | // 最大速度制限 180 | ImGui::SliderFloat("vMax", &_vMax, 0.0f, 30.0f); 181 | 182 | // 最大加速度制限(上り) 183 | ImGui::SliderFloat("aMax", &_aMax, 0.0f, 200.0f); 184 | 185 | // 距離が近いときの追加加速具合制御 - 通常の比例制御だと減速が激しいため 186 | ImGui::SliderFloat("approach", &_approach, 0.0f, 5.0f); 187 | 188 | // 距離が近いときの追加加速を行う幅。おおむね0.5でいい気がする 189 | ImGui::SliderFloat("approachWide", &_approachWide, 0.0f, 5.0f); 190 | 191 | ImGui::Separator(); 192 | 193 | // テスト用直接編集 194 | ImGui::SliderInt("selection", &_to_x, 0, kSlideN - 1); 195 | }); 196 | 197 | ImGui::End(); 198 | ImGui::PopStyleColor(); 199 | 200 | _imgui.end(); 201 | } 202 | 203 | //-------------------------------------------------------------- 204 | void ofApp::keyPressed(int key){ 205 | if (key == OF_KEY_RIGHT) { 206 | _to_x += 1; 207 | } 208 | if (key == OF_KEY_LEFT) { 209 | _to_x -= 1; 210 | } 211 | 212 | _to_x = std::min(_to_x, kSlideN - 1); 213 | _to_x = std::max(_to_x, 0); 214 | } 215 | 216 | //-------------------------------------------------------------- 217 | void ofApp::keyReleased(int key){ 218 | 219 | } 220 | 221 | //-------------------------------------------------------------- 222 | void ofApp::mouseMoved(int x, int y ){ 223 | 224 | } 225 | 226 | //-------------------------------------------------------------- 227 | void ofApp::mouseDragged(int x, int y, int button){ 228 | 229 | } 230 | 231 | //-------------------------------------------------------------- 232 | void ofApp::mousePressed(int x, int y, int button){ 233 | 234 | } 235 | 236 | //-------------------------------------------------------------- 237 | void ofApp::mouseReleased(int x, int y, int button){ 238 | 239 | } 240 | 241 | //-------------------------------------------------------------- 242 | void ofApp::mouseEntered(int x, int y){ 243 | 244 | } 245 | 246 | //-------------------------------------------------------------- 247 | void ofApp::mouseExited(int x, int y){ 248 | 249 | } 250 | 251 | //-------------------------------------------------------------- 252 | void ofApp::windowResized(int w, int h){ 253 | 254 | } 255 | 256 | //-------------------------------------------------------------- 257 | void ofApp::gotMessage(ofMessage msg){ 258 | 259 | } 260 | 261 | //-------------------------------------------------------------- 262 | void ofApp::dragEvent(ofDragInfo dragInfo){ 263 | 264 | } 265 | -------------------------------------------------------------------------------- /src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxImGui.h" 5 | 6 | static int kSlideN = 15; 7 | 8 | class ofApp : public ofBaseApp{ 9 | 10 | public: 11 | void setup(); 12 | void update(); 13 | void draw(); 14 | 15 | void keyPressed(int key); 16 | void keyReleased(int key); 17 | void mouseMoved(int x, int y ); 18 | void mouseDragged(int x, int y, int button); 19 | void mousePressed(int x, int y, int button); 20 | void mouseReleased(int x, int y, int button); 21 | void mouseEntered(int x, int y); 22 | void mouseExited(int x, int y); 23 | void windowResized(int w, int h); 24 | void dragEvent(ofDragInfo dragInfo); 25 | void gotMessage(ofMessage msg); 26 | 27 | ofEasyCam _camera; 28 | ofxImGui _imgui; 29 | 30 | // coverflow 31 | float _edgeSlope = 0.3; 32 | float _positionRoughness = 0.7; 33 | float _centerArea = 1.1; 34 | float _rotationArea = 0.7; 35 | float _rotation = 70.0; 36 | float _zoomArea = 0.7; 37 | float _zoom = 0.5; 38 | 39 | // move 40 | float _kP = 5.0f; 41 | float _vMax = 15.0f; 42 | float _aMax = 40.0f; 43 | float _approach = 1.0f; 44 | float _approachWide = 0.5f; 45 | 46 | // 現在座標 47 | double _x = 0.0; 48 | // 現在速度 49 | double _v = 0.0; 50 | // selection 51 | int _to_x = 0; 52 | }; 53 | --------------------------------------------------------------------------------