Add tablet integration and refactor curve utilities #84
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IllusionMods/IllusionModdingAPI!84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduced a new
Tabletclass utilizing WinTabAPI for tablet input handling, including support for pressure sensitivity and data processing. Replaced legacy Bezier functionality inSmartRectwith a generic solver function and migrated curve logic to a dedicatedCurveutility for cleaner code and maintainability.Is good but
@ -0,0 +1,251 @@using MonoMod.Cil;Is this class supposed to be internal?
@ -0,0 +186,4 @@private int _bufferSize;private IntPtr _packetBuffer;public float CurrentPressureNo summary
@ -0,0 +477,4 @@return ushort.MaxValue;}public void Dispose()Either add a summary or make this an explicit interface implementation
Pull Request Overview
Adds tablet integration capabilities with a dedicated
Tabletclass using WinTabAPI for pressure-sensitive input and refactors curve utilities for better code organization. The changes replace legacy Bezier functionality with a generic solver pattern and consolidate curve logic into a dedicated utility class.SmartRectto use generic solver functions instead of hardcoded Bezier templatesCurveutility class with various interpolation methodsReviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -0,0 +192,4 @@/// <returns>An array of <see cref="Vector3"/> containing the resampled polyline points.</returns>/// <remarks>Does not work with <see cref="Bezier(UnityEngine.Vector4,UnityEngine.Vector4,UnityEngine.Vector4,UnityEngine.Vector4,float)"/> for <paramref name="solver"/></remarks>public static Vector3[] ResamplePoly(Vector3[] points, int count, bool smooth = false,RuntimeILReferenceBag.FastDelegateInvokers.Func<Vector3, Vector3, Vector3, Vector3, float, Vector3> solver = null)Using
RuntimeILReferenceBag.FastDelegateInvokers.Funcinstead of the standardSystem.Funcdelegate appears unusual and may create unnecessary dependencies. Consider using the standardFunc<Vector3, Vector3, Vector3, Vector3, float, Vector3>unless there's a specific performance requirement.@ -0,0 +361,4 @@/// </returns>public bool QueryMulti(out Packet[] data){data = new Packet[0];Use
Array.Empty<Packet>()instead ofnew Packet[0]for better performance and clarity.@ -0,0 +1,155 @@using System;Empty catch block silently swallows exceptions. Consider logging the exception or at least documenting why it's intentionally ignored.
The null-conditional operator is redundant since there's already a null check on line 76. Use
_timer.Dispose();directly.@ -0,0 +361,4 @@/// </returns>public bool QueryMulti(out Packet[] data){data = new Packet[0];Array.Empty is not available in v3.5
@ -0,0 +1,155 @@using System;@ -0,0 +1,251 @@using MonoMod.Cil;Missing docs