Assimp
v3.1.1 (June 2014)
|
Data structure for a material. More...
Classes | |
class | Property |
Data structure for a single material property. More... | |
enum | PropertyKey |
Enumerates all supported material properties. More... | |
enum | PropertyType |
A very primitive RTTI system for the contents of material properties. More... | |
Public Member Functions | |
float | getBlendFactor (AiTextureType type, int index) |
Returns the blend factor of the texture. More... | |
AiBlendMode | getBlendMode () |
Returns the blend mode. More... | |
float | getBumpScaling () |
Returns the bump scaling factor. More... | |
String | getGlobalBackgroundImage () |
Returns the global background image. More... | |
String | getName () |
Returns the name of the material. More... | |
int | getNumTextures (AiTextureType type) |
Returns the number of textures of the given type. More... | |
float | getOpacity () |
Returns the opacity. More... | |
List< Property > | getProperties () |
Returns all properties of the material. More... | |
Property | getProperty (String key) |
Returns a single property based on its key. More... | |
Property | getProperty (String key, int semantic, int index) |
Returns a single property based on its key. More... | |
float | getReflectivity () |
Returns the reflectivity. More... | |
float | getRefractIndex () |
Returns the refract index. More... | |
AiShadingMode | getShadingMode () |
Returns the shading mode. More... | |
float | getShininess () |
Returns the shininess. More... | |
float | getShininessStrength () |
Returns the shininess strength. More... | |
String | getTextureFile (AiTextureType type, int index) |
Returns the texture file. More... | |
AiTextureInfo | getTextureInfo (AiTextureType type, int index) |
Returns all information related to a single texture. More... | |
AiTextureMapMode | getTextureMapModeU (AiTextureType type, int index) |
Returns the texture mapping mode for the u axis. More... | |
AiTextureMapMode | getTextureMapModeV (AiTextureType type, int index) |
Returns the texture mapping mode for the v axis. More... | |
AiTextureMapMode | getTextureMapModeW (AiTextureType type, int index) |
Returns the texture mapping mode for the w axis. More... | |
AiTextureOp | getTextureOp (AiTextureType type, int index) |
Returns the texture operation. More... | |
int | getTextureUVIndex (AiTextureType type, int index) |
Returns the index of the UV coordinate set used by the texture. More... | |
int | getTwoSided () |
Returns the two-sided flag. More... | |
int | getWireframe () |
Returns the wireframe flag. More... | |
boolean | hasProperties (Set< PropertyKey > keys) |
Checks whether the given set of properties is available. More... | |
void | setDefault (PropertyKey key, Object defaultValue) |
Sets a default value. More... | |
Data structure for a material.
Depending on the imported scene and scene format, individual properties might be present or not. A list of all imported properties can be retrieved via getProperties().
This class offers getXXX()
for all supported properties. These methods are fail-save, i.e., will return a default value when the corresponding property is not set. To change the built in default values, use the setDefaultXXX()
methods.
If your application expects a certain set of properties to be available, the hasProperties(Set) method can be used to check whether all these properties are actually set. If this check fails, you can still use this material via the getXXX()
methods without special error handling code as the implementation guarantees to return default values for missing properties. This check will not work on texture related properties (i.e., properties starting with TEX_
).
|
inline |
Returns the blend factor of the texture.
If missing, defaults to 1.0
type | the texture type |
index | the index in the texture stack |
|
inline |
|
inline |
Returns the bump scaling factor.
If missing, defaults to 1.0
|
inline |
Returns the global background image.
If missing, defaults to empty string
|
inline |
Returns the name of the material.
If missing, defaults to empty string
|
inline |
Returns the number of textures of the given type.
type | the type |
|
inline |
Returns the opacity.
If missing, defaults to 1.0
|
inline |
Returns all properties of the material.
|
inline |
Returns a single property based on its key.
key | the key |
|
inline |
Returns a single property based on its key.
key | the key |
semantic | the semantic type (texture type) |
index | the index |
|
inline |
Returns the reflectivity.
If missing, defaults to 0.0
|
inline |
Returns the refract index.
If missing, defaults to 0.0
|
inline |
|
inline |
Returns the shininess.
If missing, defaults to 1.0
|
inline |
Returns the shininess strength.
If missing, defaults to 0.0
|
inline |
Returns the texture file.
If missing, defaults to empty string
type | the texture type |
index | the index in the texture stack |
IndexOutOfBoundsException | if index is invalid |
|
inline |
Returns all information related to a single texture.
type | the texture type |
index | the index in the texture stack |
|
inline |
Returns the texture mapping mode for the u axis.
If missing, defaults to AiTextureMapMode#CLAMP
type | the texture type |
index | the index in the texture stack |
|
inline |
Returns the texture mapping mode for the v axis.
If missing, defaults to AiTextureMapMode#CLAMP
type | the texture type |
index | the index in the texture stack |
|
inline |
Returns the texture mapping mode for the w axis.
If missing, defaults to AiTextureMapMode#CLAMP
type | the texture type |
index | the index in the texture stack |
|
inline |
Returns the texture operation.
If missing, defaults to AiTextureOp#ADD
type | the texture type |
index | the index in the texture stack |
|
inline |
Returns the index of the UV coordinate set used by the texture.
If missing, defaults to 0
type | the texture type |
index | the index in the texture stack |
IndexOutOfBoundsException | if index is invalid |
|
inline |
Returns the two-sided flag.
If missing, defaults to 0
|
inline |
Returns the wireframe flag.
If missing, defaults to 0
|
inline |
Checks whether the given set of properties is available.
keys | the keys to check |
|
inline |
Sets a default value.
The passed in Object must match the type of the key as returned by the corresponding getXXX()
method.
key | the key |
defaultValue | the new default, may not be null |
IllegalArgumentException | if defaultValue is null or has a wrong type |