sfml.js 0.0.1-preview.8 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -7
- package/binding.gyp +118 -17
- package/index.d.ts +1 -0
- package/lib/clock.d.ts +2 -4
- package/lib/clock.js +3 -1
- package/lib/color.d.ts +2 -2
- package/lib/color.js +58 -3
- package/lib/common.js +33 -7
- package/lib/drawable/circle_shape.d.ts +2 -2
- package/lib/drawable/circle_shape.js +3 -3
- package/lib/drawable/convex_shape.d.ts +5 -0
- package/lib/drawable/convex_shape.js +35 -0
- package/lib/drawable/drawable.d.ts +6 -0
- package/lib/drawable/{base.js → drawable.js} +7 -4
- package/lib/drawable/plugin_package.d.ts +31 -0
- package/lib/drawable/plugin_package.js +102 -0
- package/lib/drawable/rectangle_shape.d.ts +6 -3
- package/lib/drawable/rectangle_shape.js +14 -2
- package/lib/drawable/shape.d.ts +8 -32
- package/lib/drawable/shape.js +16 -115
- package/lib/drawable/sprite.d.ts +17 -0
- package/lib/drawable/sprite.js +53 -0
- package/lib/drawable/text.d.ts +26 -0
- package/lib/drawable/text.js +88 -0
- package/lib/drawable/transformable.d.ts +28 -0
- package/lib/drawable/transformable.js +113 -0
- package/lib/drawable/vertex_array.d.ts +40 -0
- package/lib/drawable/vertex_array.js +128 -0
- package/lib/font.d.ts +24 -0
- package/lib/font.js +137 -0
- package/lib/image.d.ts +26 -0
- package/lib/image.js +147 -0
- package/lib/joystick.d.ts +21 -0
- package/lib/joystick.js +72 -0
- package/lib/keyboard.d.ts +113 -0
- package/lib/keyboard.js +17 -0
- package/lib/mouse.d.ts +6 -0
- package/lib/mouse.js +39 -0
- package/lib/poll_event.d.ts +72 -10
- package/lib/rect.d.ts +2 -2
- package/lib/rect.js +29 -9
- package/lib/render_window.d.ts +54 -15
- package/lib/render_window.js +137 -7
- package/lib/sensor.d.ts +12 -0
- package/lib/sensor.js +34 -0
- package/lib/sfml.d.ts +32 -0
- package/lib/sfml.js +26 -9
- package/lib/sound/base.d.ts +33 -0
- package/lib/sound/base.js +109 -0
- package/lib/sound/music.d.ts +15 -0
- package/lib/sound/music.js +65 -0
- package/lib/sound/sound.d.ts +16 -0
- package/lib/sound/sound.js +55 -0
- package/lib/sound/sound_buffer.d.ts +14 -0
- package/lib/sound/sound_buffer.js +78 -0
- package/lib/texture.d.ts +21 -0
- package/lib/texture.js +127 -0
- package/lib/time.d.ts +2 -2
- package/lib/touch.d.ts +7 -0
- package/lib/touch.js +34 -0
- package/lib/vector2.d.ts +24 -0
- package/lib/vector2.js +85 -16
- package/lib/vector3.d.ts +47 -0
- package/lib/vector3.js +154 -0
- package/lib/vertex.d.ts +14 -0
- package/lib/vertex.js +177 -0
- package/lib/video_mode.d.ts +2 -4
- package/lib/video_mode.js +15 -5
- package/package.json +26 -26
- package/src/base_class_with_loading.h +21 -0
- package/src/clock.cc +12 -3
- package/src/clock.h +5 -2
- package/src/color.cc +18 -13
- package/src/color.h +9 -3
- package/src/drawable/circle_shape.cc +9 -9
- package/src/drawable/circle_shape.h +4 -1
- package/src/drawable/convex_shape.cc +57 -0
- package/src/drawable/convex_shape.h +29 -0
- package/src/drawable/drawable-inl.h +29 -0
- package/src/drawable/drawable.cc +41 -0
- package/src/drawable/drawable.h +26 -38
- package/src/drawable/package_plugin-inl.h +191 -0
- package/src/drawable/package_plugin.h +60 -0
- package/src/drawable/rectangle_shape.cc +43 -7
- package/src/drawable/rectangle_shape.h +7 -1
- package/src/drawable/shape.cc +67 -0
- package/src/drawable/shape.h +13 -28
- package/src/drawable/sprite.cc +122 -0
- package/src/drawable/sprite.h +45 -0
- package/src/drawable/text.cc +133 -0
- package/src/drawable/text.h +54 -0
- package/src/drawable/vertex_array.cc +248 -0
- package/src/drawable/vertex_array.h +46 -0
- package/src/font.cc +214 -0
- package/src/font.h +44 -0
- package/src/gen/joystick_axis.cc +30 -0
- package/src/gen/keycode.cc +12 -4
- package/src/gen/sensor_type.cc +26 -0
- package/src/image.cc +379 -0
- package/src/image.h +72 -0
- package/src/joystick.cc +132 -0
- package/src/joystick.h +32 -0
- package/src/keyboard.cc +50 -0
- package/src/keyboard.h +8 -1
- package/src/mouse.cc +80 -0
- package/src/mouse.h +9 -1
- package/src/plugins/transformable_plugin-inl.h +121 -0
- package/src/plugins/transformable_plugin.h +42 -0
- package/src/poll_event.cc +74 -1
- package/src/poll_event.h +2 -1
- package/src/rect-inl.h +21 -16
- package/src/rect.h +10 -8
- package/src/render_window.cc +249 -6
- package/src/render_window.h +70 -2
- package/src/render_window_async_display.cc +49 -0
- package/src/render_window_async_draw.cc +56 -0
- package/src/resizable_buffer.h +104 -0
- package/src/sensor.cc +82 -0
- package/src/sensor.h +28 -0
- package/src/sfml.cc +41 -0
- package/src/sound/music.cc +113 -0
- package/src/sound/music.h +35 -0
- package/src/sound/sound.cc +116 -0
- package/src/sound/sound.h +41 -0
- package/src/sound/sound_buffer.cc +226 -0
- package/src/sound/sound_buffer.h +46 -0
- package/src/sound/sound_source.cc +124 -0
- package/src/sound/sound_source.h +80 -0
- package/src/texture.cc +246 -0
- package/src/texture.h +47 -0
- package/src/time.cc +1 -1
- package/src/time.h +2 -1
- package/src/touch.cc +54 -0
- package/src/touch.h +23 -0
- package/src/utils-inl.h +19 -0
- package/src/utils.h +6 -0
- package/src/vector2-inl.h +101 -17
- package/src/vector2.cc +4 -3
- package/src/vector2.h +42 -12
- package/src/vector3-inl.h +200 -0
- package/src/vector3.cc +36 -0
- package/src/vector3.h +134 -0
- package/src/vertex.cc +238 -0
- package/src/vertex.h +114 -0
- package/src/video_mode.cc +9 -9
- package/src/video_mode.h +9 -2
- package/src/workers/load_from_file_worker.h +79 -0
- package/src/workers/save_to_file_worker.h +79 -0
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/AlResource.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/InputSoundFile.hpp +17 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Listener.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/Music.hpp +10 -10
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/OutputSoundFile.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/Sound.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundBuffer.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundBufferRecorder.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileFactory.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileFactory.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundFileReader.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundFileWriter.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundRecorder.hpp +12 -10
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio/SoundSource.hpp +5 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Audio/SoundStream.hpp +34 -19
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Audio.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Config.hpp +16 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/GpuPreference.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/BlendMode.hpp +28 -24
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/CircleShape.hpp +3 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Color.hpp +14 -14
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/ConvexShape.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Drawable.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Font.hpp +81 -24
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Glsl.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Glsl.inl +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Glyph.hpp +7 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Image.hpp +34 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/PrimitiveType.hpp +11 -11
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Rect.hpp +25 -5
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Rect.inl +13 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/RectangleShape.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/RenderStates.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderTarget.hpp +21 -13
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderTexture.hpp +23 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/RenderWindow.hpp +13 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Shader.hpp +8 -8
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Shape.hpp +10 -10
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Sprite.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Text.hpp +20 -20
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Texture.hpp +13 -13
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Transform.hpp +23 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/Transformable.hpp +9 -9
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/Vertex.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics/VertexArray.hpp +3 -3
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/VertexBuffer.hpp +8 -8
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Graphics/View.hpp +9 -9
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Graphics.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Main.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Ftp.hpp +53 -53
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Http.hpp +44 -44
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/IpAddress.hpp +7 -7
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/Packet.hpp +18 -5
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/Socket.hpp +12 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/SocketHandle.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/SocketSelector.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/TcpListener.hpp +5 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Network/TcpSocket.hpp +6 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network/UdpSocket.hpp +7 -6
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Network.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/OpenGL.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Clock.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Err.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/FileInputStream.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/InputStream.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Lock.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/MemoryInputStream.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Mutex.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/NativeActivity.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/NonCopyable.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Sleep.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/String.hpp +5 -5
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/String.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Thread.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Thread.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/ThreadLocal.hpp +2 -2
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/ThreadLocalPtr.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/ThreadLocalPtr.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Time.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Utf.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Utf.inl +12 -12
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Vector2.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/System/Vector2.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Vector3.hpp +4 -4
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System/Vector3.inl +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/System.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Clipboard.hpp +1 -1
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Context.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/ContextSettings.hpp +11 -11
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Cursor.hpp +36 -17
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Event.hpp +72 -71
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Export.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/GlResource.hpp +1 -1
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Joystick.hpp +15 -15
- package/third_party/sfml/include/SFML/Window/Keyboard.hpp +491 -0
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Mouse.hpp +15 -12
- package/third_party/{SFML-2.5.1 → sfml}/include/SFML/Window/Sensor.hpp +8 -8
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Touch.hpp +3 -3
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/VideoMode.hpp +4 -4
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/GlResource.hpp → sfml/include/SFML/Window/Vulkan.hpp} +51 -45
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/Window.hpp +35 -303
- package/third_party/{SFML-2.5.1/include/SFML/Window/Window.hpp → sfml/include/SFML/Window/WindowBase.hpp} +60 -164
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/WindowHandle.hpp +2 -2
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window/WindowStyle.hpp +7 -7
- package/third_party/{SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers → sfml/include/SFML}/Window.hpp +1 -1
- package/tools/clang_format.js +9 -0
- package/tools/copier/linux.js +21 -0
- package/tools/copier/macos.js +34 -0
- package/tools/copier/windows.js +33 -0
- package/tools/joystick_axis.js +63 -0
- package/tools/keycode.js +62 -19
- package/tools/lib_downloader.js +107 -0
- package/tools/lib_downloader_urls.js +59 -0
- package/tools/mouse_button.js +60 -37
- package/tools/sensor_type.js +63 -0
- package/tsconfig.json +8 -0
- package/lib/drawable/base.d.ts +0 -3
- package/src/drawable/shape-inl.h +0 -231
- package/third_party/SFML-2.5.1/include/SFML/Audio/Music.hpp +0 -337
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.hpp +0 -197
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileFactory.inl +0 -100
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundFileWriter.hpp +0 -125
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundRecorder.hpp +0 -408
- package/third_party/SFML-2.5.1/include/SFML/Audio/SoundSource.hpp +0 -332
- package/third_party/SFML-2.5.1/include/SFML/Audio.hpp +0 -56
- package/third_party/SFML-2.5.1/include/SFML/Config.hpp +0 -236
- package/third_party/SFML-2.5.1/include/SFML/GpuPreference.hpp +0 -74
- package/third_party/SFML-2.5.1/include/SFML/Graphics/BlendMode.hpp +0 -215
- package/third_party/SFML-2.5.1/include/SFML/Graphics/ConvexShape.hpp +0 -153
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Drawable.hpp +0 -126
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Font.hpp +0 -439
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Glsl.hpp +0 -227
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Rect.hpp +0 -254
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Rect.inl +0 -159
- package/third_party/SFML-2.5.1/include/SFML/Graphics/RectangleShape.hpp +0 -132
- package/third_party/SFML-2.5.1/include/SFML/Graphics/RenderStates.hpp +0 -174
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Shape.hpp +0 -355
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Sprite.hpp +0 -279
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Texture.hpp +0 -733
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Transform.hpp +0 -479
- package/third_party/SFML-2.5.1/include/SFML/Graphics/Vertex.hpp +0 -148
- package/third_party/SFML-2.5.1/include/SFML/Graphics/VertexArray.hpp +0 -223
- package/third_party/SFML-2.5.1/include/SFML/Graphics.hpp +0 -68
- package/third_party/SFML-2.5.1/include/SFML/Network/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Network/Ftp.hpp +0 -616
- package/third_party/SFML-2.5.1/include/SFML/Network/Http.hpp +0 -482
- package/third_party/SFML-2.5.1/include/SFML/Network/IpAddress.hpp +0 -328
- package/third_party/SFML-2.5.1/include/SFML/Network/Socket.hpp +0 -219
- package/third_party/SFML-2.5.1/include/SFML/Network/SocketSelector.hpp +0 -263
- package/third_party/SFML-2.5.1/include/SFML/Network/TcpSocket.hpp +0 -316
- package/third_party/SFML-2.5.1/include/SFML/System/Err.hpp +0 -80
- package/third_party/SFML-2.5.1/include/SFML/System/InputStream.hpp +0 -152
- package/third_party/SFML-2.5.1/include/SFML/System/NativeActivity.hpp +0 -62
- package/third_party/SFML-2.5.1/include/SFML/System/NonCopyable.hpp +0 -129
- package/third_party/SFML-2.5.1/include/SFML/System/String.hpp +0 -669
- package/third_party/SFML-2.5.1/include/SFML/System/Thread.inl +0 -90
- package/third_party/SFML-2.5.1/include/SFML/System/ThreadLocalPtr.inl +0 -77
- package/third_party/SFML-2.5.1/include/SFML/System/Utf.hpp +0 -763
- package/third_party/SFML-2.5.1/include/SFML/System/Utf.inl +0 -752
- package/third_party/SFML-2.5.1/include/SFML/System/Vector2.hpp +0 -301
- package/third_party/SFML-2.5.1/include/SFML/System/Vector2.inl +0 -161
- package/third_party/SFML-2.5.1/include/SFML/Window/Context.hpp +0 -195
- package/third_party/SFML-2.5.1/include/SFML/Window/ContextSettings.hpp +0 -149
- package/third_party/SFML-2.5.1/include/SFML/Window/Cursor.hpp +0 -222
- package/third_party/SFML-2.5.1/include/SFML/Window/Event.hpp +0 -284
- package/third_party/SFML-2.5.1/include/SFML/Window/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/include/SFML/Window/Keyboard.hpp +0 -232
- package/third_party/SFML-2.5.1/include/SFML/Window/Touch.hpp +0 -137
- package/third_party/SFML-2.5.1/include/SFML/Window/VideoMode.hpp +0 -228
- package/third_party/SFML-2.5.1/include/SFML/Window/WindowHandle.hpp +0 -101
- package/third_party/SFML-2.5.1/include/SFML/Window/WindowStyle.hpp +0 -53
- package/third_party/SFML-2.5.1/include/SFML/Window.hpp +0 -58
- package/third_party/SFML-2.5.1/lib/libsfml-audio.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-graphics.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-network.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-system.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/lib/libsfml-window.so.2.5.1 +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/FLAC.framework/Versions/A/FLAC +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/OpenAL.framework/Versions/A/OpenAL +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/AlResource.hpp +0 -70
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/InputSoundFile.hpp +0 -263
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Listener.hpp +0 -234
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/OutputSoundFile.hpp +0 -133
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/Sound.hpp +0 -264
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundBuffer.hpp +0 -352
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundBufferRecorder.hpp +0 -144
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundFileReader.hpp +0 -165
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Audio/SoundStream.hpp +0 -405
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/CircleShape.hpp +0 -154
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Color.hpp +0 -275
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Glsl.inl +0 -155
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Glyph.hpp +0 -79
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Image.hpp +0 -324
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/PrimitiveType.hpp +0 -58
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderTarget.hpp +0 -510
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderTexture.hpp +0 -314
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/RenderWindow.hpp +0 -284
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Shader.hpp +0 -875
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Text.hpp +0 -513
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/Transformable.hpp +0 -429
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/VertexBuffer.hpp +0 -408
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Graphics/View.hpp +0 -343
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Main.hpp +0 -43
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/Packet.hpp +0 -532
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/SocketHandle.hpp +0 -57
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/TcpListener.hpp +0 -166
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network/UdpSocket.hpp +0 -291
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Network.hpp +0 -53
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/OpenGL.hpp +0 -78
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Clock.hpp +0 -117
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Export.hpp +0 -48
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/FileInputStream.hpp +0 -169
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Lock.hpp +0 -139
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/MemoryInputStream.hpp +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Mutex.hpp +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Sleep.hpp +0 -52
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/String.inl +0 -53
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Thread.hpp +0 -282
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/ThreadLocal.hpp +0 -103
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/ThreadLocalPtr.hpp +0 -158
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Time.hpp +0 -488
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Vector3.hpp +0 -302
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System/Vector3.inl +0 -168
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/System.hpp +0 -60
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Clipboard.hpp +0 -119
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Joystick.hpp +0 -227
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Keyboard.hpp +0 -232
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Mouse.hpp +0 -177
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Headers/Window/Sensor.hpp +0 -150
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfig.cmake +0 -148
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfigDependencies.cmake +0 -86
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLConfigVersion.cmake +0 -46
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLSharedTargets-release.cmake +0 -59
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/CMake/SFMLSharedTargets.cmake +0 -158
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/SFML.framework/Versions/2.5.1/SFML +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/freetype.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/freetype.framework/Versions/A/freetype +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/ogg.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/ogg.framework/Versions/A/ogg +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-audio.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-audio.framework/Versions/2.5.1/sfml-audio +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-graphics.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-graphics.framework/Versions/2.5.1/sfml-graphics +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-network.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-network.framework/Versions/2.5.1/sfml-network +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-system.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-system.framework/Versions/2.5.1/sfml-system +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-window.framework/Versions/2.5.1/Resources/Info.plist +0 -26
- package/third_party/SFML-2.5.1/macOS/Frameworks/sfml-window.framework/Versions/2.5.1/sfml-window +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbis.framework/Versions/A/vorbis +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisenc.framework/Versions/A/vorbisenc +0 -0
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist +0 -22
- package/third_party/SFML-2.5.1/macOS/Frameworks/vorbisfile.framework/Versions/A/vorbisfile +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-audio.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-graphics.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-network.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-system.2.5.1.dylib +0 -0
- package/third_party/SFML-2.5.1/macOS/lib/libsfml-window.2.5.1.dylib +0 -0
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
////////////////////////////////////////////////////////////
|
|
2
|
-
//
|
|
3
|
-
// SFML - Simple and Fast Multimedia Library
|
|
4
|
-
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
|
|
5
|
-
//
|
|
6
|
-
// This software is provided 'as-is', without any express or implied warranty.
|
|
7
|
-
// In no event will the authors be held liable for any damages arising from the use of this software.
|
|
8
|
-
//
|
|
9
|
-
// Permission is granted to anyone to use this software for any purpose,
|
|
10
|
-
// including commercial applications, and to alter it and redistribute it freely,
|
|
11
|
-
// subject to the following restrictions:
|
|
12
|
-
//
|
|
13
|
-
// 1. The origin of this software must not be misrepresented;
|
|
14
|
-
// you must not claim that you wrote the original software.
|
|
15
|
-
// If you use this software in a product, an acknowledgment
|
|
16
|
-
// in the product documentation would be appreciated but is not required.
|
|
17
|
-
//
|
|
18
|
-
// 2. Altered source versions must be plainly marked as such,
|
|
19
|
-
// and must not be misrepresented as being the original software.
|
|
20
|
-
//
|
|
21
|
-
// 3. This notice may not be removed or altered from any source distribution.
|
|
22
|
-
//
|
|
23
|
-
////////////////////////////////////////////////////////////
|
|
24
|
-
|
|
25
|
-
#ifndef SFML_TRANSFORMABLE_HPP
|
|
26
|
-
#define SFML_TRANSFORMABLE_HPP
|
|
27
|
-
|
|
28
|
-
////////////////////////////////////////////////////////////
|
|
29
|
-
// Headers
|
|
30
|
-
////////////////////////////////////////////////////////////
|
|
31
|
-
#include <SFML/Graphics/Export.hpp>
|
|
32
|
-
#include <SFML/Graphics/Transform.hpp>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
namespace sf
|
|
36
|
-
{
|
|
37
|
-
////////////////////////////////////////////////////////////
|
|
38
|
-
/// \brief Decomposed transform defined by a position, a rotation and a scale
|
|
39
|
-
///
|
|
40
|
-
////////////////////////////////////////////////////////////
|
|
41
|
-
class SFML_GRAPHICS_API Transformable
|
|
42
|
-
{
|
|
43
|
-
public:
|
|
44
|
-
|
|
45
|
-
////////////////////////////////////////////////////////////
|
|
46
|
-
/// \brief Default constructor
|
|
47
|
-
///
|
|
48
|
-
////////////////////////////////////////////////////////////
|
|
49
|
-
Transformable();
|
|
50
|
-
|
|
51
|
-
////////////////////////////////////////////////////////////
|
|
52
|
-
/// \brief Virtual destructor
|
|
53
|
-
///
|
|
54
|
-
////////////////////////////////////////////////////////////
|
|
55
|
-
virtual ~Transformable();
|
|
56
|
-
|
|
57
|
-
////////////////////////////////////////////////////////////
|
|
58
|
-
/// \brief set the position of the object
|
|
59
|
-
///
|
|
60
|
-
/// This function completely overwrites the previous position.
|
|
61
|
-
/// See the move function to apply an offset based on the previous position instead.
|
|
62
|
-
/// The default position of a transformable object is (0, 0).
|
|
63
|
-
///
|
|
64
|
-
/// \param x X coordinate of the new position
|
|
65
|
-
/// \param y Y coordinate of the new position
|
|
66
|
-
///
|
|
67
|
-
/// \see move, getPosition
|
|
68
|
-
///
|
|
69
|
-
////////////////////////////////////////////////////////////
|
|
70
|
-
void setPosition(float x, float y);
|
|
71
|
-
|
|
72
|
-
////////////////////////////////////////////////////////////
|
|
73
|
-
/// \brief set the position of the object
|
|
74
|
-
///
|
|
75
|
-
/// This function completely overwrites the previous position.
|
|
76
|
-
/// See the move function to apply an offset based on the previous position instead.
|
|
77
|
-
/// The default position of a transformable object is (0, 0).
|
|
78
|
-
///
|
|
79
|
-
/// \param position New position
|
|
80
|
-
///
|
|
81
|
-
/// \see move, getPosition
|
|
82
|
-
///
|
|
83
|
-
////////////////////////////////////////////////////////////
|
|
84
|
-
void setPosition(const Vector2f& position);
|
|
85
|
-
|
|
86
|
-
////////////////////////////////////////////////////////////
|
|
87
|
-
/// \brief set the orientation of the object
|
|
88
|
-
///
|
|
89
|
-
/// This function completely overwrites the previous rotation.
|
|
90
|
-
/// See the rotate function to add an angle based on the previous rotation instead.
|
|
91
|
-
/// The default rotation of a transformable object is 0.
|
|
92
|
-
///
|
|
93
|
-
/// \param angle New rotation, in degrees
|
|
94
|
-
///
|
|
95
|
-
/// \see rotate, getRotation
|
|
96
|
-
///
|
|
97
|
-
////////////////////////////////////////////////////////////
|
|
98
|
-
void setRotation(float angle);
|
|
99
|
-
|
|
100
|
-
////////////////////////////////////////////////////////////
|
|
101
|
-
/// \brief set the scale factors of the object
|
|
102
|
-
///
|
|
103
|
-
/// This function completely overwrites the previous scale.
|
|
104
|
-
/// See the scale function to add a factor based on the previous scale instead.
|
|
105
|
-
/// The default scale of a transformable object is (1, 1).
|
|
106
|
-
///
|
|
107
|
-
/// \param factorX New horizontal scale factor
|
|
108
|
-
/// \param factorY New vertical scale factor
|
|
109
|
-
///
|
|
110
|
-
/// \see scale, getScale
|
|
111
|
-
///
|
|
112
|
-
////////////////////////////////////////////////////////////
|
|
113
|
-
void setScale(float factorX, float factorY);
|
|
114
|
-
|
|
115
|
-
////////////////////////////////////////////////////////////
|
|
116
|
-
/// \brief set the scale factors of the object
|
|
117
|
-
///
|
|
118
|
-
/// This function completely overwrites the previous scale.
|
|
119
|
-
/// See the scale function to add a factor based on the previous scale instead.
|
|
120
|
-
/// The default scale of a transformable object is (1, 1).
|
|
121
|
-
///
|
|
122
|
-
/// \param factors New scale factors
|
|
123
|
-
///
|
|
124
|
-
/// \see scale, getScale
|
|
125
|
-
///
|
|
126
|
-
////////////////////////////////////////////////////////////
|
|
127
|
-
void setScale(const Vector2f& factors);
|
|
128
|
-
|
|
129
|
-
////////////////////////////////////////////////////////////
|
|
130
|
-
/// \brief set the local origin of the object
|
|
131
|
-
///
|
|
132
|
-
/// The origin of an object defines the center point for
|
|
133
|
-
/// all transformations (position, scale, rotation).
|
|
134
|
-
/// The coordinates of this point must be relative to the
|
|
135
|
-
/// top-left corner of the object, and ignore all
|
|
136
|
-
/// transformations (position, scale, rotation).
|
|
137
|
-
/// The default origin of a transformable object is (0, 0).
|
|
138
|
-
///
|
|
139
|
-
/// \param x X coordinate of the new origin
|
|
140
|
-
/// \param y Y coordinate of the new origin
|
|
141
|
-
///
|
|
142
|
-
/// \see getOrigin
|
|
143
|
-
///
|
|
144
|
-
////////////////////////////////////////////////////////////
|
|
145
|
-
void setOrigin(float x, float y);
|
|
146
|
-
|
|
147
|
-
////////////////////////////////////////////////////////////
|
|
148
|
-
/// \brief set the local origin of the object
|
|
149
|
-
///
|
|
150
|
-
/// The origin of an object defines the center point for
|
|
151
|
-
/// all transformations (position, scale, rotation).
|
|
152
|
-
/// The coordinates of this point must be relative to the
|
|
153
|
-
/// top-left corner of the object, and ignore all
|
|
154
|
-
/// transformations (position, scale, rotation).
|
|
155
|
-
/// The default origin of a transformable object is (0, 0).
|
|
156
|
-
///
|
|
157
|
-
/// \param origin New origin
|
|
158
|
-
///
|
|
159
|
-
/// \see getOrigin
|
|
160
|
-
///
|
|
161
|
-
////////////////////////////////////////////////////////////
|
|
162
|
-
void setOrigin(const Vector2f& origin);
|
|
163
|
-
|
|
164
|
-
////////////////////////////////////////////////////////////
|
|
165
|
-
/// \brief get the position of the object
|
|
166
|
-
///
|
|
167
|
-
/// \return Current position
|
|
168
|
-
///
|
|
169
|
-
/// \see setPosition
|
|
170
|
-
///
|
|
171
|
-
////////////////////////////////////////////////////////////
|
|
172
|
-
const Vector2f& getPosition() const;
|
|
173
|
-
|
|
174
|
-
////////////////////////////////////////////////////////////
|
|
175
|
-
/// \brief get the orientation of the object
|
|
176
|
-
///
|
|
177
|
-
/// The rotation is always in the range [0, 360].
|
|
178
|
-
///
|
|
179
|
-
/// \return Current rotation, in degrees
|
|
180
|
-
///
|
|
181
|
-
/// \see setRotation
|
|
182
|
-
///
|
|
183
|
-
////////////////////////////////////////////////////////////
|
|
184
|
-
float getRotation() const;
|
|
185
|
-
|
|
186
|
-
////////////////////////////////////////////////////////////
|
|
187
|
-
/// \brief get the current scale of the object
|
|
188
|
-
///
|
|
189
|
-
/// \return Current scale factors
|
|
190
|
-
///
|
|
191
|
-
/// \see setScale
|
|
192
|
-
///
|
|
193
|
-
////////////////////////////////////////////////////////////
|
|
194
|
-
const Vector2f& getScale() const;
|
|
195
|
-
|
|
196
|
-
////////////////////////////////////////////////////////////
|
|
197
|
-
/// \brief get the local origin of the object
|
|
198
|
-
///
|
|
199
|
-
/// \return Current origin
|
|
200
|
-
///
|
|
201
|
-
/// \see setOrigin
|
|
202
|
-
///
|
|
203
|
-
////////////////////////////////////////////////////////////
|
|
204
|
-
const Vector2f& getOrigin() const;
|
|
205
|
-
|
|
206
|
-
////////////////////////////////////////////////////////////
|
|
207
|
-
/// \brief Move the object by a given offset
|
|
208
|
-
///
|
|
209
|
-
/// This function adds to the current position of the object,
|
|
210
|
-
/// unlike setPosition which overwrites it.
|
|
211
|
-
/// Thus, it is equivalent to the following code:
|
|
212
|
-
/// \code
|
|
213
|
-
/// sf::Vector2f pos = object.getPosition();
|
|
214
|
-
/// object.setPosition(pos.x + offsetX, pos.y + offsetY);
|
|
215
|
-
/// \endcode
|
|
216
|
-
///
|
|
217
|
-
/// \param offsetX X offset
|
|
218
|
-
/// \param offsetY Y offset
|
|
219
|
-
///
|
|
220
|
-
/// \see setPosition
|
|
221
|
-
///
|
|
222
|
-
////////////////////////////////////////////////////////////
|
|
223
|
-
void move(float offsetX, float offsetY);
|
|
224
|
-
|
|
225
|
-
////////////////////////////////////////////////////////////
|
|
226
|
-
/// \brief Move the object by a given offset
|
|
227
|
-
///
|
|
228
|
-
/// This function adds to the current position of the object,
|
|
229
|
-
/// unlike setPosition which overwrites it.
|
|
230
|
-
/// Thus, it is equivalent to the following code:
|
|
231
|
-
/// \code
|
|
232
|
-
/// object.setPosition(object.getPosition() + offset);
|
|
233
|
-
/// \endcode
|
|
234
|
-
///
|
|
235
|
-
/// \param offset Offset
|
|
236
|
-
///
|
|
237
|
-
/// \see setPosition
|
|
238
|
-
///
|
|
239
|
-
////////////////////////////////////////////////////////////
|
|
240
|
-
void move(const Vector2f& offset);
|
|
241
|
-
|
|
242
|
-
////////////////////////////////////////////////////////////
|
|
243
|
-
/// \brief Rotate the object
|
|
244
|
-
///
|
|
245
|
-
/// This function adds to the current rotation of the object,
|
|
246
|
-
/// unlike setRotation which overwrites it.
|
|
247
|
-
/// Thus, it is equivalent to the following code:
|
|
248
|
-
/// \code
|
|
249
|
-
/// object.setRotation(object.getRotation() + angle);
|
|
250
|
-
/// \endcode
|
|
251
|
-
///
|
|
252
|
-
/// \param angle Angle of rotation, in degrees
|
|
253
|
-
///
|
|
254
|
-
////////////////////////////////////////////////////////////
|
|
255
|
-
void rotate(float angle);
|
|
256
|
-
|
|
257
|
-
////////////////////////////////////////////////////////////
|
|
258
|
-
/// \brief Scale the object
|
|
259
|
-
///
|
|
260
|
-
/// This function multiplies the current scale of the object,
|
|
261
|
-
/// unlike setScale which overwrites it.
|
|
262
|
-
/// Thus, it is equivalent to the following code:
|
|
263
|
-
/// \code
|
|
264
|
-
/// sf::Vector2f scale = object.getScale();
|
|
265
|
-
/// object.setScale(scale.x * factorX, scale.y * factorY);
|
|
266
|
-
/// \endcode
|
|
267
|
-
///
|
|
268
|
-
/// \param factorX Horizontal scale factor
|
|
269
|
-
/// \param factorY Vertical scale factor
|
|
270
|
-
///
|
|
271
|
-
/// \see setScale
|
|
272
|
-
///
|
|
273
|
-
////////////////////////////////////////////////////////////
|
|
274
|
-
void scale(float factorX, float factorY);
|
|
275
|
-
|
|
276
|
-
////////////////////////////////////////////////////////////
|
|
277
|
-
/// \brief Scale the object
|
|
278
|
-
///
|
|
279
|
-
/// This function multiplies the current scale of the object,
|
|
280
|
-
/// unlike setScale which overwrites it.
|
|
281
|
-
/// Thus, it is equivalent to the following code:
|
|
282
|
-
/// \code
|
|
283
|
-
/// sf::Vector2f scale = object.getScale();
|
|
284
|
-
/// object.setScale(scale.x * factor.x, scale.y * factor.y);
|
|
285
|
-
/// \endcode
|
|
286
|
-
///
|
|
287
|
-
/// \param factor Scale factors
|
|
288
|
-
///
|
|
289
|
-
/// \see setScale
|
|
290
|
-
///
|
|
291
|
-
////////////////////////////////////////////////////////////
|
|
292
|
-
void scale(const Vector2f& factor);
|
|
293
|
-
|
|
294
|
-
////////////////////////////////////////////////////////////
|
|
295
|
-
/// \brief get the combined transform of the object
|
|
296
|
-
///
|
|
297
|
-
/// \return Transform combining the position/rotation/scale/origin of the object
|
|
298
|
-
///
|
|
299
|
-
/// \see getInverseTransform
|
|
300
|
-
///
|
|
301
|
-
////////////////////////////////////////////////////////////
|
|
302
|
-
const Transform& getTransform() const;
|
|
303
|
-
|
|
304
|
-
////////////////////////////////////////////////////////////
|
|
305
|
-
/// \brief get the inverse of the combined transform of the object
|
|
306
|
-
///
|
|
307
|
-
/// \return Inverse of the combined transformations applied to the object
|
|
308
|
-
///
|
|
309
|
-
/// \see getTransform
|
|
310
|
-
///
|
|
311
|
-
////////////////////////////////////////////////////////////
|
|
312
|
-
const Transform& getInverseTransform() const;
|
|
313
|
-
|
|
314
|
-
private:
|
|
315
|
-
|
|
316
|
-
////////////////////////////////////////////////////////////
|
|
317
|
-
// Member data
|
|
318
|
-
////////////////////////////////////////////////////////////
|
|
319
|
-
Vector2f m_origin; ///< Origin of translation/rotation/scaling of the object
|
|
320
|
-
Vector2f m_position; ///< Position of the object in the 2D world
|
|
321
|
-
float m_rotation; ///< Orientation of the object, in degrees
|
|
322
|
-
Vector2f m_scale; ///< Scale of the object
|
|
323
|
-
mutable Transform m_transform; ///< Combined transformation of the object
|
|
324
|
-
mutable bool m_transformNeedUpdate; ///< Does the transform need to be recomputed?
|
|
325
|
-
mutable Transform m_inverseTransform; ///< Combined transformation of the object
|
|
326
|
-
mutable bool m_inverseTransformNeedUpdate; ///< Does the transform need to be recomputed?
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
} // namespace sf
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
#endif // SFML_TRANSFORMABLE_HPP
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
////////////////////////////////////////////////////////////
|
|
336
|
-
/// \class sf::Transformable
|
|
337
|
-
/// \ingroup graphics
|
|
338
|
-
///
|
|
339
|
-
/// This class is provided for convenience, on top of sf::Transform.
|
|
340
|
-
///
|
|
341
|
-
/// sf::Transform, as a low-level class, offers a great level of
|
|
342
|
-
/// flexibility but it is not always convenient to manage. Indeed,
|
|
343
|
-
/// one can easily combine any kind of operation, such as a translation
|
|
344
|
-
/// followed by a rotation followed by a scaling, but once the result
|
|
345
|
-
/// transform is built, there's no way to go backward and, let's say,
|
|
346
|
-
/// change only the rotation without modifying the translation and scaling.
|
|
347
|
-
/// The entire transform must be recomputed, which means that you
|
|
348
|
-
/// need to retrieve the initial translation and scale factors as
|
|
349
|
-
/// well, and combine them the same way you did before updating the
|
|
350
|
-
/// rotation. This is a tedious operation, and it requires to store
|
|
351
|
-
/// all the individual components of the final transform.
|
|
352
|
-
///
|
|
353
|
-
/// That's exactly what sf::Transformable was written for: it hides
|
|
354
|
-
/// these variables and the composed transform behind an easy to use
|
|
355
|
-
/// interface. You can set or get any of the individual components
|
|
356
|
-
/// without worrying about the others. It also provides the composed
|
|
357
|
-
/// transform (as a sf::Transform), and keeps it up-to-date.
|
|
358
|
-
///
|
|
359
|
-
/// In addition to the position, rotation and scale, sf::Transformable
|
|
360
|
-
/// provides an "origin" component, which represents the local origin
|
|
361
|
-
/// of the three other components. Let's take an example with a 10x10
|
|
362
|
-
/// pixels sprite. By default, the sprite is positioned/rotated/scaled
|
|
363
|
-
/// relatively to its top-left corner, because it is the local point
|
|
364
|
-
/// (0, 0). But if we change the origin to be (5, 5), the sprite will
|
|
365
|
-
/// be positioned/rotated/scaled around its center instead. And if
|
|
366
|
-
/// we set the origin to (10, 10), it will be transformed around its
|
|
367
|
-
/// bottom-right corner.
|
|
368
|
-
///
|
|
369
|
-
/// To keep the sf::Transformable class simple, there's only one
|
|
370
|
-
/// origin for all the components. You cannot position the sprite
|
|
371
|
-
/// relatively to its top-left corner while rotating it around its
|
|
372
|
-
/// center, for example. To do such things, use sf::Transform directly.
|
|
373
|
-
///
|
|
374
|
-
/// sf::Transformable can be used as a base class. It is often
|
|
375
|
-
/// combined with sf::Drawable -- that's what SFML's sprites,
|
|
376
|
-
/// texts and shapes do.
|
|
377
|
-
/// \code
|
|
378
|
-
/// class MyEntity : public sf::Transformable, public sf::Drawable
|
|
379
|
-
/// {
|
|
380
|
-
/// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const
|
|
381
|
-
/// {
|
|
382
|
-
/// states.transform *= getTransform();
|
|
383
|
-
/// target.draw(..., states);
|
|
384
|
-
/// }
|
|
385
|
-
/// };
|
|
386
|
-
///
|
|
387
|
-
/// MyEntity entity;
|
|
388
|
-
/// entity.setPosition(10, 20);
|
|
389
|
-
/// entity.setRotation(45);
|
|
390
|
-
/// window.draw(entity);
|
|
391
|
-
/// \endcode
|
|
392
|
-
///
|
|
393
|
-
/// It can also be used as a member, if you don't want to use
|
|
394
|
-
/// its API directly (because you don't need all its functions,
|
|
395
|
-
/// or you have different naming conventions for example).
|
|
396
|
-
/// \code
|
|
397
|
-
/// class MyEntity
|
|
398
|
-
/// {
|
|
399
|
-
/// public:
|
|
400
|
-
/// void SetPosition(const MyVector& v)
|
|
401
|
-
/// {
|
|
402
|
-
/// myTransform.setPosition(v.x(), v.y());
|
|
403
|
-
/// }
|
|
404
|
-
///
|
|
405
|
-
/// void Draw(sf::RenderTarget& target) const
|
|
406
|
-
/// {
|
|
407
|
-
/// target.draw(..., myTransform.getTransform());
|
|
408
|
-
/// }
|
|
409
|
-
///
|
|
410
|
-
/// private:
|
|
411
|
-
/// sf::Transformable myTransform;
|
|
412
|
-
/// };
|
|
413
|
-
/// \endcode
|
|
414
|
-
///
|
|
415
|
-
/// A note on coordinates and undistorted rendering: \n
|
|
416
|
-
/// By default, SFML (or more exactly, OpenGL) may interpolate drawable objects
|
|
417
|
-
/// such as sprites or texts when rendering. While this allows transitions
|
|
418
|
-
/// like slow movements or rotations to appear smoothly, it can lead to
|
|
419
|
-
/// unwanted results in some cases, for example blurred or distorted objects.
|
|
420
|
-
/// In order to render a sf::Drawable object pixel-perfectly, make sure
|
|
421
|
-
/// the involved coordinates allow a 1:1 mapping of pixels in the window
|
|
422
|
-
/// to texels (pixels in the texture). More specifically, this means:
|
|
423
|
-
/// * The object's position, origin and scale have no fractional part
|
|
424
|
-
/// * The object's and the view's rotation are a multiple of 90 degrees
|
|
425
|
-
/// * The view's center and size have no fractional part
|
|
426
|
-
///
|
|
427
|
-
/// \see sf::Transform
|
|
428
|
-
///
|
|
429
|
-
////////////////////////////////////////////////////////////
|