C# 클래스 Axiom.SceneManagers.Bsp.BspGeometry

Represents the bsp geometry. This is added to the RenderQueue so that i can determine at RenderSingleObject when the geometry needs to be rendered and with what lights.
상속: IRenderable
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
geometryMat Axiom.Graphics.Material
renderOperation Axiom.Graphics.RenderOperation
technique Axiom.Graphics.Technique

공개 메소드들

메소드 설명
BspGeometry ( ) : System
Dispose ( ) : void
GetCustomParameter ( int index ) : Vector4

Gets the custom value associated with this Renderable at the given index.

GetSquaredViewDepth ( Camera camera ) : float

Returns the camera-relative squared depth of this renderable.

Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result.

GetWorldTransforms ( Matrix4 matrices ) : void

Gets the world transform matrix / matrices for this renderable object.

If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

This method will populate xform with 1 matrix if it does not use vertex blending. If it does use vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

SetCustomParameter ( int index, Vector4 val ) : void

Sets a custom parameter for this Renderable, which may be used to drive calculations for this specific Renderable, like GPU program parameters.

Calling this method simply associates a numeric index with a 4-dimensional value for this specific Renderable. This is most useful if the material which this Renderable uses a vertex or fragment program, and has an AutoConstant.Custom parameter entry. This parameter entry can refer to the index you specify as part of this call, thereby mapping a custom parameter for this renderable to a program parameter.

UpdateCustomGpuParameter ( GpuProgramParameters constant, GpuProgramParameters parameters ) : void

Update a custom GpuProgramParameters constant which is derived from information only this Renderable knows.

This method allows a Renderable to map in a custom GPU program parameter based on it's own data. This is represented by a GPU auto parameter of AutoConstantType.Custom, and to allow there to be more than one of these per Renderable, the 'data' field on the auto parameter will identify which parameter is being updated. The implementation of this method must identify the parameter being updated, and call a 'SetConstant' method on the passed in GpuProgramParameters object, using the details provided in the incoming auto constant setting to identify the index at which to set the parameter.

보호된 메소드들

메소드 설명
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 ); }

메소드 상세

BspGeometry() 공개 메소드

public BspGeometry ( ) : System
리턴 System

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetCustomParameter() 공개 메소드

Gets the custom value associated with this Renderable at the given index.
public GetCustomParameter ( int index ) : Vector4
index int
리턴 Vector4

GetSquaredViewDepth() 공개 메소드

Returns the camera-relative squared depth of this renderable.
Used to sort transparent objects. Squared depth is used rather than actual depth to avoid having to perform a square root on the result.
public GetSquaredViewDepth ( Camera camera ) : float
camera Axiom.Core.Camera
리턴 float

GetWorldTransforms() 공개 메소드

Gets the world transform matrix / matrices for this renderable object.
If the object has any derived transforms, these are expected to be up to date as long as all the SceneNode structures have been updated before this is called.

This method will populate xform with 1 matrix if it does not use vertex blending. If it does use vertex blending it will fill the passed in pointer with an array of matrices, the length being the value returned from getNumWorldTransforms.

public GetWorldTransforms ( Matrix4 matrices ) : void
matrices Axiom.Math.Matrix4
리턴 void

SetCustomParameter() 공개 메소드

Sets a custom parameter for this Renderable, which may be used to drive calculations for this specific Renderable, like GPU program parameters.
Calling this method simply associates a numeric index with a 4-dimensional value for this specific Renderable. This is most useful if the material which this Renderable uses a vertex or fragment program, and has an AutoConstant.Custom parameter entry. This parameter entry can refer to the index you specify as part of this call, thereby mapping a custom parameter for this renderable to a program parameter.
public SetCustomParameter ( int index, Vector4 val ) : void
index int /// The index with which to associate the value. Note that this /// does not have to start at 0, and can include gaps. It also has no direct /// correlation with a GPU program parameter index - the mapping between the /// two is performed by the AutoConstant.Custom entry, if that is used. ///
val Vector4 The value to associate.
리턴 void

UpdateCustomGpuParameter() 공개 메소드

Update a custom GpuProgramParameters constant which is derived from information only this Renderable knows.
This method allows a Renderable to map in a custom GPU program parameter based on it's own data. This is represented by a GPU auto parameter of AutoConstantType.Custom, and to allow there to be more than one of these per Renderable, the 'data' field on the auto parameter will identify which parameter is being updated. The implementation of this method must identify the parameter being updated, and call a 'SetConstant' method on the passed in GpuProgramParameters object, using the details provided in the incoming auto constant setting to identify the index at which to set the parameter.
public UpdateCustomGpuParameter ( GpuProgramParameters constant, GpuProgramParameters parameters ) : void
constant Axiom.Graphics.GpuProgramParameters The auto constant entry referring to the parameter being updated.
parameters Axiom.Graphics.GpuProgramParameters The parameters object which this method should call to set the updated parameters.
리턴 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

프로퍼티 상세

geometryMat 보호되어 있는 프로퍼티

protected Material,Axiom.Graphics geometryMat
리턴 Axiom.Graphics.Material

renderOperation 보호되어 있는 프로퍼티

protected RenderOperation,Axiom.Graphics renderOperation
리턴 Axiom.Graphics.RenderOperation

technique 보호되어 있는 프로퍼티

protected Technique,Axiom.Graphics technique
리턴 Axiom.Graphics.Technique