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


C# Containers.Point3F類代碼示例

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


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

示例1: ProjectileDataOnCollision

 public void ProjectileDataOnCollision(coProjectileData datablock, coProjectile projectile, coShapeBase shapebase, string fad, Point3F pos, string normal)
     {
     // Apply damage to the object all shape base objects
     if (datablock["directDamage"].AsFloat() > 0)
         if ((console.getTypeMask(shapebase) & (uint) SceneObjectTypesAsUint.ShapeBaseObjectType) == (uint) SceneObjectTypesAsUint.ShapeBaseObjectType)
             ShapeBaseDamage(shapebase,projectile.ID, pos, datablock["directDamage"].AsFloat(), datablock["damageType"]);
     }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:7,代碼來源:Projectile.cs

示例2: Box3F

 public Box3F(string box)
     {
     string[] parts = box.Split(' ');
     if (parts.GetUpperBound(0) < 5)
         return;
     minExtents = new Point3F(parts[0].AsFloat(), parts[1].AsFloat(), parts[2].AsFloat());
     maxExtents = new Point3F(parts[3].AsFloat(), parts[4].AsFloat(), parts[5].AsFloat());
     }
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:8,代碼來源:Box3F.cs

示例3: ProjectileDataOnExplode

 public void ProjectileDataOnExplode(coProjectileData data, coProjectile proj, Point3F position, string mod)
     {
     // Damage objects within the projectiles damage radius
     float radius = data["damageRadius"].AsFloat();
     if (radius <= 0)
         return;
     string damageType = data["damageType"];
     float areaImpulse = data["areaImpulse"].AsFloat();
     float radiusDamage = data["radiusDamage"].AsFloat();
     RadiusDamage((coPlayer) proj.ID, position, radius, radiusDamage, damageType, areaImpulse);
     }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:11,代碼來源:Projectile.cs

示例4: RadiusDamage

        public void RadiusDamage(coShapeBase sourceobject, Point3F position, float radius, float damage, string damageType, float impulse)
            {
            // Use the container system to iterate through all the objects
            // within our explosion radius.  We'll apply damage to all ShapeBase
            // objects.
            Dictionary<uint, float> r = console.initContainerRadiusSearch(new Point3F(position), radius, (uint) SceneObjectTypesAsUint.ShapeBaseObjectType);
            float halfRadius = radius/(float) 2.0;
            foreach (coPlayer targetObject in r.Keys)
                {
                // Calculate how much exposure the current object has to
                // the explosive force.  The object types listed are objects
                // that will block an explosion.  If the object is totally blocked,
                // then no damage is applied.

                UInt32 mask = (uint) SceneObjectTypesAsUint.InteriorObjectType | (uint) SceneObjectTypesAsUint.TerrainObjectType | (uint) SceneObjectTypesAsUint.StaticShapeObjectType | (uint) SceneObjectTypesAsUint.VehicleObjectType;

                float coverage = Util.calcExplosionCoverage(new Point3F(position), targetObject, mask);
                if (!coverage.AsBool())
                    continue;
                float dist = r[targetObject];
                // Calculate a distance scale for the damage and the impulse.
                // Full damage is applied to anything less than half the radius away,
                // linear scale from there.
                float distScale = (float) ((dist < halfRadius) ? 1.0 : 1 - ((dist - halfRadius)/halfRadius));
                // Apply the damage
                ShapeBaseDamage(targetObject, sourceobject, position, (((damage)*coverage*distScale)), damageType);


                // Apply the impulse
                if (!impulse.AsBool())
                    continue;
                TransformF impulseVec = new TransformF(targetObject.getWorldBoxCenter()) - new TransformF(position);
                impulseVec = impulseVec.normalizeSafe();
                impulseVec = impulseVec.vectorScale(impulse*distScale);
                targetObject.applyImpulse(new Point3F(position), impulseVec.MPosition);
                }
            }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:37,代碼來源:radiusDamage.cs

示例5: setOrbitMode

