• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# EntityProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中EntityProperties的典型用法代码示例。如果您正苦于以下问题:C# EntityProperties类的具体用法?C# EntityProperties怎么用?C# EntityProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EntityProperties类属于命名空间,在下文中一共展示了EntityProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Select

    void Select(EntityProperties properties)
    {
        float radius=tilePrefab.transform.lossyScale.x * properties.currentActionsPoints/GameRules.Instance.gameCost.MoveCost;
        selected.Clear();
        hide = false;
        origin.gameObject.SetActive(!hide);
        //Cache them so we can easily turn
        debugSphere.transform.localScale = new Vector3(radius,radius,radius);
        debugSphere.transform.position = properties.owner.position;

        Collider[] colliders=Physics.OverlapSphere(properties.owner.position, radius,mask.value);
        for (int i = 0; i < colliders.Length; ++i)
        {   
            selected.Add(colliders[i].gameObject);
            colliders[i].gameObject.renderer.material = moveMaterial;
        }
    }
开发者ID:BigBearGCU,项目名称:GruntHero,代码行数:17,代码来源:TileScript.cs


示例2: EntityProperties_SerializedClass_CanConvertToEntityProperties

        public void EntityProperties_SerializedClass_CanConvertToEntityProperties()
        {
            // Arrange
            var expectedId = "SomeId";
            var ob = new BasicEntity
            {
                Id = expectedId
            };
            var data = _serializer.PackSingleObject(ob);

            // Act
            var entityProperties = new EntityProperties(data);
            var containsId = entityProperties.ContainsKey("Id");
            string returnedId;
            var isString = entityProperties["Id"].TryGet(out returnedId);

            // Assert
            Assert.True(containsId);
            Assert.True(isString);
            Assert.Equal(expectedId, returnedId);
        }
开发者ID:adhtalbo,项目名称:RedisContext,代码行数:21,代码来源:EntityPropertiesTests.cs


示例3: OnSelection

 void OnSelection(EntityProperties props)
 {
     if (GameRules.Instance.gameCost.AimedShotCost > props.currentActionsPoints)
     {
         aimedButton.enabled = false;
         aimedButton.SetState(UIButtonColor.State.Disabled, true);
     }
     else
     {
         aimedButton.enabled = true;
         aimedButton.SetState(UIButtonColor.State.Normal, true);
     }
     if (GameRules.Instance.gameCost.SnapShotCost > props.currentActionsPoints)
     {
         snapButton.enabled = false;
         snapButton.SetState(UIButtonColor.State.Disabled, true);
     }
     else
     {
         snapButton.enabled = true;
         snapButton.SetState(UIButtonColor.State.Normal, true);
     }
 }
开发者ID:BigBearGCU,项目名称:GruntHero,代码行数:23,代码来源:FireCostScript.cs


