BulletSim: Add RawPosition and RawOrientation to BSPhysObject and rename MassRaw to RawMass. Fix BSShapeCollection to use Raw* for creating the body to eliminate exception from referencing the physical body before it has been created.

This commit is contained in:
Robert Adams
2012-11-01 10:53:55 -07:00
parent 39c02dcc8c
commit f53b4e7a21
5 changed files with 39 additions and 17 deletions

View File

@@ -63,7 +63,7 @@ public abstract class BSPhysObject : PhysicsActor
public BSLinkset Linkset { get; set; }
// Return the object mass without calculating it or having side effects
public abstract float MassRaw { get; }
public abstract float RawMass { get; }
// Set the raw mass but also update physical mass properties (inertia, ...)
public abstract void UpdatePhysicalMassProperties(float mass);
@@ -105,8 +105,10 @@ public abstract class BSPhysObject : PhysicsActor
// Tell the object to clean up.
public abstract void Destroy();
public abstract OMV.Vector3 RawPosition { get; set; }
public abstract OMV.Vector3 ForcePosition { get; set; }
public abstract OMV.Quaternion RawOrientation { get; set; }
public abstract OMV.Quaternion ForceOrientation { get; set; }
public abstract OMV.Vector3 ForceVelocity { get; set; }