Skip to content

Commit f5ec4ac

Browse files
committed
renaming
1 parent 7115883 commit f5ec4ac

File tree

6 files changed

+65
-65
lines changed

6 files changed

+65
-65
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ More information on OpenVR and SteamVR can be found on http://steamvr.com
2626
- original comments preserved and properly formatted
2727
- every struct method is offered also much more user friendly offering also full interoperability with glm, `getProjectionMatrix` returns, for example, directly a glm `Mat4`
2828
```kotlin
29-
IVRSystem.GetProjectionMatrix(eEye: Int, fNearZ: Float, fFarZ: Float): HmdMatrix44_t.ByValue
29+
IVRSystem.GetProjectionMatrix(eEye: Int, fNearZ: Float, fFarZ: Float): HmdMatrix44.ByValue
3030
```
3131
because of the jna binding requirements, shall be called as:
3232
```kotlin
33-
IVRSystem.GetProjectionMatrix.invoke(eEye: Int, fNearZ: Float, fFarZ: Float): HmdMatrix44_t.ByValue
33+
IVRSystem.GetProjectionMatrix.invoke(eEye: Int, fNearZ: Float, fFarZ: Float): HmdMatrix44.ByValue
3434
```
3535
but there is also the possibility to simply call:
3636
```kotlin
@@ -48,7 +48,7 @@ getStringTrackedDeviceProperty(..): String
4848
```
4949
that returns directly the resulting string, bringing down a lot of boilerplate code
5050

51-
- array classes `[]` operator, included `RenderModel_Vertex_t`
51+
- array classes `[]` operator, included `RenderModel_Vertex`
5252
- concise enumerators, e.g. `EVRComponentProperty.VRComponentProperty_IsStatic` is `EVRComponentProperty.IsStatic`
5353
- `SteamVRListener` for event listener. Instantiate a class extending it, call `.poll()` on it at the begin of each frame and override the corresponding methods you are looking for, such as `buttonPress(left: Boolean, button: EVRButtonId)`
5454

src/main/kotlin/openvr/lib/ivrApplication.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ open class IVRApplications : Structure {
8888
}
8989

9090
/** Launches an instance of an application of value template, with its app key being newAppKey (which must be unique) and optionally override sections
91-
* from the manifest file via openvr.lib.AppOverrideKeys_t */
92-
fun launchTemplateApplication(templateAppKey: String, newAppKey: String, keys: AppOverrideKeys_t.ByReference, keysCount: Int) = EVRApplicationError.of(LaunchTemplateApplication!!.invoke(templateAppKey, newAppKey, keys, keysCount))
91+
* from the manifest file via openvr.lib.AppOverrideKeys */
92+
fun launchTemplateApplication(templateAppKey: String, newAppKey: String, keys: AppOverrideKeys.ByReference, keysCount: Int) = EVRApplicationError.of(LaunchTemplateApplication!!.invoke(templateAppKey, newAppKey, keys, keysCount))
9393

9494
@JvmField
9595
var LaunchTemplateApplication: LaunchTemplateApplication_callback? = null
9696

9797
interface LaunchTemplateApplication_callback : Callback {
98-
fun invoke(pchTemplateAppKey: String, pchNewAppKey: String, pKeys: AppOverrideKeys_t.ByReference, unKeys: Int): Int
98+
fun invoke(pchTemplateAppKey: String, pchNewAppKey: String, pKeys: AppOverrideKeys.ByReference, unKeys: Int): Int
9999
}
100100

