Свойство | Тип | Описание | |
---|---|---|---|
UserLodValues | LodValueList | ||
autoNumber | int | ||
bestTechniquesByScheme | Dictionary |
||
defaultSettings |
Метод | Описание | |
---|---|---|
ApplyDefaults ( ) : void |
|
|
ApplyTextureAliases ( string>.Dictionary |
||
ApplyTextureAliases ( string>.Dictionary |
Applies texture names to Texture Unit State with matching texture name aliases. All techniques, passes, and Texture Unit States within the material are checked. If matching texture aliases are found then true is returned.
|
|
Clone ( string newName ) : |
Creates a copy of this Material with the specified name (must be unique).
|
|
Clone ( string newName, bool changeGroup, string newGroup ) : |
||
CompareTo ( object obj ) : int |
Used for comparing 2 Material objects. This comparison will be used in RenderQueue group sorting of Materials materials. If this object is transparent and the object being compared is not, this is greater that obj. If this object is not transparent and the object being compared is, obj is greater than this. |
|
Compile ( ) : void |
'Compiles' this Material. Compiling a material involves determining which Techniques are supported on the card on which the engine is currently running, and for fixed-function Passes within those Techniques, splitting the passes down where they contain more TextureUnitState instances than the current card has texture units. This process is automatically done when the Material is loaded, but may be repeated if you make some procedural changes.By default, the engine will automatically split texture unit operations into multiple passes when the target hardware does not have enough texture units. |
|
Compile ( bool autoManageTextureUnits ) : void | ||
CopyTo ( |
Copies the details from the supplied material.
|
|
CopyTo ( |
||
CreateTechnique ( ) : |
Creates a new Technique for this Material. A Technique is a single way of rendering geometry in order to achieve the effect you are intending in a material. There are many reason why you would want more than one - the main one being to handle variable graphics card abilities; you might have one technique which is impressive but only runs on 4th-generation graphics cards, for example. In this case you will want to create at least one fallback Technique. The engine will work out which Techniques a card can support and pick the best one. If multiple Techniques are available, the order in which they are created is important - the engine will consider lower-indexed Techniques to be preferable to higher-indexed Techniques, ie when asked for the 'best' technique it will return the first one in the technique list which is supported by the hardware. |
|
GetBestTechnique ( ) : |
Gets the best supported technique. This method returns the lowest-index supported Technique in this material (since lower-indexed Techniques are considered to be better than higher-indexed ones). The best supported technique is only available after this material has been compiled, which typically happens on loading the material. Therefore, if this method returns null, try calling Material.Load. |
|
GetBestTechnique ( int lodIndex ) : |
||
GetBestTechnique ( int lodIndex, IRenderable renderable ) : |
||
GetHashCode ( ) : int |
Overridden to give Materials a meaningful hash code.
|
|
GetLodIndex ( Real distance ) : int |
Gets the LOD index to use at the given distance. The value passed in is the 'transformed' value. If you are dealing with an original source value (e.g. distance), use |
|
GetTechnique ( int index ) : |
Gets the technique at the specified index.
|
|
Material ( |
||
Material ( |
||
RemoveAllTechniques ( ) : void |
Removes all techniques from this material.
|
|
RemoveTechnique ( |
Removes the specified Technique from this material.
|
|
SetFog ( bool overrideScene ) : void | ||
SetFog ( bool overrideScene, FogMode mode, ColorEx color, System.Single expDensity, System.Single linearStart, System.Single linearEnd ) : void |
Sets the fogging mode applied to each pass. This property has been moved to the Pass class, which is accessible via the Technique. For simplicity, this method allows you to set these properties for every current Technique, and for every current Pass within those Techniques. If you need more precision, retrieve the Technique and Pass instances and set the property there. |
|
SetLodLevels ( LodValueList lodDistanceList ) : void |
Sets the distance at which level-of-detail (LOD) levels come into effect. You should only use this if you have assigned LOD indexes to the Technique instances attached to this Material. If you have done so, you should call this method to determine the distance at which the low levels of detail kick in. The decision about what distance is actually used is a combination of this and the LOD bias applied to both the current Camera and the current Entity. |
|
SetSceneBlending ( SceneBlendFactor src, SceneBlendFactor dest ) : void |
Allows very fine control of blending every Pass with the existing contents of the scene. This property has been moved to the Pass class, which is accessible via the Technique. For simplicity, this method allows you to set these properties for every current Technique, and for every current Pass within those Techniques. If you need more precision, retrieve the Technique and Pass instances and set the property there. |
|
SetSceneBlending ( SceneBlendType blendType ) : void |
Sets the kind of blending every pass has with the existing contents of the scene. This property has been moved to the Pass class, which is accessible via the Technique. For simplicity, this method allows you to set these properties for every current Technique, and for every current Pass within those Techniques. If you need more precision, retrieve the Technique and Pass instances and set the property there. |
|
ToString ( ) : string |
Overridden.
|
|
Touch ( ) : void |
Overridden to ensure a recompile occurs if needed before use.
|
Метод | Описание | |
---|---|---|
calculateSize ( ) : int |
Calculate the size of a material; this will only be called after 'load'
|
|
dispose ( bool disposeManagedResources ) : void |
Overridden to ensure a release of techniques.
|
|
load ( ) : void |
Overridden from Resource. By default, Materials are not loaded, and adding additional textures etc do not cause those textures to be loaded. When the |
|
unload ( ) : void |
Unloads the material, frees resources etc. Resource
|
Метод | Описание | |
---|---|---|
ClearBestTechniqueList ( ) : void | ||
InsertSupportedTechnique ( |
||
NotifyNeedsRecompile ( ) : void |
Tells the material that it needs recompilation.
|
public ApplyTextureAliases ( string>.Dictionary |
||
aliasList | string>.Dictionary | |
Результат | bool |
public ApplyTextureAliases ( string>.Dictionary |
||
aliasList | string>.Dictionary | is a map container of texture alias, texture name pairs |
apply | bool | set true to apply the texture aliases else just test to see if texture alias matches are found. |
Результат | bool |
public Clone ( string newName ) : |
||
newName | string | The name that the cloned material will be known as. |
Результат |
public Clone ( string newName, bool changeGroup, string newGroup ) : |
||
newName | string | |
changeGroup | bool | |
newGroup | string | |
Результат |
public Compile ( bool autoManageTextureUnits ) : void | ||
autoManageTextureUnits | bool | /// If true, when a fixed function pass has too many TextureUnitState /// entries than the card has texture units, the Pass in question will be split into /// more than one Pass in order to emulate the Pass. If you set this to false and /// this situation arises, an Exception will be thrown. /// |
Результат | void |
public CopyTo ( |
||
target | Material which will receive this material's settings. | |
Результат | void |
public CopyTo ( |
||
target | ||
copyUniqueInfo | bool | preserves the target's handle, group, name, and loading properties (unlike operator=) but copying everything else. |
Результат | void |
public GetBestTechnique ( int lodIndex ) : |
||
lodIndex | int | |
Результат |
public GetBestTechnique ( int lodIndex, IRenderable renderable ) : |
||
lodIndex | int | |
renderable | IRenderable | |
Результат |
public GetLodIndex ( Real distance ) : int | ||
distance | Real | |
Результат | int |
public GetTechnique ( int index ) : |
||
index | int | Index of the technique to return. |
Результат |
public Material ( |
||
parent | ||
name | string | |
handle | System.UInt64 | |
group | string | |
Результат | System |
public Material ( |
||
parent | ||
name | string | |
handle | System.UInt64 | |
group | string | |
isManual | bool | |
loader | IManualResourceLoader | |
Результат | System |
public RemoveTechnique ( |
||
t | A reference to the technique to remove | |
Результат | void |
public SetFog ( bool overrideScene ) : void | ||
overrideScene | bool | |
Результат | void |
public SetFog ( bool overrideScene, FogMode mode, ColorEx color, System.Single expDensity, System.Single linearStart, System.Single linearEnd ) : void | ||
overrideScene | bool | |
mode | FogMode | |
color | ColorEx | |
expDensity | System.Single | |
linearStart | System.Single | |
linearEnd | System.Single | |
Результат | void |
public SetLodLevels ( LodValueList lodDistanceList ) : void | ||
lodDistanceList | LodValueList | /// A list of floats which indicate the distance at which to /// switch to lower details. They are listed in LOD index order, starting at index /// 1 (ie the first level down from the highest level 0, which automatically applies /// from a distance of 0). /// |
Результат | void |
public SetSceneBlending ( SceneBlendFactor src, SceneBlendFactor dest ) : void | ||
src | SceneBlendFactor | |
dest | SceneBlendFactor | |
Результат | void |
public SetSceneBlending ( SceneBlendType blendType ) : void | ||
blendType | SceneBlendType | |
Результат | void |
protected dispose ( bool disposeManagedResources ) : void | ||
disposeManagedResources | bool | |
Результат | void |
protected Dictionary |
||
Результат | Dictionary |