本文整理汇总了C#中PhysicsActor类的典型用法代码示例。如果您正苦于以下问题:C# PhysicsActor类的具体用法?C# PhysicsActor怎么用?C# PhysicsActor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PhysicsActor类属于命名空间,在下文中一共展示了PhysicsActor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveAvatar
public override void RemoveAvatar(PhysicsActor character)
{
POSCharacter act = (POSCharacter) character;
if (_characters.Contains(act))
{
_characters.Remove(act);
}
}
示例2: RemoveAvatar
public override void RemoveAvatar(PhysicsActor actor)
{
BasicActor act = (BasicActor) actor;
if (_actors.Contains(act))
{
_actors.Remove(act);
}
}
示例3: RemovePrim
public override void RemovePrim(PhysicsActor prim)
{
POSPrim p = (POSPrim) prim;
if (_prims.Contains(p))
{
_prims.Remove(p);
}
}
示例4: AddPhysicsActorTaint
public override void AddPhysicsActorTaint(PhysicsActor prim)
{
//throw new NotSupportedException("AddPhysicsActorTaint must be called with a taint type");
}
示例5: RemoveAvatar
public override void RemoveAvatar(PhysicsActor actor)
{
this.QueueCommand(new Commands.RemoveCharacterCmd((PhysxCharacter)actor));
}
示例6: RemovePrim
public override void RemovePrim(PhysicsActor prim)
{
if (!m_initialized) return;
BSPhysObject bsprim = prim as BSPhysObject;
if (bsprim != null)
{
DetailLog("{0},RemovePrim,call", bsprim.LocalID);
// m_log.DebugFormat("{0}: RemovePrim. id={1}/{2}", LogHeader, bsprim.Name, bsprim.LocalID);
try
{
lock (PhysObjects) PhysObjects.Remove(bsprim.LocalID);
}
catch (Exception e)
{
m_log.ErrorFormat("{0}: Attempt to remove prim that is not in physics scene: {1}", LogHeader, e);
}
bsprim.Destroy();
// bsprim.dispose();
}
else
{
m_log.ErrorFormat("{0}: Attempt to remove prim that is not a BSPrim type.", LogHeader);
}
}
示例7: link
public override void link(PhysicsActor obj) { return; }
示例8: RemoveAllJointsConnectedToActorThreadLocked
public virtual void RemoveAllJointsConnectedToActorThreadLocked(PhysicsActor actor)
{ return; }
示例9: RemoveAvatar
/// <summary>
/// Remove an avatar.
/// </summary>
/// <param name="actor"></param>
public abstract void RemoveAvatar(PhysicsActor actor);
示例10: RemovePrim
public override void RemovePrim(PhysicsActor prim)
{
if (prim is BulletXPrim)
{
lock (BulletXLock)
{
try
{
ddWorld.RemoveRigidBody(((BulletXPrim) prim).RigidBody);
}
catch (Exception ex)
{
BulletXMessage(is_ex_message + ex.Message, true);
((BulletXPrim) prim).RigidBody.ActivationState = ActivationState.DisableSimulation;
AddForgottenRigidBody(((BulletXPrim) prim).RigidBody);
}
_prims.Remove(((BulletXPrim) prim).RigidBody);
}
GC.Collect();
}
}
示例11: RemoveAvatar
public override void RemoveAvatar(PhysicsActor actor)
{
if (actor is BulletXCharacter)
{
lock (BulletXLock)
{
try
{
ddWorld.RemoveRigidBody(((BulletXCharacter) actor).RigidBody);
}
catch (Exception ex)
{
BulletXMessage(is_ex_message + ex.Message, true);
((BulletXCharacter) actor).RigidBody.ActivationState = ActivationState.DisableSimulation;
AddForgottenRigidBody(((BulletXCharacter) actor).RigidBody);
}
_characters.Remove(((BulletXCharacter) actor).RigidBody);
}
GC.Collect();
}
}
示例12: link
public abstract void link(PhysicsActor obj);
示例13: changelink
private void changelink(float timestep)
{
// If the newly set parent is not null
// create link
if (_parent == null && m_taintparent != null)
{
if (m_taintparent.PhysicsActorType == (int)ActorTypes.Prim)
{
OdePrim obj = (OdePrim)m_taintparent;
//obj.disableBody();
//Console.WriteLine("changelink calls ParentPrim");
obj.AddChildPrim(this);
/*
if (obj.Body != (IntPtr)0 && Body != (IntPtr)0 && obj.Body != Body)
{
_linkJointGroup = d.JointGroupCreate(0);
m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup);
d.JointAttach(m_linkJoint, obj.Body, Body);
d.JointSetFixed(m_linkJoint);
}
*/
}
}
// If the newly set parent is null
// destroy link
else if (_parent != null && m_taintparent == null)
{
//Console.WriteLine(" changelink B");
if (_parent is OdePrim)
{
OdePrim obj = (OdePrim)_parent;
obj.ChildDelink(this);
childPrim = false;
//_parent = null;
}
/*
if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0)
d.JointGroupDestroy(_linkJointGroup);
_linkJointGroup = (IntPtr)0;
m_linkJoint = (IntPtr)0;
*/
}
_parent = m_taintparent;
m_taintPhysics = IsPhysical;
}
示例14: link
public override void link(PhysicsActor obj)
{
m_taintparent = obj;
}
示例15: RemoveAvatar
public override void RemoveAvatar(PhysicsActor actor)
{
}