/// <summary>
/// Set the camera to orbit around the given object, or if none is given, around the given point.
///                     @param orbitObject The object to orbit around.  If no object is given (0 or blank string is passed in) use the orbitPoint instead
///                     @param orbitPoint The point to orbit around when no object is given.  In the form of \"x y z ax ay az aa\" such as returned by SceneObject::getTransform().
///                     @param minDistance The minimum distance allowed to the orbit object or point.
///                     @param maxDistance The maximum distance allowed from the orbit object or point.
///                     @param initDistance The initial distance from the orbit object or point.
///                     @param ownClientObj [optional] Are we orbiting an object that is owned by us?  Default is false.
///                     @param offset [optional] An offset added to the camera's position.  Default is no offset.
///                     @param locked [optional] Indicates the camera does not receive input from the player.  Default is false.
///                     @see Camera::setOrbitObject()
///                     @see Camera::setOrbitPoint())
/// 
/// </summary>
public  void setOrbitMode(string camera, string orbitObject, TransformF orbitPoint, float minDistance, float maxDistance, float initDistance, bool ownClientObj, Point3F offset, bool xlocked){
m_ts.fnCamera_setOrbitMode(camera, orbitObject, orbitPoint.AsString(), minDistance, maxDistance, initDistance, ownClientObj, offset.AsString(), xlocked);
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:17,代碼來源:TorqueScriptTemplate.cs

示例6: ShapeBaseDamage

        public void ShapeBaseDamage(coShapeBase shapebase, coShapeBase sourceobject, Point3F position, float damage, string damagetype)
            {
            // All damage applied by one object to another should go through this method.
            // This function is provided to allow objects some chance of overriding or
            // processing damage values and types.  As opposed to having weapons call
            // ShapeBase::applyDamage directly. Damage is redirected to the datablock,
            // this is standard procedure for many built in callbacks.


            if (shapebase.isObject())
                {
                coShapeBaseData datablock = shapebase.getDataBlock();
                datablock.call("damage", shapebase, position.AsString(), sourceobject, damage.AsString(), damagetype);
                }
            }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:15,代碼來源:ShapeBase.cs

示例7: ProximityMineDataOnExplode

 public void ProximityMineDataOnExplode(coProximityMineData datablock, coProximityMine shapebase, Point3F position)
     {
     // Damage objects within the mine's damage radius
     if (datablock["damageRadius"].AsFloat() > 0)
         RadiusDamage(shapebase, position, datablock["damageRadius"].AsFloat(), datablock["radiusDamage"].AsFloat(), datablock["damageType"], datablock["areaImpulse"].AsFloat());
     }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:6,代碼來源:ProximityMine.cs

示例8: setOffset

/// <summary>
/// Set the camera's offset.
///                    The offset is added to the camera's position when set to CameraMode::OrbitObject.
///                    @param offset The distance to offset the camera by in the form of \"x y z\".)
/// 
/// </summary>
public  void setOffset(string camera, Point3F offset){
m_ts.fnCamera_setOffset(camera, offset.AsString());
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:9,代碼來源:TorqueScriptTemplate.cs

示例9: setOrbitPoint

/// <summary>
/// Set the camera to orbit around a given point.
///                     @param orbitPoint The point to orbit around.  In the form of \"x y z ax ay az aa\" such as returned by SceneObject::getTransform().
///                     @param minDistance The minimum distance allowed to the orbit object or point.
///                     @param maxDistance The maximum distance allowed from the orbit object or point.
///                     @param initDistance The initial distance from the orbit object or point.
///                     @param offset [optional] An offset added to the camera's position.  Default is no offset.
///                     @param locked [optional] Indicates the camera does not receive input from the player.  Default is false.
///                     @see Camera::setOrbitMode())
/// 
/// </summary>
public  void setOrbitPoint(string camera, TransformF orbitPoint, float minDistance, float maxDistance, float initDistance, Point3F offset, bool xlocked){
m_ts.fnCamera_setOrbitPoint(camera, orbitPoint.AsString(), minDistance, maxDistance, initDistance, offset.AsString(), xlocked);
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:14,代碼來源:TorqueScriptTemplate.cs

示例10: AngAxisF

 /// <summary>
 /// Constructor From String
 /// </summary>
 /// <param name="angaxisf"></param>
 public AngAxisF(string angaxisf)
     {
     string[] fl = angaxisf.Split(' ');
     _mAxis = new Point3F(0, 0, 0);
     _mAxis.OnChangeNotification += _mAxis_OnChangeNotification;
     _mAxis.x = fl[0].AsFloat();
     _mAxis.y = fl[1].AsFloat();
     _mAxis.z = fl[2].AsFloat();
     _mAngle = fl[3].AsFloat();
     }
開發者ID:RichardRanft,項目名稱:DNT-Torque3D-V1.1,代碼行數:14,代碼來源:AngAxisF.cs

示例11: renderCircle

/// <summary>
///  )
/// 
/// </summary>
public  void renderCircle(string edittsctrl, Point3F pos, Point3F normal, float radius, int segments){
m_ts.fnEditTSCtrl_renderCircle(edittsctrl, pos.AsString(), normal.AsString(), radius, segments);
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:7,代碼來源:TorqueScriptTemplate.cs

示例12: renderLine

/// <summary>
///  )
/// 
/// </summary>
public  void renderLine(string edittsctrl, Point3F start, Point3F end, float lineWidth){
m_ts.fnEditTSCtrl_renderLine(edittsctrl, start.AsString(), end.AsString(), lineWidth);
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:7,代碼來源:TorqueScriptTemplate.cs

示例13: drawLine

/// <summary>
/// Draws a line primitive between two 3d points. )
/// 
/// </summary>
public  void drawLine(string debugdrawer, Point3F a, Point3F b, ColorF color){
m_ts.fnDebugDrawer_drawLine(debugdrawer, a.AsString(), b.AsString(), color.AsString());
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:7,代碼來源:TorqueScriptTemplate.cs

示例14: renderBox

/// <summary>
///  )
/// 
/// </summary>
public  void renderBox(string edittsctrl, Point3F pos, Point3F size){
m_ts.fnEditTSCtrl_renderBox(edittsctrl, pos.AsString(), size.AsString());
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:7,代碼來源:TorqueScriptTemplate.cs

示例15: setVelocity

/// <summary>
/// Set the velocity for the camera.
///                    @param velocity The camera's velocity in the form of \"x y z\".
///                    @note Only affects the Camera when in Newton mode.)
/// 
/// </summary>
public  void setVelocity(string camera, Point3F velocity){
m_ts.fnCamera_setVelocity(camera, velocity.AsString());
}
開發者ID:Winterleaf,項目名稱:DNT-Torque3D-V1.0,代碼行數:9,代碼來源:TorqueScriptTemplate.cs


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