當前位置: 首頁>>代碼示例>>C#>>正文


C# BEPUutilities類代碼示例

本文整理匯總了C#中BEPUutilities的典型用法代碼示例。如果您正苦於以下問題:C# BEPUutilities類的具體用法?C# BEPUutilities怎麽用?C# BEPUutilities使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BEPUutilities類屬於命名空間,在下文中一共展示了BEPUutilities類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Convert

 //Vector2
 public static Vector2 Convert(BEPUutilities.Vector2 bepuVector)
 {
     Vector2 toReturn;
     toReturn.X = bepuVector.X;
     toReturn.Y = bepuVector.Y;
     return toReturn;
 }
開發者ID:PaTraVis,項目名稱:NewHorizons,代碼行數:8,代碼來源:MathConverter.cs

示例2: EntityModel

        /// <summary>
        /// Creates a new EntityModel.
        /// </summary>
        /// <param name="entity">Entity to attach the graphical representation to.</param>
        /// <param name="model">Graphical representation to use for the entity.</param>
        /// <param name="transform">Base transformation to apply to the model before moving to the entity.</param>
        /// <param name="game">Game to which this component will belong.</param>
        public EntityModel(Entity entity, Model model, BEPUutilities.Matrix transform, Game game, GameManager manager)
            : base(game)
        {
            this.entity = entity;
            this.model = model;
            this.Transform = transform;
            this._manager = manager;

            //Collect any bone transformations in the model itself.
            //The default cube model doesn't have any, but this allows the EntityModel to work with more complicated shapes.
            boneTransforms = new Matrix[model.Bones.Count];
            foreach (ModelMesh mesh in model.Meshes)
            {
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.EnableDefaultLighting();
                }
            }
        }
開發者ID:boddie,項目名稱:AsteroidDestroyer,代碼行數:26,代碼來源:EntityModel.cs

示例3: Convert

 public static Quaternion Convert(BEPUutilities.Quaternion q)
 {
     return new Quaternion(q.X, q.Y, q.Z, q.W);
 }
開發者ID:Tengato,項目名稱:Mechadrone1,代碼行數:4,代碼來源:BepuConverter.cs

示例4: SetOrientation

 public override void SetOrientation(BEPUutilities.Quaternion quat)
 {
     Angles = quat;
 }
開發者ID:Morphan1,項目名稱:Voxalia,代碼行數:4,代碼來源:PrimitiveEntity.cs

示例5: HitSparks

 private void HitSparks(BEPUutilities.Vector3 position)
 {
     Actor sparks = GameResources.ActorManager.SpawnTemplate("Sparks");
     TransformComponent sparksXForm = sparks.GetComponent<TransformComponent>(ActorComponent.ComponentType.Transform);
     sparksXForm.Translation = BepuConverter.Convert(position);
     Sparks sparksBehavior = sparks.GetBehavior<Sparks>();
     sparksBehavior.Emit();
 }
開發者ID:Tengato,項目名稱:Mechadrone1,代碼行數:8,代碼來源:MachineGunSkill.cs

示例6: GetVerticesAndIndicesFromModel

 //TODO: This section could use some improvements.  It's not very robust, especially on WP7.  Remember the VertexBuffer.GetData bug on WP7.
 /// <summary>
 /// Gets an array of vertices and indices from the provided model.
 /// </summary>
 /// <param name="collisionModel">Model to use for the collision shape.</param>
 /// <param name="vertices">Compiled set of vertices from the model.</param>
 /// <param name="indices">Compiled set of indices from the model.</param>
 public static void GetVerticesAndIndicesFromModel(Model collisionModel, out BEPUutilities.Vector3[] vertices, out int[] indices)
 {
     Vector3[] tempVertices;
     GetVerticesAndIndicesFromModel(collisionModel, out tempVertices, out indices);
     vertices = MathConverter.Convert(tempVertices);
 }
開發者ID:reubencummins,項目名稱:3dgraphicsengine,代碼行數:13,代碼來源:ModelDataExtractor.cs

示例7: SetOrientation

 public abstract void SetOrientation(BEPUutilities.Quaternion quat);
開發者ID:Morphan1,項目名稱:Voxalia,代碼行數:1,代碼來源:Entity.cs


注:本文中的BEPUutilities類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。