DX::IDXMaterial Struct Reference

#include <IDXMaterial.h>

Inherits DX::IDXUserData, and DX::IDXModelOwned.

Collaboration diagram for DX::IDXMaterial:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual const char *DXMCALL GetID () const =0
virtual const DXColor DXMCALL GetDiffuse () const =0
virtual const DXColor DXMCALL GetAmbient () const =0
virtual const DXColor DXMCALL GetSpecular () const =0
virtual const DXColor DXMCALL GetEmissive () const =0
virtual float DXMCALL GetOpacity () const =0
virtual float DXMCALL GetSpecularSharpness () const =0
virtual DXReflectionType DXMCALL GetReflectionType () const =0
virtual float DXMCALL GetEnvironmentOpacity () const =0
virtual float DXMCALL GetEnvironmentGradient () const =0
virtual bool DXMCALL GetClampUV () const =0
virtual DXError DXMCALL SetID (const char *id)=0
virtual void DXMCALL SetDiffuse (const DXColor &color)=0
virtual void DXMCALL SetAmbient (const DXColor &color)=0
virtual void DXMCALL SetSpecular (const DXColor &color)=0
virtual void DXMCALL SetEmissive (const DXColor &color)=0
virtual void DXMCALL SetOpacity (float opacity)=0
virtual void DXMCALL SetSpecularSharpness (float sharpness)=0
virtual DXError DXMCALL SetReflectionType (DXReflectionType type)=0
virtual void DXMCALL SetEnvironmentOpacity (float value)=0
virtual void DXMCALL SetEnvironmentGradient (float value)=0
virtual void DXMCALL SetClampUV (bool value)=0
virtual DXError DXMCALL CreateSurfaceDetail (uint billboardSplit, float billboardSway, float billboardSize, IDXSurfaceDetailPtr *out=0)=0
virtual DXError DXMCALL GetSurfaceDetail (IDXSurfaceDetailPtr *out) const =0
virtual DXError DXMCALL DestroySurfaceDetail ()=0
virtual DXError DXMCALL GetStandardMap (DXStandardMapType type, IDXMaterialMapPtr *out)=0
virtual DXError DXMCALL AddStandardMap (DXStandardMapType type, const wchar_t *source, IDXMaterialMapPtr *out=0)=0
virtual DXError DXMCALL RemoveStandardMap (DXStandardMapType type)=0
virtual DXError DXMCALL CreateLightMap (const wchar_t *source, uint generateSize, uint channel, IDXLightMapPtr *out=0)=0
virtual DXError DXMCALL GetLightMap (IDXLightMapPtr *out) const =0
virtual DXError DXMCALL RemoveLightMap ()=0
virtual uint DXMCALL GetNumMultiMaps () const =0
virtual DXError DXMCALL GetMultiMap (uint index, IDXMultiMapPtr *out)=0
virtual DXError DXMCALL AddMultiMap (const wchar_t *source, uint coordChannel, uint alphaChannel, float opacity, DXMapCombine combineType, IDXMultiMapPtr *out=0)=0
virtual DXError DXMCALL RemoveMultiMap (uint index)=0
virtual DXError DXMCALL RemoveMultiMap (IDXMultiMapPtr map)=0
virtual DXError DXMCALL RemoveMultiMap (uint start, uint count)=0
virtual void DXMCALL ClearMultiMaps ()=0


Detailed Description

An IDXMaterial controls how DXStudio will render a face when it has the material applied to it.

Member Function Documentation

virtual DXError DXMCALL DX::IDXMaterial::AddMultiMap ( const wchar_t *  source,
uint  coordChannel,
uint  alphaChannel,
float  opacity,
DXMapCombine  combineType,
IDXMultiMapPtr *  out = 0 
) [pure virtual]

Add an additional map to this material.

Parameters:
source The filename of the texture that will be used for this map.
coordChannel The UV channel that will be used for the color of this map.
alphaChannel The UV channle that will be used for the alpha of this map.
opacity A floating point value between 0 and 1 which represents how opaque this map is.
combineType A member of the DXMapCombine enumeration which describes how this map will be combined with the standard map.
out An optional pointer to an IDXMultiMapPtr where a link to the new map will be stored.
Returns:
Error_NullParam if source was null.
Error_OutOfRange if combineType was invalid.
Error_Success if the map was created.

virtual DXError DXMCALL DX::IDXMaterial::AddStandardMap ( DXStandardMapType  type,
const wchar_t *  source,
IDXMaterialMapPtr *  out = 0 
) [pure virtual]

Add a standard map to this material.

Parameters:
type A member of the DXStandardMapType enumeration which indicates which type to add.
source The filename of the texture to be used for the map.
out An optional pointer to an IDXMaterialMapPtr where a link to the newly added map will be stored.
Returns:
Error_NullParam if source was null.
Error_OutOfRange if type was invalid.
Error_Duplicate if there is already a map with this type.
Error_Success if the type was added.

