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
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
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