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

C# CryEngine.Vec3类代码示例

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

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



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

示例1: Equals_EqualVec3Objects_True

        public void Equals_EqualVec3Objects_True()
        {
            Vec3 v1 = new Vec3(1, 2, 3);
            Vec3 v2 = new Vec3(1, 2, 3);

            Assert.IsTrue(v1.Equals(v2));
        }
开发者ID:samneirinck,项目名称:cemono,代码行数:7,代码来源:Vec3Tests.cs


示例2: OnFire

        protected override void OnFire(Vec3 firePos)
        {
            var muzzleFlash = ParticleEffect.Get("weapon_fx.tank.tank125.muzzle_flash.muzzle_flash");
            muzzleFlash.Spawn(firePos, Attachment.Rotation.Column1, 0.5f);

            Owner.Physics.AddImpulse(-Attachment.Rotation.Column1 * impulseStrength);
        }
开发者ID:vblanco20-1,项目名称:AngryBoids,代码行数:7,代码来源:Heavy.cs


示例3: Launch

        public void Launch(Vec3 velocity)
        {
            ReceiveUpdates = true;
            state = BoidState.Launched;

            Physics.AddImpulse(velocity);
            OnLaunched(velocity);
        }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:8,代码来源:AngryBoidBase.cs


示例4: NetSpawn

        public void NetSpawn(EntityId targetId, Vec3 pos)
        {
            var tank = Entity.Get<Tank>(targetId);

            tank.Position = pos;

            tank.OnRevive();
        }
开发者ID:vblanco20-1,项目名称:AngryBoids,代码行数:8,代码来源:SpawnPoint.cs


示例5: Vec3

        public void Vec3()
        {
            Vec3 vec3 = UnusedMarker.Vec3;
            Assert.True(UnusedMarker.IsUnused(vec3));

            vec3 = new Vec3(0, 250, 3);
            Assert.False(UnusedMarker.IsUnused(vec3));
        }
开发者ID:jbjhjm,项目名称:legendsofdrakan,代码行数:8,代码来源:UnusedMarkerTests.cs


示例6: OnRevive

        public override void OnRevive(EntityId actorId, Vec3 pos, Vec3 rot, int teamId)
        {
            var player = Actor.Get<Player>(actorId);

            if(player == null)
            {
                Debug.Log("[SinglePlayer.OnRevive] Failed to get the player. Check the log for errors.");
                return;
            }
        }
开发者ID:aquiball,项目名称:Seasons,代码行数:10,代码来源:SinglePlayer.cs


示例7: OnCollision

        protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
        {
            if(Velocity.Length > VelocityToKill)
            {
                var particle = ParticleEffect.Get("explosions.barrel.explode");
                particle.Spawn(hitPos);

                Entity.Remove(Id);
            }
        }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:10,代码来源:BaseEnemy.cs


示例8: OnCollision

 protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
 {
     // Hit something, reset last event time.
     if(state == BoidState.Launched)
     {
         if(postFire == null)
             postFire = new DelayedFunc(OnStoppedMoving, 4000);
         else
             postFire.Reset();
     }
 }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:11,代码来源:AngryBoidBase.cs


示例9: OnRevive

        public override void OnRevive(EntityId actorId, Vec3 pos, Vec3 rot, int teamId)
        {
            var cameraProxy = Actor.Get(actorId) as PlayerCamera;
            if(cameraProxy == null)
            {
                Debug.Log("[SinglePlayer.OnRevive] Failed to get the player proxy. Check the log for errors.");
                return;
            }

            cameraProxy.Init();
        }
开发者ID:jjiezheng,项目名称:AngryBoids,代码行数:11,代码来源:SinglePlayer.cs


示例10: OnCollision

        protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
        {
            if (!Destroyed && targetEntityId!=0)
            {
                var breakageParams = new BreakageParameters();
                breakageParams.type = BreakageType.Destroy;
                breakageParams.fParticleLifeTime = 7.0f;
                breakageParams.bMaterialEffects = true;
                breakageParams.nGenericCount = 0;
                breakageParams.bForceEntity = false;
                breakageParams.bOnlyHelperPieces = false;

                breakageParams.fExplodeImpulse = 10.0f;
                breakageParams.vHitImpulse = dir;
                breakageParams.vHitPoint = hitPos;

                Physics.Break(breakageParams);

                SetSlotFlags(GetSlotFlags() | EntitySlotFlags.Render);

                Destroyed = true;
            }
        }
