C# Класс Axiom.Overlays.OverlayElement

Abstract definition of a 2D element to be displayed in an Overlay.
This class abstracts all the details of a 2D element which will appear in an overlay. In fact, not all OverlayElement instances can be directly added to an Overlay, only those which are OverlayElementContainer instances (derived from this class) are able to be added, however they can contain any OverlayElement however. This is done to enforce some level of grouping of widgets.
OverlayElements should be managed using OverlayElementManager. This class is responsible for instantiating / deleting elements, and also for accepting new types of element from plugins etc.
Note that positions / dimensions of 2D screen elements are expressed as parametric values (0.0 - 1.0) because this makes them resolution-independent. However, most screen resolutions have an aspect ratio of 1.3333:1 (width : height) so note that in physical pixels 0.5 is wider than it is tall, so a 0.5x0.5 panel will not be square on the screen (but it will take up exactly half the screen in both dimensions).
Наследование: IRenderable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
clippingRegion Axiom.Core.Rectangle
color Axiom.Core.ColorEx
customParams List
derivedLeft float
emptyLightList LightList
horzAlign HorizontalAlignment
isCloneable bool
isDerivedOutOfDate bool
isEnabled bool
isGeomPositionsOutOfDate bool
isGeomUVsOutOfDate bool
isInitialized bool
isVisible bool
left float
material Axiom.Graphics.Material
materialName string
metricsMode MetricsMode
name string
overlay Overlay
parent OverlayElementContainer
pixelHeight float
pixelLeft float
pixelScaleX float
pixelScaleY float
pixelTop float
pixelWidth float
renderOperation Axiom.Graphics.RenderOperation
sourceTemplate OverlayElement
text string
vertAlign VerticalAlignment
xform Axiom.MathLib.Matrix4[]
zOrder int

Открытые методы

Метод Описание
Clone ( string instanceName ) : OverlayElement
Contains ( float x, float y ) : bool

Returns true if xy is within the constraints of the component

CopyFromTemplate ( OverlayElement template ) : void

Copys data from the template element to this element to clone it.

CopyParametersTo ( OverlayElement instance ) : void
FindElementAt ( float x, float y ) : OverlayElement

Returns true if xy is within the constraints of the component

GetCustomParameter ( int index ) : Vector4
GetSquaredViewDepth ( Camera camera ) : float

Implementation of IRenderable.

GetWorldOrientation ( ) : Axiom.MathLib.Quaternion

GetWorldPosition ( ) : Vector3
GetWorldTransforms ( Axiom.MathLib.Matrix4 matrices ) : void

Hide ( ) : void

Hides an element if it is currently visible.

Initialize ( ) : void

Initialize the OverlayElement.

NotifyParent ( OverlayElementContainer parent, Overlay overlay ) : void

Internal method for notifying the gui element of it's parent and ultimate overlay.

NotifyViewport ( ) : void

Notifies the viewport.

NotifyWorldTransforms ( Axiom.MathLib.Matrix4 xform ) : void

Notifies the world transforms.

NotifyZOrder ( int zOrder ) : int

Internal method to notify the element when Zorder of parent overlay has changed.

Overlays have explicit Z orders. OverlayElements do not, they inherit the ZOrder of the overlay, and the Zorder is incremented for every container nested within this to ensure that containers are displayed behind contained items. This method is used internally to notify the element of a change in final zorder which is used to render the element.

PositionsOutOfDate ( ) : void

Tells this element to recaculate it's position.

ScreenDimensions ( float width, float height ) : void

Sets the width and height of this element in relation to the screen (where 1.0 = screen width)

ScreenHeight ( float height ) : void

Sets the height of this element in relation to the screen (where 1.0 = screen width)

ScreenLeft ( float left ) : void

Sets the left of this element in relation to the screen (where 1.0 = screen width)

ScreenPosition ( float left, float top ) : void

Sets the left and top of this element in relation to the screen (where 1.0 = screen width)

ScreenTop ( float top ) : void

Sets the top of this element in relation to the screen (where 1.0 = screen width)

ScreenWidth ( float width ) : void

Sets the width of this element in relation to the screen (where 1.0 = screen width)

SetCustomParameter ( int index, Vector4 val ) : void
SetDimensions ( float width, float height ) : void

Sets the dimensions.

SetParam ( string param, string val ) : bool

Sets param values from script values. Subclasses can define their own params in addition to what this base class already defines.

SetPosition ( float left, float top ) : void

Sets the position of this element.

Show ( ) : void

Shows this element if it was previously hidden.

Update ( ) : void

Internal method to update the element based on transforms applied.

UpdateCustomGpuParameter ( GpuProgramParameters entry, GpuProgramParameters gpuParams ) : void
UpdateFromParent ( ) : void

Updates this elements transform based on it's parent.

UpdateRenderQueue ( RenderQueue queue ) : void

