BulletSim: change physical data structures to classes. Add default
instantiations for PhysBody and PhysShape when BSPhysObject is created to account for them being classes and not structures. Update TODO list.0.7.5-pf-bulletsim
parent
4914d6c0ea
commit
203588e3c0
|
@ -48,12 +48,15 @@ public sealed class BSLinksetConstraints : BSLinkset
|
||||||
{
|
{
|
||||||
base.Refresh(requestor);
|
base.Refresh(requestor);
|
||||||
|
|
||||||
// Queue to happen after all the other taint processing
|
if (HasAnyChildren && IsRoot(requestor))
|
||||||
PhysicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
|
{
|
||||||
{
|
// Queue to happen after all the other taint processing
|
||||||
if (HasAnyChildren && IsRoot(requestor))
|
PhysicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
|
||||||
RecomputeLinksetConstraints();
|
{
|
||||||
});
|
if (HasAnyChildren && IsRoot(requestor))
|
||||||
|
RecomputeLinksetConstraints();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The object is going dynamic (physical). Do any setup necessary
|
// The object is going dynamic (physical). Do any setup necessary
|
||||||
|
|
|
@ -67,6 +67,11 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
PhysObjectName = name;
|
PhysObjectName = name;
|
||||||
TypeName = typeName;
|
TypeName = typeName;
|
||||||
|
|
||||||
|
// We don't have any physical representation yet.
|
||||||
|
PhysBody = new BulletBody(localID);
|
||||||
|
PhysShape = new BulletShape();
|
||||||
|
|
||||||
|
// A linkset of just me
|
||||||
Linkset = BSLinkset.Factory(PhysicsScene, this);
|
Linkset = BSLinkset.Factory(PhysicsScene, this);
|
||||||
LastAssetBuildFailed = false;
|
LastAssetBuildFailed = false;
|
||||||
|
|
||||||
|
|
|
@ -111,10 +111,7 @@ public sealed class BSPrim : BSPhysObject
|
||||||
|
|
||||||
_mass = CalculateMass();
|
_mass = CalculateMass();
|
||||||
|
|
||||||
// No body or shape yet
|
// Cause linkset variables to be initialized (like mass)
|
||||||
PhysBody = new BulletBody(LocalID);
|
|
||||||
PhysShape = new BulletShape();
|
|
||||||
|
|
||||||
Linkset.Refresh(this);
|
Linkset.Refresh(this);
|
||||||
|
|
||||||
DetailLog("{0},BSPrim.constructor,call", LocalID);
|
DetailLog("{0},BSPrim.constructor,call", LocalID);
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
||||||
// These hold pointers to allocated objects in the unmanaged space.
|
// These hold pointers to allocated objects in the unmanaged space.
|
||||||
|
|
||||||
// The physics engine controller class created at initialization
|
// The physics engine controller class created at initialization
|
||||||
public struct BulletWorld
|
public class BulletWorld
|
||||||
{
|
{
|
||||||
public BulletWorld(uint worldId, BSScene bss, IntPtr xx)
|
public BulletWorld(uint worldId, BSScene bss, IntPtr xx)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ public struct BulletWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
// An allocated Bullet btRigidBody
|
// An allocated Bullet btRigidBody
|
||||||
public struct BulletBody
|
public class BulletBody
|
||||||
{
|
{
|
||||||
public BulletBody(uint id) : this(id, IntPtr.Zero)
|
public BulletBody(uint id) : this(id, IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
@ -96,9 +96,14 @@ public struct BulletBody
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct BulletShape
|
public class BulletShape
|
||||||
{
|
{
|
||||||
public BulletShape(IntPtr xx) : this(xx, BSPhysicsShapeType.SHAPE_UNKNOWN)
|
public BulletShape()
|
||||||
|
: this(IntPtr.Zero, BSPhysicsShapeType.SHAPE_UNKNOWN)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public BulletShape(IntPtr xx)
|
||||||
|
: this(xx, BSPhysicsShapeType.SHAPE_UNKNOWN)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public BulletShape(IntPtr xx, BSPhysicsShapeType typ)
|
public BulletShape(IntPtr xx, BSPhysicsShapeType typ)
|
||||||
|
@ -136,7 +141,7 @@ public struct BulletShape
|
||||||
}
|
}
|
||||||
|
|
||||||
// An allocated Bullet btConstraint
|
// An allocated Bullet btConstraint
|
||||||
public struct BulletConstraint
|
public class BulletConstraint
|
||||||
{
|
{
|
||||||
public BulletConstraint(IntPtr xx)
|
public BulletConstraint(IntPtr xx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,6 +97,9 @@ Selecting and deselecting physical objects causes CPU processing time to jump
|
||||||
Re-implement buoyancy as a separate force on the object rather than diddling gravity.
|
Re-implement buoyancy as a separate force on the object rather than diddling gravity.
|
||||||
Register a pre-step event to add the force.
|
Register a pre-step event to add the force.
|
||||||
More efficient memory usage when passing hull information from BSPrim to BulletSim
|
More efficient memory usage when passing hull information from BSPrim to BulletSim
|
||||||
|
Avatar movement motor check for zero or small movement. Somehow suppress small movements
|
||||||
|
when avatar has stopped and is just standing. Simple test for near zero has
|
||||||
|
the problem of preventing starting up (increase from zero) especially when falling.
|
||||||
|
|
||||||
LINKSETS
|
LINKSETS
|
||||||
======================================================
|
======================================================
|
||||||
|
@ -195,6 +198,7 @@ Should taints check for existance or activeness of target?
|
||||||
keeps the object from being freed, but that is just an accident.
|
keeps the object from being freed, but that is just an accident.
|
||||||
Possibly have and 'active' flag that is checked by the taint processor?
|
Possibly have and 'active' flag that is checked by the taint processor?
|
||||||
Parameters for physics logging should be moved from BSScene to BSParam (at least boolean ones)
|
Parameters for physics logging should be moved from BSScene to BSParam (at least boolean ones)
|
||||||
|
Can some of the physical wrapper classes (BulletBody, BulletWorld, BulletShape) be 'sealed'?
|
||||||
|
|
||||||
THREADING
|
THREADING
|
||||||
=================================================
|
=================================================
|
||||||
|
|
Loading…
Reference in New Issue