本文整理汇总了C#中WinterLeaf.Containers.Point3F类的典型用法代码示例。如果您正苦于以下问题:C# Point3F类的具体用法?C# Point3F怎么用?C# Point3F使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Point3F类属于WinterLeaf.Containers命名空间,在下文中一共展示了Point3F类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: setTrackObject
/// <summary>
/// Set the camera to track a given object.
/// @param trackObject The object to track.
/// @param offset [optional] An offset added to the camera's position. Default is no offset.
/// @returns false if the given object could not be found.)
///
/// </summary>
public bool setTrackObject(string camera, string trackObject, Point3F offset){
return m_ts.fnCamera_setTrackObject(camera, trackObject, offset.AsString());
}
开发者ID:Winterleaf,项目名称:DNT-Torque3D-V1.0,代码行数:10,代码来源:TorqueScriptTemplate.cs
示例17: setRotation
/// <summary>
/// Set the camera's Euler rotation in radians.
/// @param rot The rotation in radians in the form of \"x y z\".
/// @note Rotation around the Y axis is ignored )
///
/// </summary>
public void setRotation(string camera, Point3F rot){
m_ts.fnCamera_setRotation(camera, rot.AsString());
}
开发者ID:Winterleaf,项目名称:DNT-Torque3D-V1.0,代码行数:9,代码来源:TorqueScriptTemplate.cs
示例18: renderSphere
/// <summary>
/// )
///
/// </summary>
public void renderSphere(string edittsctrl, Point3F pos, float radius, int sphereLevel){
m_ts.fnEditTSCtrl_renderSphere(edittsctrl, pos.AsString(), radius, sphereLevel);
}
开发者ID:Winterleaf,项目名称:DNT-Torque3D-V1.0,代码行数:7,代码来源:TorqueScriptTemplate.cs
示例19: setAimLocation
/// <summary>
/// @brief Tells the AIPlayer to aim at the location provided.
///
/// @param target An \"x y z\" position in the game world to target.
///
/// @see getAimLocation())
///
/// </summary>
public void setAimLocation(Point3F target)
{
TorqueScriptTemplate.m_ts.fnAIPlayer_setAimLocation(_mSimObjectId, target.AsString());
}
开发者ID:Winterleaf,项目名称:DNT-Torque3D-V1.1,代码行数:12,代码来源:coAIPlayer.cs
示例20: setEditOrbitPoint
/// <summary>
/// Set the editor camera's orbit point.
/// @param point The point the camera will orbit in the form of \"x y z\".)
///
/// </summary>
public void setEditOrbitPoint(string camera, Point3F point){
m_ts.fnCamera_setEditOrbitPoint(camera, point.AsString());
}
开发者ID:Winterleaf,项目名称:DNT-Torque3D-V1.0,代码行数:8,代码来源:TorqueScriptTemplate.cs
注:本文中的WinterLeaf.Containers.Point3F类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论