本文整理汇总了C#中CSharpFramework类的典型用法代码示例。如果您正苦于以下问题:C# CSharpFramework类的具体用法?C# CSharpFramework怎么用?C# CSharpFramework使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CSharpFramework类属于命名空间,在下文中一共展示了CSharpFramework类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnActivate
public override void OnActivate(CSharpFramework.VisionViewBase currentView)
{
base.OnActivate(currentView);
Picking.Init();
IProject.ProjectUnloaded += new EventHandler(IProject_ProjectUnloaded);
}
示例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);
}
示例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;
}
示例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);
}
示例5: ApplicationLayout_ActiveLayoutChanged
void ApplicationLayout_ActiveLayoutChanged(object sender, CSharpFramework.Layout.LayoutManager.ActiveLayoutChangedArgs e)
{
SendLayout(e.NewLayout);
}
示例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
}
}
示例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;
}
示例8: GetScene2DRenderingSortingKey
public override float GetScene2DRenderingSortingKey(CSharpFramework.Controls.Scene2DView view)
{
return AbsoluteBoundingBox.Z1; // bottom of box
}
示例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;
}
}
示例10: OnExport
public override bool OnExport(CSharpFramework.Scene.SceneExportInfo info)
{
return base.OnExport (info);
}
示例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;
}
}
示例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));
}
}
}
示例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;
}
示例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;
}
示例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;
}