示例4: GetPropertyValue

        /// <summary>
        /// Get the value of the specified property
        /// </summary>
        /// <param name="properties">property to search for</param>
        /// <returns>value of the specified property</returns>
        private string GetPropertyValue(string propertyName, EntityProperties properties)
        {
            // validate that an property name has been set
            if (!properties.ContainsKey(propertyName))
            {
                throw new ArgumentNullException(propertyName, Globals.InputPropertyNotFound);
            }

            var objectName = properties[propertyName].ToString();

            return objectName;
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:17,代码来源:MethodHandler.cs


示例5: GetPrimaryKeyProperties

        private EntityProperties GetPrimaryKeyProperties(DataEntity dataEntity, OleDbMetadataAccess metadataAccess)
        {
            var primaryKeyProperties = new EntityProperties();
            //Use the data entity name to retrieve a list of indexes
            var indexColumns = metadataAccess.GetTableIndexInformation(dataEntity.ObjectDefinitionFullName);

            //Add each of the Primary Keys and their values found in the data entity.
            foreach (DataRow row in indexColumns.Rows)
            {
                if (!Convert.ToBoolean(row["PRIMARY_KEY"]))
                {
                    continue;
                }

                var columnName = row["COLUMN_NAME"].ToString();

                // Check if the priamry key column is included in the data entity.
                if (dataEntity.Properties.ContainsKey(columnName))
                {
                    // Add the key and its value to the primary key list.
                    primaryKeyProperties.Add(columnName, dataEntity.Properties[columnName]);
                }
                else
                {
                    // If the key has not been added set it to null.
                    primaryKeyProperties.Add(columnName, null);
                }
            }

            return primaryKeyProperties;
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:31,代码来源:OperationHandler.cs


示例6: SimMotionState

 public SimMotionState(BSAPIXNA pWorld, uint id, IndexedMatrix starTransform, object frameUpdates)
 {
     IndexedQuaternion OrientationQuaterion = starTransform.GetRotation();
     m_properties = new EntityProperties()
                        {
                            ID = id,
                            Position = new Vector3(starTransform._origin.X, starTransform._origin.Y,starTransform._origin.Z),
                            Rotation = new Quaternion(OrientationQuaterion.X,OrientationQuaterion.Y,OrientationQuaterion.Z,OrientationQuaterion.W)
                        };
     m_lastProperties = new EntityProperties()
     {
         ID = id,
         Position = new Vector3(starTransform._origin.X, starTransform._origin.Y, starTransform._origin.Z),
         Rotation = new Quaternion(OrientationQuaterion.X, OrientationQuaterion.Y, OrientationQuaterion.Z, OrientationQuaterion.W)
     };
     m_world = pWorld;
     m_xform = starTransform;
 }
开发者ID:CassieEllen,项目名称:opensim,代码行数:18,代码来源:BSAPIXNA.cs


示例7: UpsertingExistingRowInvalidTest

        public void UpsertingExistingRowInvalidTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "upsert" };

            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();

            //create a DataEntity for the row
            table.ObjectDefinitionFullName = "Customers";

            columnData.Add("CustomerNumber", "ABERDEEN0001");
            columnData.Add("CompanyName", "Aberdeen Inc.");
            columnData.Add("Active", "1");
            columnData.Add("Email", "[email protected]");

            //add the row data to the input
            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            //execute the selected operation
            OperationResult operationResult = _sysConnector.ExecuteOperation(operationInput);
            //verify the result is a success
            Assert.IsTrue(operationResult.Success[0]);
            //verify that a row was added
            Assert.AreEqual(1, operationResult.ObjectsAffected[0]);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:30,代码来源:OperationTests.cs


示例8: InsertUnknownTableInValidTest

        public void InsertUnknownTableInValidTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "create" };

            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();

            //create a DataEntity for the row
            table.ObjectDefinitionFullName = InvalidPropertyValue;
            columnData.Add("RecordId", Guid.NewGuid().ToString());
            columnData.Add("ProductNumber", "134234g");
            columnData.Add("ProductName", "Screwdriver");
            columnData.Add("Type", "FinishGood");
            columnData.Add("UoMSchedule", "65");
            columnData.Add("ListPrice", "65");
            columnData.Add("Cost", "65");
            columnData.Add("StandardCost", "65");
            columnData.Add("QuantityInStock", "65");
            columnData.Add("QuantityOnOrder", "65");
            columnData.Add("Discontinued", "0");
            columnData.Add("CreatedOn", DateTime.Now);
            columnData.Add("ModifiedOn", DateTime.Now);

            //add the row data to the input
            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();
            //execute the selected operation
            OperationResult operationResult = _sysConnector.ExecuteOperation(operationInput);
            //verify the result is not a success
            Assert.IsFalse(operationResult.Success[0]);
            Assert.AreEqual(0, operationResult.ObjectsAffected[0]);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:36,代码来源:OperationTests.cs