Internal method to put the contents onto the render queue.

Защищенные методы

Метод Описание
OverlayElement ( string name ) : System

UpdatePositionGeometry ( ) : void

Internal method which is triggered when the positions of the element get updated, meaning the element should be rebuilding it's mesh positions. Abstract since subclasses must implement this.

UpdateTextureGeometry ( ) : void

Internal method which is triggered when the UVs of the element get updated, meaning the element should be rebuilding it's mesh UVs. Abstract since subclasses must implement this.

dispose ( bool disposeManagedResources ) : void

Class level dispose method

When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }

Описание методов

Clone() публичный метод

public Clone ( string instanceName ) : OverlayElement
instanceName string
Результат OverlayElement

Contains() публичный метод

Returns true if xy is within the constraints of the component
public Contains ( float x, float y ) : bool
x float
y float
Результат bool

CopyFromTemplate() публичный метод

Copys data from the template element to this element to clone it.
public CopyFromTemplate ( OverlayElement template ) : void
template OverlayElement
Результат void

CopyParametersTo() публичный метод

public CopyParametersTo ( OverlayElement instance ) : void
instance OverlayElement
Результат void

FindElementAt() публичный метод

Returns true if xy is within the constraints of the component
public FindElementAt ( float x, float y ) : OverlayElement
x float The x.
y float The y.
Результат OverlayElement

GetCustomParameter() публичный метод

public GetCustomParameter ( int index ) : Vector4
index int
Результат Vector4

GetSquaredViewDepth() публичный метод

Implementation of IRenderable.
public GetSquaredViewDepth ( Camera camera ) : float
camera Axiom.Core.Camera
Результат float

GetWorldOrientation() публичный метод

public GetWorldOrientation ( ) : Axiom.MathLib.Quaternion
Результат Axiom.MathLib.Quaternion

GetWorldPosition() публичный метод

public GetWorldPosition ( ) : Vector3
Результат Vector3

GetWorldTransforms() публичный метод

public GetWorldTransforms ( Axiom.MathLib.Matrix4 matrices ) : void
matrices Axiom.MathLib.Matrix4
Результат void

Hide() публичный метод

Hides an element if it is currently visible.
public Hide ( ) : void
Результат void

Initialize() публичный абстрактный метод

Initialize the OverlayElement.
public abstract Initialize ( ) : void
Результат void

NotifyParent() публичный метод

Internal method for notifying the gui element of it's parent and ultimate overlay.
public NotifyParent ( OverlayElementContainer parent, Overlay overlay ) : void
parent OverlayElementContainer Parent of this element.
overlay Overlay Overlay this element belongs to.
Результат void

NotifyViewport() публичный метод

Notifies the viewport.
public NotifyViewport ( ) : void
Результат void

NotifyWorldTransforms() публичный метод

Notifies the world transforms.
public NotifyWorldTransforms ( Axiom.MathLib.Matrix4 xform ) : void
xform Axiom.MathLib.Matrix4 The xform.
Результат void

NotifyZOrder() публичный метод

Internal method to notify the element when Zorder of parent overlay has changed.
Overlays have explicit Z orders. OverlayElements do not, they inherit the ZOrder of the overlay, and the Zorder is incremented for every container nested within this to ensure that containers are displayed behind contained items. This method is used internally to notify the element of a change in final zorder which is used to render the element.
public NotifyZOrder ( int zOrder ) : int
zOrder int The z order.
Результат int

OverlayElement() защищенный метод

protected OverlayElement ( string name ) : System
name string
Результат System

PositionsOutOfDate() публичный метод

Tells this element to recaculate it's position.
public PositionsOutOfDate ( ) : void
Результат void

ScreenDimensions() публичный метод

Sets the width and height of this element in relation to the screen (where 1.0 = screen width)
public ScreenDimensions ( float width, float height ) : void
width float
height float
Результат void

ScreenHeight() публичный метод

Sets the height of this element in relation to the screen (where 1.0 = screen width)
public ScreenHeight ( float height ) : void
height float
Результат void

ScreenLeft() публичный метод

Sets the left of this element in relation to the screen (where 1.0 = screen width)
public ScreenLeft ( float left ) : void
left float
Результат void

ScreenPosition() публичный метод

Sets the left and top of this element in relation to the screen (where 1.0 = screen width)
public ScreenPosition ( float left, float top ) : void
left float
top float
Результат void

ScreenTop() публичный метод

Sets the top of this element in relation to the screen (where 1.0 = screen width)
public ScreenTop ( float top ) : void
top float
Результат void

ScreenWidth() публичный метод

Sets the width of this element in relation to the screen (where 1.0 = screen width)
public ScreenWidth ( float width ) : void
width float
Результат void

SetCustomParameter() публичный метод

public SetCustomParameter ( int index, Vector4 val ) : void
index int
val Vector4
Результат void