virtual void DXMCALL DX::IDXMaterial::ClearMultiMaps (  )  [pure virtual]

Remove all the additional maps from this material.

virtual DXError DXMCALL DX::IDXMaterial::CreateLightMap ( const wchar_t *  source,
uint  generateSize,
uint  channel,
IDXLightMapPtr *  out = 0 
) [pure virtual]

Create a light map on this material.

Parameters:
source The filename that this map will use as a texture.
generateSize The size of the side of the texture that will be used during autobaking of light.
channel The UV channel that the lightmap will be applied to.
out A pointer to an IDXLightMapPtr where a link will be stored. Optional.
Returns:
Error_NullParam if source was null.
Error_InvalidParam if generateSize was not a power of 2.
Error_Duplicate if a lightmap already exists.
Error_Success if the light map was created.

virtual DXError DXMCALL DX::IDXMaterial::CreateSurfaceDetail ( uint  billboardSplit,
float  billboardSway,
float  billboardSize,
IDXSurfaceDetailPtr *  out = 0 
) [pure virtual]

Create surface detail for this material. This will overwrite any exisiting surface detail on this material.

Parameters:
billboardSplit The number of splits on the billboard texture. This must be a power of 2.
billboardSway The sway factor that will be applied.
billboardSize The size of the billboards (base size)
out An optional parameter where a pointer to the new IDXSurfaceDetail will be stored.
Returns:
Error_InvalidParam if billboardSplit was not a power of 2.
Error_Success if the surface detail was created.

virtual DXError DXMCALL DX::IDXMaterial::DestroySurfaceDetail (  )  [pure virtual]

Remove any surface detail that has been added to this material.

Returns:
Error_NotFound if there was not an IDXSurfaceDetailPtr present.
Error_Success if the IDXSurfaceDetailPtr was destroyed.

virtual const DXColor DXMCALL DX::IDXMaterial::GetAmbient (  )  const [pure virtual]

Retrieve the color that will be used with the ambient component of lighting.

virtual bool DXMCALL DX::IDXMaterial::GetClampUV (  )  const [pure virtual]

If set to true, the material will not allow UV values below 0 or above 1, and they will be clamped appropriately.

virtual const DXColor DXMCALL DX::IDXMaterial::GetDiffuse (  )  const [pure virtual]

Retrieve the color that will be used with the diffuse component of lighting.

virtual const DXColor DXMCALL DX::IDXMaterial::GetEmissive (  )  const [pure virtual]

The emissive color that will be used when rendering this material.

virtual float DXMCALL DX::IDXMaterial::GetEnvironmentGradient (  )  const [pure virtual]

Get the gradient value that is used for reflections.

virtual float DXMCALL DX::IDXMaterial::GetEnvironmentOpacity (  )  const [pure virtual]

Get the opacity value that is used for reflections.

virtual const char* DXMCALL DX::IDXMaterial::GetID (  )  const [pure virtual]

Retrieve the ID of the IDXMaterial.

virtual DXError DXMCALL DX::IDXMaterial::GetLightMap ( IDXLightMapPtr *  out  )  const [pure virtual]

Get the light map that is being used on this IDXMaterial.

Parameters:
out A pointer to an IDXLightMapPtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_NotFound if there is no light map being used.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMaterial::GetMultiMap ( uint  index,
IDXMultiMapPtr *  out 
) [pure virtual]

Get the additional map at the specified index.

Parameters:
index The index of the additional map to retrieve.
out A pointer to an IDXMultiMapPtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if index was out of range.
Error_Success if the result was stored in out.

virtual uint DXMCALL DX::IDXMaterial::GetNumMultiMaps (  )  const [pure virtual]

Get the number of additional maps that this material has.

Returns:
The count of additional maps.

virtual float DXMCALL DX::IDXMaterial::GetOpacity (  )  const [pure virtual]

How opaque this material is, with 0 being fully transparent, and 1 being completely opaque

virtual DXReflectionType DXMCALL DX::IDXMaterial::GetReflectionType (  )  const [pure virtual]

The type of reflection that will be used on this material when it is rendered.

See also:
DXReflectionType

virtual const DXColor DXMCALL DX::IDXMaterial::GetSpecular (  )  const [pure virtual]

The specular color that will be used on this material. This is seperate from the actual sharpness value.

virtual float DXMCALL DX::IDXMaterial::GetSpecularSharpness (  )  const [pure virtual]

How sharp the specular highlights will be on this model. A higher value focuses the specular more.

virtual DXError DXMCALL DX::IDXMaterial::GetStandardMap ( DXStandardMapType  type,
IDXMaterialMapPtr *  out 
) [pure virtual]

Get one of the standard maps for this material.