示例9: PhysicsStepint

    private int PhysicsStepint(BulletWorld pWorld,float timeStep, int m_maxSubSteps, float m_fixedTimeStep, out int updatedEntityCount,
        out  EntityProperties[] updatedEntities, out int collidersCount, out CollisionDesc[] colliders, int maxCollisions, int maxUpdates)
    {
        int numSimSteps = 0;
        Array.Clear(UpdatedObjects, 0, UpdatedObjects.Length);
        Array.Clear(UpdatedCollisions, 0, UpdatedCollisions.Length);
        LastEntityProperty=0;






        LastCollisionDesc=0;

        updatedEntityCount = 0;
        collidersCount = 0;


        if (pWorld is BulletWorldXNA)
        {
            DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;

            world.LastCollisionDesc = 0;
            world.LastEntityProperty = 0;
            numSimSteps = world.StepSimulation(timeStep, m_maxSubSteps, m_fixedTimeStep);

            PersistentManifold contactManifold;
            CollisionObject objA;
            CollisionObject objB;
            ManifoldPoint manifoldPoint;
            PairCachingGhostObject pairCachingGhostObject;

            m_collisionsThisFrame = 0;
            int numManifolds = world.GetDispatcher().GetNumManifolds();
            for (int j = 0; j < numManifolds; j++)
            {
                contactManifold = world.GetDispatcher().GetManifoldByIndexInternal(j);
                int numContacts = contactManifold.GetNumContacts();
                if (numContacts == 0)
                    continue;

                objA = contactManifold.GetBody0() as CollisionObject;
                objB = contactManifold.GetBody1() as CollisionObject;

                manifoldPoint = contactManifold.GetContactPoint(0);
                //IndexedVector3 contactPoint = manifoldPoint.GetPositionWorldOnB();
               // IndexedVector3 contactNormal = -manifoldPoint.m_normalWorldOnB; // make relative to A

                RecordCollision(this, objA, objB, manifoldPoint.GetPositionWorldOnB(), -manifoldPoint.m_normalWorldOnB, manifoldPoint.GetDistance());
                m_collisionsThisFrame ++;
                if (m_collisionsThisFrame >= 9999999)
                    break;


            }

            foreach (GhostObject ghostObject in specialCollisionObjects.Values)
            {
                pairCachingGhostObject = ghostObject as PairCachingGhostObject;
                if (pairCachingGhostObject != null)
                {
                    RecordGhostCollisions(pairCachingGhostObject);
                }

            }


            updatedEntityCount = LastEntityProperty;
            updatedEntities = UpdatedObjects;

            collidersCount = LastCollisionDesc;
            colliders = UpdatedCollisions;


        }
        else
        {
            //if (updatedEntities is null)
            //updatedEntities = new List<BulletXNA.EntityProperties>();
            //updatedEntityCount = 0;


            //collidersCount = 0;

            updatedEntities = new EntityProperties[0];


            colliders = new CollisionDesc[0];

        }
        return numSimSteps;
    }
开发者ID:CassieEllen,项目名称:opensim,代码行数:93,代码来源:BSAPIXNA.cs


示例10: GetLastModifiedColumnNameFromInput

        /// <summary>
        /// Retrieve the column name used for checking the last date of synchronization on the column
        /// </summary>
        /// <param name="properties">The parameters of the MethodInput.</param>
        /// <returns>string value of the column name</returns>
        private string GetLastModifiedColumnNameFromInput(EntityProperties properties)
        {
            string columnName = string.Empty;

            //check if the column name is specified by checking for the 'ModificationDateFullName' property
            if (properties.ContainsKey("ModificationDateFullName"))
            {
                //set teh column name to the property in the property list
                columnName = properties["ModificationDateFullName"].ToString();
            }

            return columnName;
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:18,代码来源:MethodHandler.cs


示例11: Initialize

 public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
                                         int maxCollisions, ref CollisionDesc[] collisionArray,
                                         int maxUpdates, ref EntityProperties[] updateArray
                                         )
 {
     /* TODO */
     return new BulletWorldXNA(1, null, null);
 }
开发者ID:justasabc,项目名称:opensim75grid,代码行数:8,代码来源:BSAPIXNA.cs


示例12: UpdateMultipleRowsValidTest

        public void UpdateMultipleRowsValidTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "update", AllowMultipleObject = true };

            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();

            //create the comparison experssion for selecting the records to update
            operationInput.LookupCondition = new Expression[]
            {
                new ComparisonExpression(
                    ComparisonOperator.IsNull,new ComparisonValue(ComparisonValueType.Property, "TaxSchedule"), null, null)
            };

            //add the columns to change
            table.ObjectDefinitionFullName = "Addresses";
            columnData.Add("TaxSchedule", "ST-PA");

            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            //execute the selected operaiton
            var operationResult = _sysConnector.ExecuteOperation(operationInput);

            //validate that the operation was success
            Assert.IsTrue(operationResult.Success[0]);
            //validate that multiple rows have been updated
            Assert.IsTrue(operationResult.ObjectsAffected[0] >= 1);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:33,代码来源:OperationTests.cs


