本文整理汇总了C#中Aurora.Physics.AuroraOpenDynamicsEngine.AuroraODEPrim类的典型用法代码示例。如果您正苦于以下问题:C# AuroraODEPrim类的具体用法?C# AuroraODEPrim怎么用?C# AuroraODEPrim使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AuroraODEPrim类属于Aurora.Physics.AuroraOpenDynamicsEngine命名空间,在下文中一共展示了AuroraODEPrim类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Enable
}//end SetDefaultsForType
internal void Enable(IntPtr pBody, AuroraODEPrim parent, AuroraODEPhysicsScene pParentScene)
{
if (m_enabled)
return;
m_enabled = true;
m_previousMaterial = (Material)parent.m_material;
parent.SetMaterial((int)Material.Glass); //This seems to happen in SL... and its needed for here
parent.ThrottleUpdates = false;
m_body = pBody;
if (pBody == IntPtr.Zero || m_type == Vehicle.TYPE_NONE)
return;
d.Mass mass;
d.BodyGetMass(pBody, out mass);
Mass = mass.mass;
Mass *= 2;
}
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:20,代码来源:AODEDynamics.cs
示例2: changelink
private void changelink (AuroraODEPrim newparent)
{
// If the newly set parent is not null
// create link
if (_parent == null && newparent != null)
{
if (newparent.PhysicsActorType == (int)ActorTypes.Prim)
{
AuroraODEPrim obj = (AuroraODEPrim)newparent;
obj.ParentPrim (this);
}
}
// If the newly set parent is null
// destroy link
else if (_parent != null && newparent == null)
{
//Console.WriteLine(" changelink B");
if (_parent is AuroraODEPrim)
{
AuroraODEPrim obj = (AuroraODEPrim)_parent;
obj.ChildDelink (this);
childPrim = false;
//_parent = null;
}
}
_parent = newparent;
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:29,代码来源:AODEPrim.cs
示例3: ChildSetGeom
private void ChildSetGeom(AuroraODEPrim odePrim)
{
DestroyBody();
MakeBody();
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:5,代码来源:AODEPrim.cs
示例4: ParentPrim
// I'm the parent
// prim is the child
public void ParentPrim(AuroraODEPrim prim)
{
//Console.WriteLine("ParentPrim " + m_primName);
if (this.m_localID != prim.m_localID)
{
if (Body == IntPtr.Zero)
{
Body = d.BodyCreate(_parent_scene.world);
setMass();
}
if (Body != IntPtr.Zero)
{
lock (childrenPrim)
{
if (!childrenPrim.Contains(prim))
{
//Console.WriteLine("childrenPrim.Add " + prim);
childrenPrim.Add(prim);
foreach (AuroraODEPrim prm in childrenPrim)
{
d.Mass m2;
d.MassSetZero(out m2);
prim.Mass = prim.CalculateMass();
d.MassSetBoxTotal(out m2, prim.Mass, prm._size.X, prm._size.Y, prm._size.Z);
d.Quaternion quat = new d.Quaternion();
quat.W = prm._orientation.W;
quat.X = prm._orientation.X;
quat.Y = prm._orientation.Y;
quat.Z = prm._orientation.Z;
d.Matrix3 mat = new d.Matrix3();
d.RfromQ(out mat, ref quat);
d.MassRotate(ref m2, ref mat);
d.MassTranslate(ref m2, Position.X - prm.Position.X, Position.Y - prm.Position.Y, Position.Z - prm.Position.Z);
d.MassAdd(ref pMass, ref m2);
}
foreach (AuroraODEPrim prm in childrenPrim)
{
prm.m_collisionCategories |= CollisionCategories.Body;
prm.m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind);
if (prm.prim_geom == IntPtr.Zero)
{
m_log.Warn("[PHYSICS]: Unable to link one of the linkset elements. No geom yet");
continue;
}
//Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + m_primName);
d.GeomSetCategoryBits(prm.prim_geom, (int)prm.m_collisionCategories);
d.GeomSetCollideBits(prm.prim_geom, (int)prm.m_collisionFlags);
d.Quaternion quat = new d.Quaternion();
quat.W = prm._orientation.W;
quat.X = prm._orientation.X;
quat.Y = prm._orientation.Y;
quat.Z = prm._orientation.Z;
d.Matrix3 mat = new d.Matrix3();
d.RfromQ(out mat, ref quat);
if (Body != IntPtr.Zero)
{
d.GeomSetBody(prm.prim_geom, Body);
prm.childPrim = true;
d.GeomSetOffsetWorldPosition(prm.prim_geom, prm.Position.X , prm.Position.Y, prm.Position.Z);
//d.GeomSetOffsetPosition(prim.prim_geom,
// (Position.X - prm.Position.X) - pMass.c.X,
// (Position.Y - prm.Position.Y) - pMass.c.Y,
// (Position.Z - prm.Position.Z) - pMass.c.Z);
d.GeomSetOffsetWorldRotation(prm.prim_geom, ref mat);
//d.GeomSetOffsetRotation(prm.prim_geom, ref mat);
d.MassTranslate(ref pMass, -pMass.c.X, -pMass.c.Y, -pMass.c.Z);
d.BodySetMass(Body, ref pMass);
}
else
{
m_log.Debug("[PHYSICS]:I ain't got no boooooooooddy, no body");
}
prm.m_interpenetrationcount = 0;
prm.m_collisionscore = 0;
prm.m_disabled = false;
// The body doesn't already have a finite rotation mode set here
if ((!m_angularlock.ApproxEquals(Vector3.One, 0f)) && _parent == null)
{
prm.createAMotor(m_angularlock);
}
prm.Body = Body;
_parent_scene.addActivePrim(prm);
}
m_collisionCategories |= CollisionCategories.Body;
m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind);
//.........这里部分代码省略.........
开发者ID:NickyPerian,项目名称:Aurora,代码行数:101,代码来源:AODEPrim.cs
示例5: ChildDelink
private void ChildDelink(AuroraODEPrim odePrim)
{
// Okay, we have a delinked child.. need to rebuild the body.
lock (childrenPrim)
{
foreach (AuroraODEPrim prm in childrenPrim)
{
prm.childPrim = true;
prm.disableBody();
//prm.m_taintparent = null;
//prm._parent = null;
//prm.m_taintPhysics = false;
//prm.m_disabled = true;
//prm.childPrim = false;
}
}
disableBody();
lock (childrenPrim)
{
//Console.WriteLine("childrenPrim.Remove " + odePrim);
childrenPrim.Remove(odePrim);
}
if (Body != IntPtr.Zero)
{
_parent_scene.remActivePrim(this);
}
lock (childrenPrim)
{
foreach (AuroraODEPrim prm in childrenPrim)
{
//Console.WriteLine("ChildDelink calls ParentPrim");
ParentPrim(prm);
}
}
}
开发者ID:NickyPerian,项目名称:Aurora,代码行数:45,代码来源:AODEPrim.cs
示例6: addActivePrim
public void addActivePrim(AuroraODEPrim activatePrim)
{
// adds active prim.. (ones that should be iterated over in collisions_optimized
lock (_activeprimsLock)
{
if (!_activeprims.Contains(activatePrim))
_activeprims.Add(activatePrim);
//else
// MainConsole.Instance.Warn("[PHYSICS]: Double Entry in _activeprims detected, potential crash immenent");
}
}
开发者ID:EnricoNirvana,项目名称:Aurora-Sim,代码行数:11,代码来源:AODEPhysicsScene.cs
示例7: RemovePrimThreadLocked
///<summary>
/// This is called from within simulate but outside the locked portion
/// We need to do our own locking here
/// Essentially, we need to remove the prim from our space segment, whatever segment it's in.
///
/// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory
/// that the space was using.
///</summary>
///<param name = "prim"></param>
public void RemovePrimThreadLocked(AuroraODEPrim prim)
{
//Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName);
lock (prim)
{
remCollisionEventReporting(prim);
remActivePrim(prim);
prim.m_frozen = true;
if (prim.prim_geom != IntPtr.Zero)
{
prim.DestroyBody();
prim.IsPhysical = false;
prim.m_targetSpace = IntPtr.Zero;
try
{
if (prim.prim_geom != IntPtr.Zero)
{
d.GeomDestroy(prim.prim_geom);
prim.prim_geom = IntPtr.Zero;
}
else
{
MainConsole.Instance.Warn("[PHYSICS]: Unable to remove prim from physics scene");
}
}
catch (AccessViolationException)
{
MainConsole.Instance.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed.");
}
}
if (!prim.childPrim)
{
lock (prim.childrenPrim)
{
foreach (AuroraODEPrim prm in prim.childrenPrim)
{
RemovePrimThreadLocked(prm);
}
}
}
lock (_prims)
_prims.Remove(prim);
}
}
开发者ID:EnricoNirvana,项目名称:Aurora-Sim,代码行数:53,代码来源:AODEPhysicsScene.cs
示例8: addActivePrim
internal void addActivePrim(AuroraODEPrim activatePrim)
{
// adds active prim.. (ones that should be iterated over in collisions_optimized
lock (_activeprimsLock)
{
if (!_activeprims.Contains(activatePrim))
_activeprims.Add(activatePrim);
}
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:9,代码来源:AODEPhysicsScene.cs
示例9: BadPrim
internal void BadPrim(AuroraODEPrim auroraODEPrim)
{
DeletePrim(auroraODEPrim);
//Can't really do this here... as it will be readded before the delete gets called, which is wrong...
//So... leave the prim out there for now
//AddPrimShape(auroraODEPrim.ParentEntity);
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:7,代码来源:AODEPhysicsScene.cs
示例10: AddPrim
private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
IMesh mesh, PrimitiveBaseShape pbs, bool isphysical)
{
Vector3 pos = position;
Vector3 siz = size;
Quaternion rot = rotation;
AuroraODEPrim newPrim;
lock (OdeLock)
{
newPrim = new AuroraODEPrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode);
lock (_prims)
_prims.Add(newPrim);
}
return newPrim;
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:19,代码来源:AODEPhysicsScene.cs
示例11: RemovePrimThreadLocked
/// <summary>
/// This is called from within simulate but outside the locked portion
/// We need to do our own locking here
/// Essentially, we need to remove the prim from our space segment, whatever segment it's in.
///
/// If there are no more prim in the segment, we need to empty (spacedestroy)the segment and reclaim memory
/// that the space was using.
/// </summary>
/// <param name="prim"></param>
public void RemovePrimThreadLocked(AuroraODEPrim prim)
{
//Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName);
lock (prim)
{
remCollisionEventReporting(prim);
remActivePrim(prim);
lock (ode)
{
prim.m_frozen = true;
if (prim.prim_geom != IntPtr.Zero)
{
prim.DestroyBody();
prim.IsPhysical = false;
// we don't want to remove the main space
// If the geometry is in the targetspace, remove it from the target space
//m_log.Warn(prim.m_targetSpace);
//if (prim.m_targetSpace != IntPtr.Zero)
//{
//if (d.SpaceQuery(prim.m_targetSpace, prim.prim_geom))
//{
//if (d.GeomIsSpace(prim.m_targetSpace))
//{
//waitForSpaceUnlock(prim.m_targetSpace);
//d.SpaceRemove(prim.m_targetSpace, prim.prim_geom);
prim.m_targetSpace = IntPtr.Zero;
//}
//else
//{
// m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" +
//((OdePrim)prim).m_targetSpace.ToString());
//}
//}
//}
//m_log.Warn(prim.prim_geom);
try
{
if (prim.prim_geom != IntPtr.Zero)
{
d.GeomDestroy(prim.prim_geom);
prim.prim_geom = IntPtr.Zero;
}
else
{
m_log.Warn("[PHYSICS]: Unable to remove prim from physics scene");
}
}
catch (AccessViolationException)
{
m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed.");
}
lock (_prims)
_prims.Remove(prim);
//If there are no more geometries in the sub-space, we don't need it in the main space anymore
//if (d.SpaceGetNumGeoms(prim.m_targetSpace) == 0)
//{
//if (prim.m_targetSpace != null)
//{
//if (d.GeomIsSpace(prim.m_targetSpace))
//{
//waitForSpaceUnlock(prim.m_targetSpace);
//d.SpaceRemove(space, prim.m_targetSpace);
// free up memory used by the space.
//d.SpaceDestroy(prim.m_targetSpace);
//int[] xyspace = calculateSpaceArrayItemFromPos(prim.Position);
//resetSpaceArrayItemToZero(xyspace[0], xyspace[1]);
//}
//else
//{
//m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" +
//((OdePrim) prim).m_targetSpace.ToString());
//}
//}
//}
if (SupportsNINJAJoints)
{
RemoveAllJointsConnectedToActorThreadLocked(prim);
}
}
}
}
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:98,代码来源:AODEPhysicsScene.cs
示例12: collision_accounting_events
private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, ContactPoint contact)
{
obj2LocalID = 0;
if (!p2.SubscribedEvents() && !p1.SubscribedEvents())
return;
switch ((ActorTypes)p2.PhysicsActorType)
{
case ActorTypes.Agent:
cc2 = (AuroraODECharacter)p2;
switch ((ActorTypes)p1.PhysicsActorType)
{
case ActorTypes.Agent:
cc1 = (AuroraODECharacter)p1;
obj2LocalID = cc1.m_localID;
cc1.AddCollisionEvent(cc2.m_localID, contact);
break;
case ActorTypes.Prim:
if (p1 is AuroraODEPrim)
{
cp1 = (AuroraODEPrim)p1;
obj2LocalID = cp1.m_localID;
cp1.AddCollisionEvent(cc2.m_localID, contact);
}
break;
case ActorTypes.Ground:
case ActorTypes.Unknown:
obj2LocalID = 0;
break;
}
cc2.AddCollisionEvent(obj2LocalID, contact);
break;
case ActorTypes.Prim:
if (p2 is AuroraODEPrim)
{
cp2 = (AuroraODEPrim)p2;
switch ((ActorTypes)p1.PhysicsActorType)
{
case ActorTypes.Agent:
if (p1 is AuroraODECharacter)
{
cc1 = (AuroraODECharacter)p1;
obj2LocalID = cc1.m_localID;
cc1.AddCollisionEvent(cp2.m_localID, contact);
}
break;
case ActorTypes.Prim:
if (p1 is AuroraODEPrim)
{
cp1 = (AuroraODEPrim)p1;
obj2LocalID = cp1.m_localID;
cp1.AddCollisionEvent(cp2.m_localID, contact);
}
break;
case ActorTypes.Ground:
case ActorTypes.Unknown:
obj2LocalID = 0;
break;
}
cp2.AddCollisionEvent(obj2LocalID, contact);
}
break;
}
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:72,代码来源:AODEPhysicsScene.cs
示例13: Step
internal void Step(IntPtr pBody, float pTimestep, AuroraODEPhysicsScene pParentScene, AuroraODEPrim parent)
{
m_body = pBody;
if (pBody == IntPtr.Zero || m_type == Vehicle.TYPE_NONE)
return;
if (!d.BodyIsEnabled(Body))
d.BodyEnable(Body);
frcount++; // used to limit debug comment output
if (frcount > 100)
frcount = 0;
MoveLinear(pTimestep, pParentScene);
MoveAngular(pTimestep, pParentScene);
LimitRotation(pTimestep);
// WE deal with updates
parent.RequestPhysicsterseUpdate();
} // end Step
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:19,代码来源:AODEDynamics.cs
示例14: Disable
internal void Disable(AuroraODEPrim parent)
{
if (!m_enabled)
return;
m_enabled = false;
parent.SetMaterial((int)m_previousMaterial); //Revert to the original
parent.ThrottleUpdates = true;
//d.BodyDisable(Body);
m_linearMotorDirection = Vector3.Zero;
m_linearMotorDirectionLASTSET = Vector3.Zero;
m_angularMotorDirection = Vector3.Zero;
}
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:14,代码来源:AODEDynamics.cs
示例15: AddChange
/// <summary>
/// Called to queue a change to a prim
/// to use in place of old taint mechanism so changes do have a time sequence
/// </summary>
public void AddChange(AuroraODEPrim prim,changes what,Object arg)
{
AODEchangeitem item = new AODEchangeitem();
item.prim = prim;
item.what = what;
item.arg = arg;
// lock (ChangesQueue)
{
ChangesQueue.Enqueue(item);
}
}
开发者ID:salahzar,项目名称:Aurora-Sim,代码行数:15,代码来源:AODEPhysicsScene.cs
示例16: needsMeshing
/// <summary>
/// Routine to figure out if we need to mesh this prim with our mesher
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
internal bool needsMeshing(AuroraODEPrim prim, byte physicalType)
{
PrimitiveBaseShape pbs = prim.Shape;
// most of this is redundant now as the mesher will return null if it cant mesh a prim
// but we still need to check for sculptie meshing being enabled so this is the most
// convenient place to do it for now...
// //if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle && pbs.ProfileCurve == (byte)Primitive.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
// //MainConsole.Instance.Debug("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + Primitive.UnpackPathScale(pbs.PathScaleY).ToString());
int iPropertiesNotSupportedDefault = 0;
// return true;
if (forceSimplePrimMeshing)
return true;
// let simple spheres use ode sphere object
PrimitiveBaseShape sphere = PrimitiveBaseShape.CreateSphere();
if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte) Extrusion.Curve1
&& pbs.Scale.X == pbs.Scale.Y && pbs.Scale.X == pbs.Scale.Z && pbs.ProfileHollow == sphere.ProfileHollow &&
pbs.PathBegin == sphere.PathBegin && pbs.PathEnd == sphere.PathEnd &&
pbs.PathCurve == sphere.PathCurve && pbs.HollowShape == sphere.HollowShape &&
pbs.PathRadiusOffset == sphere.PathRadiusOffset && pbs.PathRevolutions == sphere.PathRevolutions &&
pbs.PathScaleY == sphere.PathScaleY && pbs.PathShearX == sphere.PathShearX &&
pbs.PathShearY == sphere.PathShearY && pbs.PathSkew == sphere.PathSkew &&
pbs.PathTaperY == sphere.PathTaperY && pbs.PathTwist == sphere.PathTwist &&
pbs.PathTwistBegin == sphere.PathTwistBegin && pbs.ProfileBegin == sphere.ProfileBegin &&
pbs.ProfileEnd == sphere.ProfileEnd && pbs.ProfileHollow == sphere.ProfileHollow &&
pbs.ProfileShape == sphere.ProfileShape)
return false;
if (pbs.SculptEntry && !meshSculptedPrim)
return false;
else if (pbs.SculptType != (byte) SculptType.Mesh &&
pbs.SculptType != (byte) SculptType.None)
return true; //Sculpty, mesh it
else if (pbs.SculptType == (byte) SculptType.Mesh)
{
//Mesh, we need to see what the prims says to do with it
if (physicalType == (byte) PhysicsShapeType.Prim)
return false; //Supposed to be a simple box, nothing more
else
return true; //Mesh it!
}
// if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
if (!forceSimplePrimMeshing)
{
if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte) Extrusion.Straight)
/*|| (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
&& pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)*/)
{
if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
&& pbs.ProfileHollow == 0
&& pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
&& pbs.PathBegin == 0 && pbs.PathEnd == 0
&& pbs.PathTaperX == 0 && pbs.PathTaperY == 0
&& pbs.PathScaleX == 100 && pbs.PathScaleY == 100
&& pbs.PathShearX == 0 && pbs.PathShearY == 0)
{
#if SPAM
MainConsole.Instance.Warn("NonMesh");
#endif
return false;
}
}
}
if (pbs.ProfileHollow != 0)
iPropertiesNotSupportedDefault++;
else if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0))
iPropertiesNotSupportedDefault++;
else if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0)
iPropertiesNotSupportedDefault++;
else if (pbs.PathBegin != 0 || pbs.PathEnd != 0)
iPropertiesNotSupportedDefault++;
else if ((pbs.PathScaleX != 100) || (pbs.PathScaleY != 100))
iPropertiesNotSupportedDefault++;
else if ((pbs.PathShearX != 0) || (pbs.PathShearY != 0))
iPropertiesNotSupportedDefault++;
else if (pbs.ProfileShape == ProfileShape.Circle && pbs.PathCurve == (byte) Extrusion.Straight)
iPropertiesNotSupportedDefault++;
else if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte) Extrusion.Curve1 &&
(pbs.Scale.X != pbs.Scale.Y || pbs.Scale.Y != pbs.Scale.Z || pbs.Scale.Z != pbs.Scale.X))
iPropertiesNotSupportedDefault++;
else if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte) Extrusion.Curve1)
iPropertiesNotSupportedDefault++;
// test for torus
else if ((pbs.ProfileCurve & 0x07) == (byte) ProfileShape.Square &&
pbs.PathCurve == (byte) Extrusion.Curve1)
iPropertiesNotSupportedDefault++;
else if ((pbs.ProfileCurve & 0x07) == (byte) ProfileShape.HalfCircle &&
(pbs.PathCurve == (byte) Extrusion.Curve1 || pbs.PathCurve == (byte) Extrusion.Curve2))
iPropertiesNotSupportedDefault++;
else if ((pbs.ProfileCurve & 0x07) == (byte) ProfileShape.EquilateralTriangle)
{
//.........这里部分代码省略.........
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:101,代码来源:AODEPhysicsScene.cs
示例17: AddPrimShape
public override PhysicsObject AddPrimShape(ISceneChildEntity entity)
{
bool isPhysical = ((entity.ParentEntity.RootChild.Flags & PrimFlags.Physics) != 0);
bool isPhantom = ((entity.ParentEntity.RootChild.Flags & PrimFlags.Phantom) != 0);
bool physical = isPhysical & !isPhantom;
/*IOpenRegionSettingsModule WSModule = entity.ParentEntity.Scene.RequestModuleInterface<IOpenRegionSettingsModule> ();
if (WSModule != null)
if (!WSModule.AllowPhysicalPrims)
physical = false;*/
AuroraODEPrim newPrim;
newPrim = new AuroraODEPrim(entity, this, false);
if (physical)
newPrim.IsPhysical = physical;
lock (_prims)
_prims.Add(newPrim);
return newPrim;
}
开发者ID:EnricoNirvana,项目名称:Aurora-Sim,代码行数:20,代码来源:AODEPhysicsScene.cs
示例18: remActivePrim
internal void remActivePrim(AuroraODEPrim deactivatePrim)
{
lock (_activeprimsLock)
_activeprims.Remove(deactivatePrim);
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:5,代码来源:AODEPhysicsScene.cs
示例19: remActivePrim
public void remActivePrim(AuroraODEPrim deactivatePrim)
{
lock (_activeprimsLock)
{
_activeprims.Remove(deactivatePrim);
}
}
开发者ID:EnricoNirvana,项目名称:Aurora-Sim,代码行数:7,代码来源:AODEPhysicsScene.cs
示例20: AddPrimShape
public override PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position,
Vector3 size, Quaternion rotation, bool isPhysical)
{
AuroraODEPrim newPrim = new AuroraODEPrim(name, physicsType, shape, position, size, rotation, this);
newPrim.UUID = primID;
newPrim.LocalID = localID;
if (isPhysical)
newPrim.IsPhysical = isPhysical;
lock (_prims)
_prims.Add(newPrim);
return newPrim;
}
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:15,代码来源:AODEPhysicsScene.cs
注:本文中的Aurora.Physics.AuroraOpenDynamicsEngine.AuroraODEPrim类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论