Parameters:
type A member of the DXStandardMapType enumeration which identifies the map type to remove.
out A pointer to an IDXMaterialMapPtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if type was invalid.
Error_NotFound if the specified standard map type was not present.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMaterial::GetSurfaceDetail ( IDXSurfaceDetailPtr *  out  )  const [pure virtual]

Get the IDXSurfaceDetailPtr for this material.

Parameters:
out A pointer to an IDXSurfaceDetailPtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_NotFound if there was no IDXSurfaceDetailPtr on this material.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMaterial::RemoveLightMap (  )  [pure virtual]

Remove the light map that is being used on this IDXMaterial.

Returns:
Error_NotFound if there was no light map on this material to remove.
Error_Success if the lightmap was removed.

virtual DXError DXMCALL DX::IDXMaterial::RemoveMultiMap ( uint  start,
uint  count 
) [pure virtual]

Remove a range of additional maps from the material.

Parameters:
start The index of the first map to remove.
count The number of maps to remove.
Returns:
Error_OutOfRange if start was out of range.
Error_Success if the range was removed.

virtual DXError DXMCALL DX::IDXMaterial::RemoveMultiMap ( IDXMultiMapPtr  map  )  [pure virtual]

Remove the specified additional map.

Parameters:
map The map to remove.
Returns:
Error_NullParam if map was null.
Error_NotFound if the map was not present in the material.
Error_Success if the map was removed.

virtual DXError DXMCALL DX::IDXMaterial::RemoveMultiMap ( uint  index  )  [pure virtual]

Remove the additional map at the specified index.

Parameters:
index The index of the additional map to retrieve.
Returns:
Error_OutOfRange if the index was out of range.
Error_Success if the additional map was removed.

virtual DXError DXMCALL DX::IDXMaterial::RemoveStandardMap ( DXStandardMapType  type  )  [pure virtual]

Remove a standard map from this material.

Parameters:
type A member of the DXStandardMapType enumeration which indicates the type to remove.
Returns:
Error_OutOfRange if type was invalid.
Error_NotFound if the specified map was not present on the material.
Error_Success if the map was removed.

virtual void DXMCALL DX::IDXMaterial::SetAmbient ( const DXColor color  )  [pure virtual]

Set the ambient color of this material.

Parameters:
color A DXColor that represents the new color.

virtual void DXMCALL DX::IDXMaterial::SetClampUV ( bool  value  )  [pure virtual]

Sets whether this material will clamp uv values outside the range 0 to 1. True to clamp, false to not clamp.

Parameters:
value The new value to use.

virtual void DXMCALL DX::IDXMaterial::SetDiffuse ( const DXColor color  )  [pure virtual]

Set the diffuse color of this material.

Parameters:
color A DXColor that represents the new color.

virtual void DXMCALL DX::IDXMaterial::SetEmissive ( const DXColor color  )  [pure virtual]

Set the emissive color of this material.

Parameters:
color A DXColor that represents the new color.

virtual void DXMCALL DX::IDXMaterial::SetEnvironmentGradient ( float  value  )  [pure virtual]

Set the gradient value for reflections.

Parameters:
value A value between 0 and 100.

virtual void DXMCALL DX::IDXMaterial::SetEnvironmentOpacity ( float  value  )  [pure virtual]

Set the opacity value for reflections.

Parameters:
value A value between 0 and 100.

virtual DXError DXMCALL DX::IDXMaterial::SetID ( const char *  id  )  [pure virtual]

Set the ID that this material will be referred to by in script.

Parameters:
id The new ID to use for this material
Returns:
Error_NullParam if id was null.
Error_InvalidID if id contained invalid characters.
Error_Duplicate if a material already exists with the new ID .
Error_Success if the material ID was changed.

virtual void DXMCALL DX::IDXMaterial::SetOpacity ( float  opacity  )  [pure virtual]

Set the opacity of the material.

Parameters:
opactiy A floating point value between 0 and 1 that represents the new opacity.

virtual DXError DXMCALL DX::IDXMaterial::SetReflectionType ( DXReflectionType  type  )  [pure virtual]

Set the kind of reflection this material will use.

Parameters:
type A member of the DXReflectionType enumeration describing the new reflection type.
Returns:
Error_InvalidParam if an invalid value is used (< 0, >= Reserved).
Error_Success if the reflection type was updated.
See also:
DXReflectionType

virtual void DXMCALL DX::IDXMaterial::SetSpecular ( const DXColor color  )  [pure virtual]

Set the specular color of this material.

Parameters:
color A DXColor that represents the new color.

virtual void DXMCALL DX::IDXMaterial::SetSpecularSharpness ( float  sharpness  )  [pure virtual]

Set the specular sharpness of the materil. This affects how the specular is applied to the material.

Parameters:
sharpness The new sharpness of the material.


Generated on Wed Jun 17 17:24:50 2009 for DXMesh API by  doxygen 1.5.7.1