@@ -352,7 +352,7 @@ public void SetFaceMaterialSlotIndexs(IEnumerable<short> iem) {
352
352
BMapException . ThrowIfFailed ( BMap . BMMesh_GetFaceMaterialSlotIndexs ( getPointer ( ) , getCKID ( ) , out IntPtr out_mem ) ) ;
353
353
Utils . ShortAssigner ( out_mem , GetFaceCount ( ) , iem ) ;
354
354
}
355
-
355
+
356
356
public uint GetMaterialSlotCount ( ) => getGenericValue < uint > ( BMap . BMMesh_GetMaterialSlotCount ) ;
357
357
public void SetMaterialSlotCount ( uint count ) => setGenericValue < uint > ( BMap . BMMesh_SetMaterialSlotCount , count ) ;
358
358
public IEnumerable < BMMaterial > GetMaterialSlots ( ) {
@@ -375,24 +375,61 @@ public void SetMaterialSlots(IEnumerable<BMMaterial> iem) {
375
375
376
376
}
377
377
378
- public class BM3dObject : BMObject {
379
- internal BM3dObject ( IntPtr raw_pointer , uint ckid ) : base ( raw_pointer , ckid ) { }
378
+ public class BM3dEntity : BMObject {
379
+ internal BM3dEntity ( IntPtr raw_pointer , uint ckid ) : base ( raw_pointer , ckid ) { }
380
380
381
- public VxMatrix GetWorldMatrix ( ) => getGenericValue < VxMatrix > ( BMap . BM3dObject_GetWorldMatrix ) ;
382
- public void SetWorldMatrix ( VxMatrix mat ) => setGenericValue < VxMatrix > ( BMap . BM3dObject_SetWorldMatrix , mat ) ;
381
+ public VxMatrix GetWorldMatrix ( ) => getGenericValue < VxMatrix > ( BMap . BM3dEntity_GetWorldMatrix ) ;
382
+ public void SetWorldMatrix ( VxMatrix mat ) => setGenericValue < VxMatrix > ( BMap . BM3dEntity_SetWorldMatrix , mat ) ;
383
383
384
384
public BMMesh GetCurrentMesh ( ) {
385
- BMapException . ThrowIfFailed ( BMap . BM3dObject_GetCurrentMesh ( getPointer ( ) , getCKID ( ) , out uint out_meshid ) ) ;
385
+ BMapException . ThrowIfFailed ( BMap . BM3dEntity_GetCurrentMesh ( getPointer ( ) , getCKID ( ) , out uint out_meshid ) ) ;
386
386
if ( out_meshid == Utils . INVALID_CKID ) return null ;
387
387
else return new BMMesh ( getPointer ( ) , out_meshid ) ;
388
388
}
389
389
public void SetCurrentMesh ( BMMesh mesh ) {
390
390
uint meshid = ( mesh is null ) ? Utils . INVALID_CKID : mesh . getCKID ( ) ;
391
- BMapException . ThrowIfFailed ( BMap . BM3dObject_SetCurrentMesh ( getPointer ( ) , getCKID ( ) , meshid ) ) ;
391
+ BMapException . ThrowIfFailed ( BMap . BM3dEntity_SetCurrentMesh ( getPointer ( ) , getCKID ( ) , meshid ) ) ;
392
392
}
393
393
394
- public bool GetVisibility ( ) => getGenericValue < bool > ( BMap . BM3dObject_GetVisibility ) ;
395
- public void SetVisibility ( bool visb ) => setGenericValue < bool > ( BMap . BM3dObject_SetVisibility , visb ) ;
394
+ public bool GetVisibility ( ) => getGenericValue < bool > ( BMap . BM3dEntity_GetVisibility ) ;
395
+ public void SetVisibility ( bool visb ) => setGenericValue < bool > ( BMap . BM3dEntity_SetVisibility , visb ) ;
396
+ }
397
+
398
+ public class BM3dObject : BM3dEntity {
399
+ internal BM3dObject ( IntPtr raw_pointer , uint ckid ) : base ( raw_pointer , ckid ) { }
400
+ }
401
+
402
+ public class BMLight : BM3dEntity {
403
+ internal BMLight ( IntPtr raw_pointer , uint ckid ) : base ( raw_pointer , ckid ) { }
404
+
405
+ // Name `GetType` is conflict with C# base class function name.
406
+ // So we add a `Light` prefix for it.
407
+ public VXLIGHT_TYPE GetLightType ( ) => getGenericValue < VXLIGHT_TYPE > ( BMap . BMLight_GetType ) ;
408
+ public void SetLightType ( VXLIGHT_TYPE val ) => setGenericValue < VXLIGHT_TYPE > ( BMap . BMLight_SetType , val ) ;
409
+
410
+ public VxColor GetColor ( ) => getGenericValue < VxColor > ( BMap . BMLight_GetColor ) ;
411
+ public void SetColor ( VxColor col ) => setGenericValue < VxColor > ( BMap . BMLight_SetColor , col ) ;
412
+
413
+ public float GetConstantAttenuation ( ) => getGenericValue < float > ( BMap . BMLight_GetConstantAttenuation ) ;
414
+ public void SetConstantAttenuation ( float val ) => setGenericValue < float > ( BMap . BMLight_SetConstantAttenuation , val ) ;
415
+ public float GetLinearAttenuation ( ) => getGenericValue < float > ( BMap . BMLight_GetLinearAttenuation ) ;
416
+ public void SetLinearAttenuation ( float val ) => setGenericValue < float > ( BMap . BMLight_SetLinearAttenuation , val ) ;
417
+ public float GetQuadraticAttenuation ( ) => getGenericValue < float > ( BMap . BMLight_GetQuadraticAttenuation ) ;
418
+ public void SetQuadraticAttenuation ( float val ) => setGenericValue < float > ( BMap . BMLight_SetQuadraticAttenuation , val ) ;
419
+
420
+ public float GetRange ( ) => getGenericValue < float > ( BMap . BMLight_GetRange ) ;
421
+ public void SetRange ( float val ) => setGenericValue < float > ( BMap . BMLight_SetRange , val ) ;
422
+
423
+ public float GetHotSpot ( ) => getGenericValue < float > ( BMap . BMLight_GetHotSpot ) ;
424
+ public void SetHotSpot ( float val ) => setGenericValue < float > ( BMap . BMLight_SetHotSpot , val ) ;
425
+ public float GetFalloff ( ) => getGenericValue < float > ( BMap . BMLight_GetFalloff ) ;
426
+ public void SetFalloff ( float val ) => setGenericValue < float > ( BMap . BMLight_SetFalloff , val ) ;
427
+ public float GetFalloffShape ( ) => getGenericValue < float > ( BMap . BMLight_GetFalloffShape ) ;
428
+ public void SetFalloffShape ( float val ) => setGenericValue < float > ( BMap . BMLight_SetFalloffShape , val ) ;
429
+ }
430
+
431
+ public class BMTargetLight : BMLight {
432
+ internal BMTargetLight ( IntPtr raw_pointer , uint ckid ) : base ( raw_pointer , ckid ) { }
396
433
}
397
434
398
435
public class BMGroup : BMObject {
@@ -463,6 +500,10 @@ public uint GetGroupCount() =>
463
500
getCKObjectCount ( BMap . BMFile_GetGroupCount ) ;
464
501
public IEnumerable < BMGroup > GetGroups ( ) =>
465
502
getCKObjects < BMGroup > ( BMap . BMFile_GetGroupCount , BMap . BMFile_GetGroup , ( bmf , id ) => new BMGroup ( bmf , id ) ) ;
503
+ public uint GetTargetLightCount ( ) =>
504
+ getCKObjectCount ( BMap . BMFile_GetTargetLightCount ) ;
505
+ public IEnumerable < BMTargetLight > GetTargetLights ( ) =>
506
+ getCKObjects < BMTargetLight > ( BMap . BMFile_GetTargetLightCount , BMap . BMFile_GetTargetLight , ( bmf , id ) => new BMTargetLight ( bmf , id ) ) ;
466
507
467
508
}
468
509
@@ -504,6 +545,7 @@ private T createCKObject<T>(FctProtoCreateObject fct_crt, FctProtoCreateInstance
504
545
public BMMesh CreateMesh ( ) => createCKObject < BMMesh > ( BMap . BMFile_CreateMesh , ( bmf , id ) => new BMMesh ( bmf , id ) ) ;
505
546
public BM3dObject Create3dObject ( ) => createCKObject < BM3dObject > ( BMap . BMFile_Create3dObject , ( bmf , id ) => new BM3dObject ( bmf , id ) ) ;
506
547
public BMGroup CreateGroup ( ) => createCKObject < BMGroup > ( BMap . BMFile_CreateGroup , ( bmf , id ) => new BMGroup ( bmf , id ) ) ;
548
+ public BMTargetLight CreateTargetLight ( ) => createCKObject < BMTargetLight > ( BMap . BMFile_CreateTargetLight , ( bmf , id ) => new BMTargetLight ( bmf , id ) ) ;
507
549
}
508
550
509
551
public sealed class BMMeshTrans : AbstractPointer {
0 commit comments