C# Class 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.
Inheritance: IRenderable
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Свойство Type Description
geometryMat Axiom.Graphics.Material
renderOperation Axiom.Graphics.RenderOperation
technique Axiom.Graphics.Technique

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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 ); }

Method Details

BspGeometry() public méthode

public BspGeometry ( ) : System
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetCustomParameter() public méthode

Gets the custom value associated with this Renderable at the given index.
public GetCustomParameter ( int index ) : Vector4
index int
Résultat Vector4

GetSquaredViewDepth() public méthode

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
Résultat float

GetWorldTransforms() public méthode

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
Résultat void

SetCustomParameter() public méthode

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.
Résultat void

UpdateCustomGpuParameter() public méthode

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.
Résultat void

dispose() protected méthode

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.
Résultat void

Property Details

geometryMat protected_oe property

protected Material,Axiom.Graphics geometryMat
Résultat Axiom.Graphics.Material

renderOperation protected_oe property

protected RenderOperation,Axiom.Graphics renderOperation
Résultat Axiom.Graphics.RenderOperation

technique protected_oe property

protected Technique,Axiom.Graphics technique
Résultat Axiom.Graphics.Technique