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
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
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