本文整理汇总了C#中CSharpFramework类的典型用法代码示例。如果您正苦于以下问题:C# CSharpFramework类的具体用法?C# CSharpFramework怎么用?C# CSharpFramework使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CSharpFramework类属于命名空间,在下文中一共展示了CSharpFramework类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnActivate
public override void OnActivate(CSharpFramework.VisionViewBase currentView)
{
base.OnActivate(currentView);
Picking.Init();
IProject.ProjectUnloaded += new EventHandler(IProject_ProjectUnloaded);
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:7,代码来源:UVPickerContext.cs
示例2: OnMouseDown
public override bool OnMouseDown(System.Windows.Forms.MouseEventArgs e, CSharpFramework.Contexts.KeyModifier eKeyMod, int iOldX, int iOldY)
{
if ((IsEditingKeyPressed(eKeyMod) && (EditorSettingsBase.CameraStyle_e.MayaStyle != EditorManager.Settings.CameraStyle)) || eKeyMod == KeyModifier.Ctrl)
{
_bPaint = true;
_bSubtract = (e.Button == MouseButtons.Right || (EditorManager.Tablet != null && EditorManager.Tablet.IsEraserPressed));
}
return base.OnMouseDown(e, eKeyMod, iOldX, iOldY);
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:9,代码来源:DecorationEditingContext.cs
示例3: OnPick
/// <summary>
/// Overridden function
/// </summary>
/// <param name="e"></param>
/// <param name="eKeyMod"></param>
/// <returns></returns>
public override bool OnPick(System.Windows.Forms.MouseEventArgs e, CSharpFramework.Contexts.KeyModifier eKeyMod)
{
base.OnPick(e, eKeyMod); // releases the handler
if (_destHeight == null || _terrain == null)
return false;
Vector3F vStart = new Vector3F();
Vector3F vEnd = new Vector3F();
Vector3F touchPoint = new Vector3F();
EditorManager.EngineManager.GetRayAtScreenPos(out vStart, out vEnd, e.X, e.Y, EditorManager.Settings.MaxPickingDistance);
if (!_terrain.TraceTerrain(vStart, vEnd, ref touchPoint))
return false;
_destHeight.AbsoluteHeight = _terrain.TerrainHeightAtPosition(touchPoint);
return true;
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:23,代码来源:TerrainPickHandler.cs
示例4: OnMouseDown
public override bool OnMouseDown(System.Windows.Forms.MouseEventArgs e, CSharpFramework.Contexts.KeyModifier eKeyMod, int iOldX, int iOldY)
{
if ((IsEditingKeyPressed(eKeyMod) && (EditorSettingsBase.CameraStyle_e.MayaStyle != EditorManager.Settings.CameraStyle)) || eKeyMod == KeyModifier.Ctrl)
{
CurrentMode = TerrainEditor.HeightmapEditMode;
// apply variants locally to this context
if (CurrentMode == HeightmapEditMode_e.Elevate && (e.Button == MouseButtons.Right || (EditorManager.Tablet != null && EditorManager.Tablet.IsEraserPressed)))
CurrentMode = HeightmapEditMode_e.Subtract;
else if (CurrentMode == HeightmapEditMode_e.AddHoles && (e.Button == MouseButtons.Right || (EditorManager.Tablet != null && EditorManager.Tablet.IsEraserPressed)))
CurrentMode = HeightmapEditMode_e.RemoveHoles;
// in flatten mode with RMB we pick the height first
if (CurrentMode == HeightmapEditMode_e.Flatten && e.Button == MouseButtons.Right)
{
Vector3F cursorCenter = TerrainEditor.CurrentTerrain.EngineTerrain.GetCurrentCursorCenter();
float fHeight = TerrainEditor.CurrentTerrain.TerrainHeightAtPosition(cursorCenter);
HeightmapCursorProperties cursorProp = TerrainEditor.Cursor3DProperties as HeightmapCursorProperties;
if (cursorProp != null)
cursorProp.AbsoluteHeight = fHeight;
}
}
return base.OnMouseDown(e, eKeyMod, iOldX, iOldY);
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:24,代码来源:HeightmapEditingContext.cs
示例5: ApplicationLayout_ActiveLayoutChanged
void ApplicationLayout_ActiveLayoutChanged(object sender, CSharpFramework.Layout.LayoutManager.ActiveLayoutChangedArgs e)
{
SendLayout(e.NewLayout);
}
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:4,代码来源:GoogleAnalyticsTracker.cs
示例6: OnHotSpotDragEnd
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragEnd(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotGravity)
{
if (_hotSpotGravity.HasChanged)
{
float fNewVal = _hotSpotGravity.CurrentDistance;
Gravity = _hotSpotGravity.StartDistance; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"Gravity",fNewVal));
}
}
if (hotSpot==_hotSpotLightGridOfs)
{
Vector3F vNewPos = _hotSpotLightGridOfs.CurrentPosition;
LightGridSampleOfs = _hotSpotLightGridOfs.StartPosition; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"LightGridSampleOfs",vNewPos)); // send an action which sets the property from old value to new one
}
}
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:23,代码来源:ClothObjectShape.cs
示例7: OnHotSpotDrag
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
/// <param name="fDeltaX"></param>
/// <param name="fDeltaY"></param>
public override void OnHotSpotDrag(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY)
{
if (hotSpot==_hotSpotGravity)
Gravity = _hotSpotGravity.CurrentDistance;
}
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:12,代码来源:ClothObjectShape.cs
示例8: GetScene2DRenderingSortingKey
public override float GetScene2DRenderingSortingKey(CSharpFramework.Controls.Scene2DView view)
{
return AbsoluteBoundingBox.Z1; // bottom of box
}
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:4,代码来源:TriggerBoxShape.cs
示例9: OnHotSpotEvaluatePosition
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
public override void OnHotSpotEvaluatePosition(CSharpFramework.View.HotSpotBase hotSpot)
{
if (hotSpot==_hotSpotSizeX)
{
_hotSpotSizeX.Axis = this.XAxis;
if (!_hotSpotSizeX.IsDragging)
_hotSpotSizeX.StartDistance = SizeX;
}
if (hotSpot==_hotSpotSizeY)
{
_hotSpotSizeY.Axis = this.YAxis;
if (!_hotSpotSizeY.IsDragging)
_hotSpotSizeY.StartDistance = SizeY;
}
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:19,代码来源:MirrorShape.cs
示例10: OnExport
public override bool OnExport(CSharpFramework.Scene.SceneExportInfo info)
{
return base.OnExport (info);
}
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:4,代码来源:HavokNavMeshCarverShape.cs
示例11: OnHotSpotEvaluatePosition
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
public override void OnHotSpotEvaluatePosition(CSharpFramework.View.HotSpotBase hotSpot)
{
if (hotSpot==_hotSpotConeAngleX)
{
if (!_hotSpotConeAngleX.IsDragging)
_hotSpotConeAngleX.StartAngle = ConeAngleX;
}
if (hotSpot==_hotSpotConeAngleY)
{
if (!_hotSpotConeAngleY.IsDragging)
_hotSpotConeAngleY.StartAngle = ConeAngleY;
}
if (hotSpot==_hotSpotLength)
{
_hotSpotLength.Axis = this.XAxis;
if (!_hotSpotLength.IsDragging)
_hotSpotLength.StartDistance = Length;
}
if (hotSpot==_hotSpotFadeOutDist1)
{
_hotSpotFadeOutDist1.Axis = this.XAxis;
if (!_hotSpotFadeOutDist1.IsDragging)
_hotSpotFadeOutDist1.StartDistance = FadeOutDistance + Length;
}
if (hotSpot==_hotSpotFadeOutDist2)
{
_hotSpotFadeOutDist2.Axis = this.XAxis;
if (!_hotSpotFadeOutDist2.IsDragging)
_hotSpotFadeOutDist2.StartDistance = Length - FadeOutDistance;
}
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:35,代码来源:ProjectorShape.cs
示例12: OnHotSpotDragEnd
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragEnd(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotConeAngleX)
{
if (_hotSpotConeAngleX.HasChanged)
{
float fNewAngle = _hotSpotConeAngleX.CurrentAngle;
ConeAngleX = _hotSpotConeAngleX.StartAngle; // set old angle for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"ConeAngleX",fNewAngle));
}
}
if (hotSpot==_hotSpotConeAngleY)
{
if (_hotSpotConeAngleY.HasChanged)
{
float fNewAngle = _hotSpotConeAngleY.CurrentAngle;
ConeAngleY = _hotSpotConeAngleY.StartAngle; // set old angle for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"ConeAngleY",fNewAngle));
}
}
if (hotSpot==_hotSpotLength)
{
if (_hotSpotLength.HasChanged)
{
float fNewDist = _hotSpotLength.CurrentDistance;
Length = _hotSpotLength.StartDistance; // set old angle for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"Length",fNewDist));
}
}
if (hotSpot==_hotSpotFadeOutDist1)
{
if (_hotSpotFadeOutDist1.HasChanged)
{
float fNewDist = _hotSpotFadeOutDist1.CurrentDistance - _hotSpotLength.CurrentDistance;
FadeOutDistance = _hotSpotFadeOutDist1.StartDistance - _hotSpotLength.CurrentDistance;;
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"FadeOutDistance",fNewDist));
}
}
if (hotSpot==_hotSpotFadeOutDist2)
{
if (_hotSpotFadeOutDist2.HasChanged)
{
float fNewDist = _hotSpotLength.CurrentDistance - _hotSpotFadeOutDist2.CurrentDistance;
FadeOutDistance = _hotSpotLength.CurrentDistance - _hotSpotFadeOutDist2.StartDistance;
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"FadeOutDistance",fNewDist));
}
}
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:53,代码来源:ProjectorShape.cs
示例13: OnHotSpotDragBegin
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragBegin(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotConeAngleX)
_hotSpotConeAngleX.StartAngle = this.ConeAngleX;
if (hotSpot==_hotSpotConeAngleY)
_hotSpotConeAngleY.StartAngle = this.ConeAngleY;
if (hotSpot==_hotSpotLength)
_hotSpotLength.StartDistance = this.Length;
if (hotSpot==_hotSpotFadeOutDist1)
_hotSpotFadeOutDist1.StartDistance = this.Length + this.FadeOutDistance;
if (hotSpot==_hotSpotFadeOutDist2)
_hotSpotFadeOutDist2.StartDistance = this.Length - this.FadeOutDistance;
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:18,代码来源:ProjectorShape.cs
示例14: OnHotSpotDrag
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
/// <param name="fDeltaX"></param>
/// <param name="fDeltaY"></param>
public override void OnHotSpotDrag(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY)
{
if (hotSpot==_hotSpotConeAngleX)
ConeAngleX = _hotSpotConeAngleX.CurrentAngle; // update for the view
if (hotSpot==_hotSpotConeAngleY)
ConeAngleY = _hotSpotConeAngleY.CurrentAngle;
if (hotSpot==_hotSpotLength)
Length = _hotSpotLength.CurrentDistance;
if (hotSpot==_hotSpotFadeOutDist1)
FadeOutDistance = _hotSpotFadeOutDist1.CurrentDistance - _hotSpotLength.CurrentDistance;
if (hotSpot==_hotSpotFadeOutDist2)
FadeOutDistance = _hotSpotLength.CurrentDistance - _hotSpotFadeOutDist2.CurrentDistance;
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:20,代码来源:ProjectorShape.cs
示例15: OnHotSpotDragBegin
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragBegin(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotSizeX)
_hotSpotSizeX.StartDistance = this.SizeX;
if (hotSpot==_hotSpotSizeY)
_hotSpotSizeY.StartDistance = this.SizeY;
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:12,代码来源:MirrorShape.cs
示例16: VisionViewBase_MouseContextChanged
void VisionViewBase_MouseContextChanged(object sender, CSharpFramework.Contexts.ContextChangedArgs e)
{
bool bIsTerrain = e.newContext is TerrainEditingBaseContext;
if (e.newContext != g_heightmapContext)
TerrainEditor.HeightmapEditMode = HeightmapEditMode_e.None;
}
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:7,代码来源:TerrainEditorPanel.cs
示例17: OnHotSpotDragEnd
/// <summary>
/// Overridden function
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragEnd(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotSizeX)
{
if (_hotSpotSizeX.HasChanged)
{
float fNewVal = _hotSpotSizeX.CurrentDistance;
SizeX = _hotSpotSizeX.StartDistance; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"SizeX",fNewVal));
}
}
if (hotSpot==_hotSpotSizeY)
{
if (_hotSpotSizeY.HasChanged)
{
float fNewVal = _hotSpotSizeY.CurrentDistance;
SizeY = _hotSpotSizeY.StartDistance; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"SizeY",fNewVal));
}
}
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:26,代码来源:MirrorShape.cs
示例18: OnPick
public override bool OnPick(MouseEventArgs e, CSharpFramework.Contexts.KeyModifier eKeyMod)
{
base.OnPick(e, eKeyMod);
Vector3F vStart = new Vector3F();
Vector3F vEnd = new Vector3F();
EditorManager.EngineManager.GetRayAtScreenPos(out vStart, out vEnd, e.X, e.Y, EditorManager.Settings.MaxPickingDistance);
ShapeComponentType compClass = (ShapeComponentType)EditorManager.EngineManager.ComponentClassManager.GetCollectionType("VMeshPaintingComponent");
if (compClass == null)
return false;
ShapeTraceResult result = new ShapeTraceResult();
ShapeCollection relevantShapes = EditorManager.Scene.RootShapes;
foreach (ShapeBase shape in relevantShapes)
shape.TraceShape(ShapeTraceMode_e.ShapePicking, vStart, vEnd, ref result, true);
if (result.bHit && result.hitShape != null)
{
// first find whether a componen of this type is already added:
ShapeComponent component = null;
if (result.hitShape.ComponentCount > 0)
component = result.hitShape.Components.GetComponentByType(compClass);
if (_bAdd)
{
if (component != null)
return true; // already attached
component = (ShapeComponent)compClass.CreateInstance(null);
AddShapeComponentAction action = new AddShapeComponentAction(result.hitShape, component);
if (action.Valid)
{
EditorManager.Actions.Add(action);
_terrainPanel.UpdateDecoration(false);
}
else
EditorManager.EngineManager.LogPrintWarning("Cannot attach vegetation painting component to shape " + result.hitShape.ShapeName);
}
else
{
if (component == null) // no component of this type attached
return true;
RemoveShapeComponentAction action = new RemoveShapeComponentAction(result.hitShape, component);
EditorManager.Actions.Add(action);
_terrainPanel.UpdateDecoration(false);
}
}
return true;
}
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:51,代码来源:TerrainEditorPanel.cs
示例19: _shaderFX_OnShaderEffectChanged
private void _shaderFX_OnShaderEffectChanged(object sender, CSharpFramework.Scene.ShaderEffectConfig.ShaderEffectChangedArgs e)
{
if (EngineMirror!=null)
EngineMirror.SetShaderEffect(_shaderFX);
OnShaderEffectChanged();
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:6,代码来源:MirrorShape.cs
示例20: OnPaintScene2DView
public override void OnPaintScene2DView(CSharpFramework.Controls.Scene2DView view, PaintEventArgs e)
{
if (SectorVisibleMask == 0)
return;
if (_bViewBitmapDirty)
{
UpdatePreviewBitmap();
_bViewBitmapDirty = false;
}
if (_2dViewBitmap != null)
{
BoundingBox sectorBBox = SectorExtent;
Point p1 = view.Transform(sectorBBox.vMin);
Point p2 = view.Transform(sectorBBox.vMax);
Rectangle dst = view.MakeValidRect(p1, p2);
// darker images for unloaded sectors
_2dViewAttr.SetGamma(CurrentStatus == SectorAction.Reloaded ? 1.0f : 4.0f);
e.Graphics.DrawImage(_2dViewBitmap, dst, 0, _2dViewBitmapResolution - 1, _2dViewBitmapResolution, -_2dViewBitmapResolution, GraphicsUnit.Pixel, _2dViewAttr); // flip vertically
// inside selection? then overlay with color
if (view.TouchesSelectionMarquee(sectorBBox))
e.Graphics.FillRectangle(_selectionFill, dst);
_pen.Color = Color.Turquoise;
if (CurrentStatus == SectorAction.Modified) _pen.Color = Color.Orange;
if (CurrentStatus == SectorAction.Reloaded) _pen.Color = Color.Magenta;
dst.Location = new Point(p1.X, p2.Y);
dst.Size = new Size(p2.X - p1.X, p1.Y - p2.Y);
e.Graphics.DrawRectangle(_pen, dst);
//Display terrain status
// Locked, Modified, Unmodified
if (_ownerTerrain.EngineTerrain.GetSectorNetworkLock(_iSectorX, _iSectorY))
{
dst.Width = 10;
dst.Height = 10;
_pen.Color = Color.Red;
e.Graphics.DrawRectangle(_pen, dst);
}
if (_ownerTerrain.EngineTerrain.GetSectorOwnsLock(_iSectorX, _iSectorY))
{
dst.Width = 10;
dst.Height = 10;
_pen.Color = Color.Green;
e.Graphics.DrawRectangle(_pen, dst);
}
}
else
base.OnPaintScene2DView(view, e);
if (FilterCollisionCat != null && FilterCollisionCat.Enabled)
{
if (SectorCollisionMask > 0)
{
BoundingBox sectorBBox = SectorExtent;
Point p1 = view.Transform(sectorBBox.vMin);
Point p2 = view.Transform(sectorBBox.vMax);
Rectangle dst = view.MakeValidRect(p1, p2);
e.Graphics.DrawString("C", _font, Brushes.White, dst);
}
}
}
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:67,代码来源:TerrainVisibilityZoneShape.cs
注:本文中的CSharpFramework类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论