SetDimensions() публичный метод

Sets the dimensions.
public SetDimensions ( float width, float height ) : void
width float The width.
height float The height.
Результат void

SetParam() публичный метод

Sets param values from script values. Subclasses can define their own params in addition to what this base class already defines.
public SetParam ( string param, string val ) : bool
param string
val string
Результат bool

SetPosition() публичный метод

Sets the position of this element.
public SetPosition ( float left, float top ) : void
left float The left.
top float The top.
Результат void

Show() публичный метод

Shows this element if it was previously hidden.
public Show ( ) : void
Результат void

Update() публичный метод

Internal method to update the element based on transforms applied.
public Update ( ) : void
Результат void

UpdateCustomGpuParameter() публичный метод

public UpdateCustomGpuParameter ( GpuProgramParameters entry, GpuProgramParameters gpuParams ) : void
entry Axiom.Graphics.GpuProgramParameters
gpuParams Axiom.Graphics.GpuProgramParameters
Результат void

UpdateFromParent() публичный метод

Updates this elements transform based on it's parent.
public UpdateFromParent ( ) : void
Результат void

UpdatePositionGeometry() защищенный абстрактный метод

Internal method which is triggered when the positions of the element get updated, meaning the element should be rebuilding it's mesh positions. Abstract since subclasses must implement this.
protected abstract UpdatePositionGeometry ( ) : void
Результат void

UpdateRenderQueue() публичный метод

Internal method to put the contents onto the render queue.
public UpdateRenderQueue ( RenderQueue queue ) : void
queue Axiom.Graphics.RenderQueue Current render queue.
Результат void

UpdateTextureGeometry() защищенный абстрактный метод

Internal method which is triggered when the UVs of the element get updated, meaning the element should be rebuilding it's mesh UVs. Abstract since subclasses must implement this.
protected abstract UpdateTextureGeometry ( ) : void
Результат void

dispose() защищенный метод

Class level dispose method
When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool True if Unmanaged resources should be released.
Результат void

Описание свойств

clippingRegion защищенное свойство

protected Rectangle,Axiom.Core clippingRegion
Результат Axiom.Core.Rectangle

color защищенное свойство

protected ColorEx,Axiom.Core color
Результат Axiom.Core.ColorEx

customParams защищенное свойство

protected List customParams
Результат List

derivedLeft защищенное свойство

protected float derivedLeft
Результат float

emptyLightList защищенное свойство

protected LightList emptyLightList
Результат LightList

horzAlign защищенное свойство

protected HorizontalAlignment horzAlign
Результат HorizontalAlignment

isCloneable защищенное свойство

protected bool isCloneable
Результат bool

isDerivedOutOfDate защищенное свойство

protected bool isDerivedOutOfDate
Результат bool

isEnabled защищенное свойство

protected bool isEnabled
Результат bool

isGeomPositionsOutOfDate защищенное свойство

protected bool isGeomPositionsOutOfDate
Результат bool

isGeomUVsOutOfDate защищенное свойство

protected bool isGeomUVsOutOfDate
Результат bool

isInitialized защищенное свойство

protected bool isInitialized
Результат bool

isVisible защищенное свойство

protected bool isVisible
Результат bool

left защищенное свойство

protected float left
Результат float

material защищенное свойство

protected Material,Axiom.Graphics material
Результат Axiom.Graphics.Material

materialName защищенное свойство

protected string materialName
Результат string

metricsMode защищенное свойство

protected MetricsMode metricsMode
Результат MetricsMode

name защищенное свойство

protected string name
Результат string

overlay защищенное свойство

protected Overlay,Axiom.Overlays overlay
Результат Overlay

parent защищенное свойство

protected OverlayElementContainer,Axiom.Overlays parent
Результат OverlayElementContainer

pixelHeight защищенное свойство

protected float pixelHeight
Результат float

pixelLeft защищенное свойство

protected float pixelLeft
Результат float

pixelScaleX защищенное свойство

protected float pixelScaleX
Результат float

pixelScaleY защищенное свойство

protected float pixelScaleY
Результат float

pixelTop защищенное свойство

protected float pixelTop
Результат float

pixelWidth защищенное свойство

protected float pixelWidth
Результат float

renderOperation защищенное свойство

protected RenderOperation,Axiom.Graphics renderOperation
Результат Axiom.Graphics.RenderOperation

sourceTemplate защищенное свойство

protected OverlayElement,Axiom.Overlays sourceTemplate
Результат OverlayElement

text защищенное свойство

protected string text
Результат string

vertAlign защищенное свойство

protected VerticalAlignment vertAlign
Результат VerticalAlignment

xform защищенное свойство

protected Matrix4[],Axiom.MathLib xform
Результат Axiom.MathLib.Matrix4[]

zOrder защищенное свойство

protected int zOrder
Результат int