开发者ID:jjiezheng,项目名称:AngryBoids,代码行数:23,代码来源:DestroyableEntity.cs


示例11: SetRotationAA

 public void SetRotationAA(float c, float s, Vec3 axis, Vec3 t = default(Vec3))
 {
     this = new Matrix34(Matrix33.CreateRotationAA(c, s, axis));
     M03 = t.X; M13 = t.Y; M23 = t.Z;
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:5,代码来源:Matrix.cs


示例12: OnCollision

 /// <summary>
 /// Sent on entity collision.
 /// </summary>
 protected virtual void OnCollision(ColliderInfo source, ColliderInfo target, Vec3 hitPos, Vec3 contactNormal, float penetration, float radius)
 {
 }
开发者ID:RogierWV,项目名称:315GR,代码行数:6,代码来源:Actor.cs


示例13: Scale

 /// <summary>
 /// apply scaling to matrix.
 /// </summary>
 /// <returns></returns>
 void Scale(Vec3 s)
 {
     M00 *= s.X; M01 *= s.Y; M02 *= s.Z;
     M10 *= s.X; M11 *= s.Y; M12 *= s.Z;
     M20 *= s.X; M21 *= s.Y; M22 *= s.Z;
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:10,代码来源:Matrix.cs


示例14: TransformVector

 /// <summary>
 /// transforms a vector. the translation is not beeing considered
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public Vec3 TransformVector(Vec3 p)
 {
     return new Vec3(M00 * p.X + M01 * p.Y + M02 * p.Z + M03, M10 * p.X + M11 * p.Y + M12 * p.Z + M13, M20 * p.X + M21 * p.Y + M22 * p.Z + M23);
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:9,代码来源:Matrix.cs


示例15: QuatT

 public QuatT(Vec3 t, Quat q)
 {
     Q = q;
     T = t;
 }
开发者ID:rookboom,项目名称:CryMono,代码行数:5,代码来源:QuatT.cs


示例16: SetRotationXYZ

        public void SetRotationXYZ(Vec3 rad, Vec3? trans = null)
        {
            Q.SetRotationXYZ(rad);

            T = trans.GetValueOrDefault();
        }
开发者ID:rookboom,项目名称:CryMono,代码行数:6,代码来源:QuatT.cs


示例17: SetFromVectors

 public void SetFromVectors(Vec3 vx, Vec3 vy, Vec3 vz, Vec3 pos)
 {
     var m34 = new Matrix34();
     m34.M00 = vx.X; m34.M01 = vy.X; m34.M02 = vz.X; m34.M03 = pos.X;
     m34.M10 = vx.Y; m34.M11 = vy.Y; m34.M12 = vz.Y; m34.M13 = pos.Y;
     m34.M20 = vx.Z; m34.M21 = vy.Z; m34.M22 = vz.Z; m34.M23 = pos.Z;
     this = new QuatT(m34);
 }
开发者ID:rookboom,项目名称:CryMono,代码行数:8,代码来源:QuatT.cs


示例18: Length_NormalizedVec3_True

        public void Length_NormalizedVec3_True()
        {
            Vec3 v = new Vec3(1, 0, 0);

            Assert.IsTrue(v.Length == 1);
        }
开发者ID:samneirinck,项目名称:cemono,代码行数:6,代码来源:Vec3Tests.cs


示例19: Normalize_Vec3_LengthIsEqualToOne

 public void Normalize_Vec3_LengthIsEqualToOne()
 {
     Vec3 v = new Vec3(26, 23, 135);
     v.Normalize();
     Assert.IsTrue(v.Length == 1);
 }
开发者ID:samneirinck,项目名称:cemono,代码行数:6,代码来源:Vec3Tests.cs


示例20: SetRotationZ

        /*!
        * Create rotation-matrix about Z axis using an angle.
        * The angle is assumed to be in radians.
        * The translation-vector is set to zero.
        *
        *  Example:
        *        Matrix34 m34;
        *        m34.SetRotationZ(0.5f);
        */
        public void SetRotationZ(float rad, Vec3 t = default(Vec3))
        {
            this = new Matrix34(Matrix33.CreateRotationZ(rad));

            SetTranslation(t);
        }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:15,代码来源:Matrix.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Serialization.ObjectReference类代码示例发布时间:2022-05-24
下一篇:
C# Docking.Content类代码示例发布时间: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