示例13: ParseColumns

        /// <summary>
        /// provides the columns in a format to add to the select statement
        /// </summary>
        /// <param name="properties">columns to add</param>
        /// <returns>colums formated fpor a SQL select statement</returns>
        private string ParseColumns(EntityProperties properties)
        {
            var selectColumns = new StringBuilder();

            // add columns
            if (properties != null && properties.Count > 0)
            {
                foreach (var property in properties)
                {
                    selectColumns.Append(" [");
                    selectColumns.Append(property.Key);
                    selectColumns.Append("],");
                }
                selectColumns.Remove(selectColumns.Length - 1, 1);
            }
            else // all columns
            {
                selectColumns.Append(" *");
            }

            return selectColumns.ToString();
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:27,代码来源:SqlQueryBuilder.cs


示例14: UpdateInvalidIntTest

        public void UpdateInvalidIntTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "update", AllowMultipleObject = false };
            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();

            //create the comparison experssion for selecting the records to update
            operationInput.LookupCondition = new Expression[]
                                        {
                                            new ComparisonExpression(ComparisonOperator.Equal,
                                                                     new ComparisonValue(ComparisonValueType.Property, "Region"),
                                                                     new ComparisonValue(ComparisonValueType.Constant, "North"),
                                                                     null)
                                        };
            //add the columns to change
            table.ObjectDefinitionFullName = "Customers";
            columnData.Add("CreditOnHold", "5328475903427853943453245324532453425345324523453453453425345324523452342345");
            columnData.Add("ModifiedOn", DateTime.Now);

            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            var operationResult = _sysConnector.ExecuteOperation(operationInput);
            //validate that the result of the operation was not a success
            Assert.IsFalse(operationResult.Success[0]);
            //validate that no objects have been affected
            Assert.AreEqual(0, operationResult.ObjectsAffected[0]);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:32,代码来源:OperationTests.cs


示例15: UpdateInvalidDateTest

        public void UpdateInvalidDateTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "update", AllowMultipleObject = false };

            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();

            //create the comparison experssion for selecting the records to update
            operationInput.LookupCondition = new Expression[]
                                        {
                                            new ComparisonExpression(ComparisonOperator.Equal,
                                                                     new ComparisonValue(ComparisonValueType.Property, "Type"),
                                                                     new ComparisonValue(ComparisonValueType.Constant, "Order"),
                                                                     null)
                                        };
            //add the columns to change
            table.ObjectDefinitionFullName = "SalesOrders";
            columnData.Add("OrderDate", InvalidPropertyValue);
            columnData.Add("ModifiedOn", DateTime.Now);

            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            var operationResult = _sysConnector.ExecuteOperation(operationInput);

            Assert.IsFalse(operationResult.Success[0]);
            Assert.AreEqual(0, operationResult.ObjectsAffected[0]);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:32,代码来源:OperationTests.cs