101101
/** launches the application currently associated with this mime value and passes it the option args, typically the filename or object name of the item being

src/main/kotlin/openvr/lib/ivrNotifications.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import java.util.*
99
// ivrnotifications.h =============================================================================================================================================
1010

1111
// Used for passing graphic data
12-
open class NotificationBitmap_t : Structure {
12+
open class NotificationBitmap : Structure {
1313

1414
@JvmField
1515
var imageData: Pointer? = null
@@ -33,8 +33,8 @@ open class NotificationBitmap_t : Structure {
3333
read()
3434
}
3535

36-
class ByReference : NotificationBitmap_t(), Structure.ByReference
37-
class ByValue : NotificationBitmap_t(), Structure.ByValue
36+
class ByReference : NotificationBitmap(), Structure.ByReference
37+
class ByValue : NotificationBitmap(), Structure.ByValue
3838
}
3939

4040
/** Be aware that the notification value is used as 'priority' to pick the next notification */
@@ -96,12 +96,12 @@ open class IVRNotifications : Structure {
9696
* An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it.
9797
* To create a two-line notification, use a line break ('\n') to split the text into two lines.
9898
* The image argument may be NULL, in which case the specified overlay's icon will be used instead. */
99-
fun createNotification(overlayHandle: VROverlayHandle, userValue: Long, type: EVRNotificationType, text: String, style: EVRNotificationStyle, image: NotificationBitmap_t.ByReference, /* out */ notificationId: VRNotificationId_ByReference) = EVRNotificationError.of(CreateNotification!!(overlayHandle, userValue, type.i, text, style.i, image, notificationId))
99+
fun createNotification(overlayHandle: VROverlayHandle, userValue: Long, type: EVRNotificationType, text: String, style: EVRNotificationStyle, image: NotificationBitmap.ByReference, /* out */ notificationId: VRNotificationId_ByReference) = EVRNotificationError.of(CreateNotification!!(overlayHandle, userValue, type.i, text, style.i, image, notificationId))
100100

101101
@JvmField var CreateNotification: CreateNotification_callback? = null
102102

103103
interface CreateNotification_callback : Callback {
104-
operator fun invoke(ulOverlayHandle: VROverlayHandle, ulUserValue: Long, type: Int, pchText: String, style: Int, pImage: NotificationBitmap_t.ByReference, /* out */ pNotificationId: VRNotificationId_ByReference): Int
104+
operator fun invoke(ulOverlayHandle: VROverlayHandle, ulUserValue: Long, type: Int, pchText: String, style: Int, pImage: NotificationBitmap.ByReference, /* out */ pNotificationId: VRNotificationId_ByReference): Int
105105
}
106106

107107
/** Destroy a notification, hiding it first if it currently shown to the user. */

src/main/kotlin/openvr/lib/ivrOverlay.kt

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ enum class VROverlayFlags(@JvmField val i: Int) {
7979
/** Indicates that the overlay should dim/brighten to show gamepad focus */
8080
ShowGamepadFocus(5),
8181

82-
/** When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t */
82+
/** When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll */
8383
SendVRScrollEvents(6),
8484
SendVRTouchpadEvents(7),
8585

@@ -128,7 +128,7 @@ enum class VRMessageOverlayResponse(@JvmField val i: Int) {
128128
}
129129
}
130130

131-
open class VROverlayIntersectionParams_t : Structure {
131+
open class VROverlayIntersectionParams : Structure {
132132

133133
@JvmField
134134
var source = HmdVec3()
@@ -156,11 +156,11 @@ open class VROverlayIntersectionParams_t : Structure {
156156
read()
157157
}
158158

159-
class ByReference : VROverlayIntersectionParams_t(), Structure.ByReference
160-
class ByValue : VROverlayIntersectionParams_t(), Structure.ByValue
159+
class ByReference : VROverlayIntersectionParams(), Structure.ByReference
160+
class ByValue : VROverlayIntersectionParams(), Structure.ByValue
161161
}
162162

163-
open class VROverlayIntersectionResults_t : Structure {
163+
open class VROverlayIntersectionResults : Structure {
164164

165165
@JvmField
166166
var point = HmdVec3()
@@ -186,8 +186,8 @@ open class VROverlayIntersectionResults_t : Structure {
186186
read()
187187
}
188188

189-
class ByReference : VROverlayIntersectionResults_t(), Structure.ByReference
190-
class ByValue : VROverlayIntersectionResults_t(), Structure.ByValue
189+
class ByReference : VROverlayIntersectionResults(), Structure.ByReference
190+
class ByValue : VROverlayIntersectionResults(), Structure.ByValue
191191
}
192192

193193
// Input modes for the Big Picture gamepad text entry
@@ -238,7 +238,7 @@ enum class EVROverlayIntersectionMaskPrimitiveType(@JvmField val i: Int) {
238238
}
239239
}
240240

241-
open class IntersectionMaskRectangle_t : Structure {
241+
open class IntersectionMaskRectangle : Structure {
242242

243243
@JvmField
244244
var topLeftX = 0f
@@ -264,11 +264,11 @@ open class IntersectionMaskRectangle_t : Structure {
264264
read()
265265
}
266266

267-
class ByReference : IntersectionMaskRectangle_t(), Structure.ByReference
268-
class ByValue : IntersectionMaskRectangle_t(), Structure.ByValue
267+
class ByReference : IntersectionMaskRectangle(), Structure.ByReference
268+
class ByValue : IntersectionMaskRectangle(), Structure.ByValue
269269
}
270270

271-
open class IntersectionMaskCircle_t : Structure {
271+
open class IntersectionMaskCircle : Structure {
272272

273273
@JvmField
274274
var centerX = 0f
@@ -291,32 +291,32 @@ open class IntersectionMaskCircle_t : Structure {
291291
read()
292292
}
293293

294-
class ByReference : IntersectionMaskRectangle_t(), Structure.ByReference
295-
class ByValue : IntersectionMaskRectangle_t(), Structure.ByValue
294+
class ByReference : IntersectionMaskRectangle(), Structure.ByReference
295+
class ByValue : IntersectionMaskRectangle(), Structure.ByValue
296296
}
297297

298298
/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */
299-
abstract class VROverlayIntersectionMaskPrimitive_Data_t : Union() {
299+
abstract class VROverlayIntersectionMaskPrimitive_Data : Union() {
300300

301-
class ByValue : VROverlayIntersectionMaskPrimitive_Data_t(), Structure.ByValue
301+
class ByValue : VROverlayIntersectionMaskPrimitive_Data(), Structure.ByValue
302302

303-
var rectangle: IntersectionMaskRectangle_t? = null
304-
var circle: IntersectionMaskCircle_t? = null
303+
var rectangle: IntersectionMaskRectangle? = null
304+
var circle: IntersectionMaskCircle? = null
305305
}
306306

307-
open class VROverlayIntersectionMaskPrimitive_t : Structure {
307+
open class VROverlayIntersectionMaskPrimitive : Structure {
308308

309309
@JvmField
310310
var primitiveType = 0
311311
@JvmField
312-
var primitive: VROverlayIntersectionMaskPrimitive_Data_t? = null
312+
var primitive: VROverlayIntersectionMaskPrimitive_Data? = null
313313

314314
constructor()
315315

316-
constructor(primitiveType: EVROverlayIntersectionMaskPrimitiveType, primitive: VROverlayIntersectionMaskPrimitive_Data_t) :
316+
constructor(primitiveType: EVROverlayIntersectionMaskPrimitiveType, primitive: VROverlayIntersectionMaskPrimitive_Data) :
317317
this(primitiveType.i, primitive)
318318

319-
constructor(m_nPrimitiveType: Int, m_Primitive: VROverlayIntersectionMaskPrimitive_Data_t) {
319+
constructor(m_nPrimitiveType: Int, m_Primitive: VROverlayIntersectionMaskPrimitive_Data) {
320320
this.primitiveType = m_nPrimitiveType
321321
this.primitive = m_Primitive
322322
}
@@ -327,8 +327,8 @@ open class VROverlayIntersectionMaskPrimitive_t : Structure {
327327
read()
328328
}
329329

330-
class ByReference : VROverlayIntersectionMaskPrimitive_t(), Structure.ByReference
331-
class ByValue : VROverlayIntersectionMaskPrimitive_t(), Structure.ByValue
330+
class ByReference : VROverlayIntersectionMaskPrimitive(), Structure.ByReference
331+
class ByValue : VROverlayIntersectionMaskPrimitive(), Structure.ByValue
332332
}
333333

334334
open class IVROverlay : Structure {
@@ -898,13 +898,13 @@ open class IVROverlay : Structure {
898898

899899
/** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the specified settings. Returns false if there is no
900900
* intersection. */
901-
fun computeOverlayIntersection(overlayHandle: VROverlayHandle, params: VROverlayIntersectionParams_t.ByReference, results: VROverlayIntersectionResults_t.ByReference) = ComputeOverlayIntersection!!(overlayHandle, params, results)
901+
fun computeOverlayIntersection(overlayHandle: VROverlayHandle, params: VROverlayIntersectionParams.ByReference, results: VROverlayIntersectionResults.ByReference) = ComputeOverlayIntersection!!(overlayHandle, params, results)
902902

903903
@JvmField
904904
var ComputeOverlayIntersection: ComputeOverlayIntersection_callback? = null
905905

906906
interface ComputeOverlayIntersection_callback : Callback {
907-
operator fun invoke(ulOverlayHandle: VROverlayHandle, pParams: VROverlayIntersectionParams_t.ByReference, pResults: VROverlayIntersectionResults_t.ByReference): Boolean
907+
operator fun invoke(ulOverlayHandle: VROverlayHandle, pParams: VROverlayIntersectionParams.ByReference, pResults: VROverlayIntersectionResults.ByReference): Boolean
908908
}
909909

910910
/** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" by the virtual mouse
@@ -1223,13 +1223,13 @@ open class IVROverlay : Structure {
12231223
/** Sets a list of primitives to be used for controller ray intersection typically the size of the underlying UI in pixels
12241224
* (not in world space). */
12251225
@JvmOverloads
1226-
fun setOverlayIntersectionMask(overlayHandle: VROverlayHandle, maskPrimitives: VROverlayIntersectionMaskPrimitive_t.ByReference, numMaskPrimitives: Int, primitiveSize: Int = Int.BYTES + Pointer.SIZE) = SetOverlayIntersectionMask!!(overlayHandle, maskPrimitives, numMaskPrimitives, primitiveSize)
1226+
fun setOverlayIntersectionMask(overlayHandle: VROverlayHandle, maskPrimitives: VROverlayIntersectionMaskPrimitive.ByReference, numMaskPrimitives: Int, primitiveSize: Int = Int.BYTES + Pointer.SIZE) = SetOverlayIntersectionMask!!(overlayHandle, maskPrimitives, numMaskPrimitives, primitiveSize)
12271227

12281228
@JvmField
12291229
var SetOverlayIntersectionMask: SetOverlayIntersectionMask_callback? = null
12301230

12311231
interface SetOverlayIntersectionMask_callback : Callback {
1232-
operator fun invoke(ulOverlayHandle: VROverlayHandle, pMaskPrimitives: VROverlayIntersectionMaskPrimitive_t.ByReference, unNumMaskPrimitives: Int, unPrimitiveSize: Int): EVROverlayError
1232+
operator fun invoke(ulOverlayHandle: VROverlayHandle, pMaskPrimitives: VROverlayIntersectionMaskPrimitive.ByReference, unNumMaskPrimitives: Int, unPrimitiveSize: Int): EVROverlayError
12331233
}
12341234

12351235

0 commit comments

Comments
 (0)