add physX settings through the setting window for editor
This commit is contained in:
@ -185,6 +185,12 @@ namespace Prism
|
||||
|
||||
public class RigidBodyComponent : Component
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
Static,
|
||||
Dynamic
|
||||
}
|
||||
|
||||
public enum ForceMode
|
||||
{
|
||||
Force = 0,
|
||||
@ -192,6 +198,14 @@ namespace Prism
|
||||
VelocityChange,
|
||||
Acceleration
|
||||
}
|
||||
|
||||
public Type BodyType
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetBodyType_Native(Entity.ID);
|
||||
}
|
||||
}
|
||||
|
||||
public float Mass
|
||||
{
|
||||
@ -226,6 +240,17 @@ namespace Prism
|
||||
SetLinearVelocity_Native(Entity.ID, ref velocity);
|
||||
}
|
||||
|
||||
public Vec3 GetAngularVelocity()
|
||||
{
|
||||
GetAngularVelocity_Native(Entity.ID, out Vec3 velocity);
|
||||
return velocity;
|
||||
}
|
||||
|
||||
public void SetAngularVelocity(Vec3 velocity)
|
||||
{
|
||||
SetAngularVelocity_Native(Entity.ID, ref velocity);
|
||||
}
|
||||
|
||||
public void Rotate(Vec3 rotation)
|
||||
{
|
||||
Rotate_Native(Entity.ID, ref rotation);
|
||||
@ -243,6 +268,12 @@ namespace Prism
|
||||
internal static extern void GetLinearVelocity_Native(ulong entityID, out Vec3 velocity);
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void SetLinearVelocity_Native(ulong entityID, ref Vec3 velocity);
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
|
||||
internal static extern void GetAngularVelocity_Native(ulong entityID, out Vec3 velocity);
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void SetAngularVelocity_Native(ulong entityID, ref Vec3 velocity);
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rotate_Native(ulong entityID, ref Vec3 rotation);
|
||||
@ -252,8 +283,12 @@ namespace Prism
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern float GetMass_Native(ulong entityID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern float SetMass_Native(ulong entityID, float mass);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern Type GetBodyType_Native(ulong entityID);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user