示例16: UpdateBooleanValidTest

        public void UpdateBooleanValidTest()
        {
            var input = new List<DataEntity>();
            var table = new DataEntity();
            var columnData = new EntityProperties();
            var operationInput = new OperationInput();
            operationInput.Name = "update";

            operationInput.AllowMultipleObject = false;

            //create a new comparison expression that will only attempt to update one row of data
            operationInput.LookupCondition = new Expression[]
                                        {
                                            new ComparisonExpression(ComparisonOperator.Equal,
                                                                     new ComparisonValue(ComparisonValueType.Property, "ProductNumber"),
                                                                     new ComparisonValue(ComparisonValueType.Constant,"ME256"),
                                                                     null)
                                        };

            table.ObjectDefinitionFullName = "Products";
            //This will only accept a value that has a value of 1, or 0 for TRUE or FALSE
            columnData.Add("Discontinued", 1);

            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            var operationResult = _sysConnector.ExecuteOperation(operationInput);
            //validate the the result was a success
            Assert.IsTrue(operationResult.Success[0]);
            //validate that only one row of data was affected
            Assert.AreEqual(1, operationResult.ObjectsAffected[0]);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:34,代码来源:OperationTests.cs


示例17: UpdateGUI

 void UpdateGUI(EntityProperties props)
 {
     actionPointLbl.text = props.currentActionsPoints.ToString();
 }
开发者ID:BigBearGCU,项目名称:GruntHero,代码行数:4,代码来源:EntityGUI.cs


示例18: InsertExistingRowInvalidTest

        public void InsertExistingRowInvalidTest()
        {
            //create a new method input and use the appropriate operation name
            OperationInput operationInput = new OperationInput { Name = "create" };

            var input = new List<DataEntity>();
            var table = new DataEntity("Customers");

            var columnData = new EntityProperties();

            //create a DataEntity for the row
            table.ObjectDefinitionFullName = "Customers";
            columnData.Add("CustomerNumber", "ABERDEEN0001");
            columnData.Add("CompanyName", "Aberdeen Inc.");
            columnData.Add("Active", "1");

            //add the row data to the input
            table.Properties = columnData;
            input.Add(table);

            operationInput.Input = input.ToArray();

            //execute the selected operation
            OperationResult operationResult = _sysConnector.ExecuteOperation(operationInput);
            //verify the result is not a success
            Assert.IsFalse(operationResult.Success[0]);
            //verify that a row was added
            Assert.AreEqual(ErrorNumber.DuplicateUniqueKey, operationResult.ErrorInfo[0].Number);
        }
开发者ID:TerryBoswell,项目名称:etouches,代码行数:29,代码来源:OperationTests.cs


示例19: GetDebugProperties

    private static EntityProperties GetDebugProperties(object pWorld, object pBody)
    {
        EntityProperties ent = new EntityProperties();
        DiscreteDynamicsWorld world = pWorld as DiscreteDynamicsWorld;
        RigidBody body = pBody as RigidBody;
        IndexedMatrix transform = body.GetWorldTransform();
        IndexedVector3 LinearVelocity = body.GetInterpolationLinearVelocity();
        IndexedVector3 AngularVelocity = body.GetInterpolationAngularVelocity();
        IndexedQuaternion rotation = transform.GetRotation();
        ent.Acceleration = Vector3.Zero;
        ent.ID = (uint)body.GetUserPointer();
        ent.Position = new Vector3(transform._origin.X,transform._origin.Y,transform._origin.Z);
        ent.Rotation = new Quaternion(rotation.X,rotation.Y,rotation.Z,rotation.W);
        ent.Velocity = new Vector3(LinearVelocity.X, LinearVelocity.Y, LinearVelocity.Z);
        ent.RotationalVelocity = new Vector3(AngularVelocity.X, AngularVelocity.Y, AngularVelocity.Z);
        return ent;


    }
开发者ID:justasabc,项目名称:opensim75grid,代码行数:19,代码来源:BulletSimAPI.cs


示例20: Initialize2

    private static DiscreteDynamicsWorld Initialize2(Vector3 worldExtent,
                        ConfigurationParameters[] o,
                        int mMaxCollisionsPerFrame, ref CollisionDesc[] collisionArray,
                        int mMaxUpdatesPerFrame, ref EntityProperties[] updateArray,
                        object mDebugLogCallbackHandle)
    {
        CollisionWorld.WorldData.ParamData p = new CollisionWorld.WorldData.ParamData();

        p.angularDamping = BSParam.AngularDamping;
        p.defaultFriction = o[0].defaultFriction;
        p.defaultFriction = o[0].defaultFriction;
        p.defaultDensity = o[0].defaultDensity;
        p.defaultRestitution = o[0].defaultRestitution;
        p.collisionMargin = o[0].collisionMargin;
        p.gravity = o[0].gravity;

        p.linearDamping = BSParam.LinearDamping;
        p.angularDamping = BSParam.AngularDamping;
        p.deactivationTime = BSParam.DeactivationTime;
        p.linearSleepingThreshold = BSParam.LinearSleepingThreshold;
        p.angularSleepingThreshold = BSParam.AngularSleepingThreshold;
        p.ccdMotionThreshold = BSParam.CcdMotionThreshold;
        p.ccdSweptSphereRadius = BSParam.CcdSweptSphereRadius;
        p.contactProcessingThreshold = BSParam.ContactProcessingThreshold;

        p.terrainImplementation = BSParam.TerrainImplementation;
        p.terrainFriction = BSParam.TerrainFriction;

        p.terrainHitFraction = BSParam.TerrainHitFraction;
        p.terrainRestitution = BSParam.TerrainRestitution;
        p.terrainCollisionMargin = BSParam.TerrainCollisionMargin;

        p.avatarFriction = BSParam.AvatarFriction;
        p.avatarStandingFriction = BSParam.AvatarStandingFriction;
        p.avatarDensity = BSParam.AvatarDensity;
        p.avatarRestitution = BSParam.AvatarRestitution;
        p.avatarCapsuleWidth = BSParam.AvatarCapsuleWidth;
        p.avatarCapsuleDepth = BSParam.AvatarCapsuleDepth;
        p.avatarCapsuleHeight = BSParam.AvatarCapsuleHeight;
        p.avatarContactProcessingThreshold = BSParam.AvatarContactProcessingThreshold;

        p.vehicleAngularDamping = BSParam.VehicleAngularDamping;

        p.maxPersistantManifoldPoolSize = o[0].maxPersistantManifoldPoolSize;
        p.maxCollisionAlgorithmPoolSize = o[0].maxCollisionAlgorithmPoolSize;
        p.shouldDisableContactPoolDynamicAllocation = o[0].shouldDisableContactPoolDynamicAllocation;
        p.shouldForceUpdateAllAabbs = o[0].shouldForceUpdateAllAabbs;
        p.shouldRandomizeSolverOrder = o[0].shouldRandomizeSolverOrder;
        p.shouldSplitSimulationIslands = o[0].shouldSplitSimulationIslands;
        p.shouldEnableFrictionCaching = o[0].shouldEnableFrictionCaching;
        p.numberOfSolverIterations = o[0].numberOfSolverIterations;

        p.linksetImplementation = BSParam.LinksetImplementation;
        p.linkConstraintUseFrameOffset = BSParam.NumericBool(BSParam.LinkConstraintUseFrameOffset);
        p.linkConstraintEnableTransMotor = BSParam.NumericBool(BSParam.LinkConstraintEnableTransMotor);
        p.linkConstraintTransMotorMaxVel = BSParam.LinkConstraintTransMotorMaxVel;
        p.linkConstraintTransMotorMaxForce = BSParam.LinkConstraintTransMotorMaxForce;
        p.linkConstraintERP = BSParam.LinkConstraintERP;
        p.linkConstraintCFM = BSParam.LinkConstraintCFM;
        p.linkConstraintSolverIterations = BSParam.LinkConstraintSolverIterations;
        p.physicsLoggingFrames = o[0].physicsLoggingFrames;
        DefaultCollisionConstructionInfo ccci = new DefaultCollisionConstructionInfo();

        DefaultCollisionConfiguration cci = new DefaultCollisionConfiguration();
        CollisionDispatcher m_dispatcher = new CollisionDispatcher(cci);


        if (p.maxPersistantManifoldPoolSize > 0)
            cci.m_persistentManifoldPoolSize = (int)p.maxPersistantManifoldPoolSize;
        if (p.shouldDisableContactPoolDynamicAllocation !=0)
            m_dispatcher.SetDispatcherFlags(DispatcherFlags.CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION);
        //if (p.maxCollisionAlgorithmPoolSize >0 )

        DbvtBroadphase m_broadphase = new DbvtBroadphase();
        //IndexedVector3 aabbMin = new IndexedVector3(0, 0, 0);
        //IndexedVector3 aabbMax = new IndexedVector3(256, 256, 256);

        //AxisSweep3Internal m_broadphase2 = new AxisSweep3Internal(ref aabbMin, ref aabbMax, Convert.ToInt32(0xfffe), 0xffff, ushort.MaxValue/2, null, true);
        m_broadphase.GetOverlappingPairCache().SetInternalGhostPairCallback(new GhostPairCallback());

        SequentialImpulseConstraintSolver m_solver = new SequentialImpulseConstraintSolver();

        DiscreteDynamicsWorld world = new DiscreteDynamicsWorld(m_dispatcher, m_broadphase, m_solver, cci);

        world.LastCollisionDesc = 0;
        world.LastEntityProperty = 0;

        world.WorldSettings.Params = p;
        world.SetForceUpdateAllAabbs(p.shouldForceUpdateAllAabbs != 0);
        world.GetSolverInfo().m_solverMode = SolverMode.SOLVER_USE_WARMSTARTING | SolverMode.SOLVER_SIMD;
        if (p.shouldRandomizeSolverOrder != 0)
            world.GetSolverInfo().m_solverMode |= SolverMode.SOLVER_RANDMIZE_ORDER;

        world.GetSimulationIslandManager().SetSplitIslands(p.shouldSplitSimulationIslands != 0);
        //world.GetDispatchInfo().m_enableSatConvex Not implemented in C# port

        if (p.shouldEnableFrictionCaching != 0)
            world.GetSolverInfo().m_solverMode |= SolverMode.SOLVER_ENABLE_FRICTION_DIRECTION_CACHING;

        if (p.numberOfSolverIterations > 0)
//.........这里部分代码省略.........
开发者ID:CassieEllen,项目名称:opensim,代码行数:101,代码来源:BSAPIXNA.cs



注:本文中的EntityProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EntityQuery类代码示例发布时间:2022-05-24
下一篇:
C# EntityMode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap