AssimpRendererD3d::AssetHelper Class Reference

This class is the Direct3D representation of a single 3D Asset that was imported using ASSIMP. More...

#include <assethelper.h>

List of all members.

Classes

class  MeshHelper
struct  Vertex

Public Member Functions

bool SetAmbientLight (D3DCOLOR ambientLight)
 Sets the ambient light for the whole Asset.
bool SetDirectionalLight (unsigned int lightIndex, D3DCOLOR lightColor, const aiVector3D &lightDir)
 Sets the color and shining direction of the directional light at the given index.
bool SetDirectionalLightDirection (unsigned int lightIndex, const aiVector3D &lightDir)
 Sets the shining direction of the directional light at the given index.
bool SetDirectionalLightColor (unsigned int lightIndex, D3DCOLOR lightColor)
 Sets the color of the directional light at the given index.
bool SetSpecularShininessModificator (float modificator)
 Alters the shininess of the whole Asset by this multiplier.
bool SetSpecularStrengthModificator (float modificator)
 Alters the specular strength of the whole Asset by this multiplier.
bool operator== (const AssetHelper &otherAsset)
bool operator!= (const AssetHelper &otherAsset)

Friends

class boost::serialization::access
class AssimpRenderer
class CMaterialManager
class CMeshRenderer


Detailed Description

This class is the Direct3D representation of a single 3D Asset that was imported using ASSIMP.

Instances of this class are created when you use AssimpRenderer's functions for importing or saving Assets. The class comes with some setters to alter the lighting parameters of the Asset.


Member Function Documentation

bool AssimpRendererD3d::AssetHelper::SetAmbientLight ( D3DCOLOR  ambientLight  ) 

Sets the ambient light for the whole Asset.

Parameters:
ambientLight color (and also intensity) of the ambient light shining on this asset.
Returns:
true if successful

bool AssimpRendererD3d::AssetHelper::SetDirectionalLight ( unsigned int  lightIndex,
D3DCOLOR  lightColor,
const aiVector3D &  lightDir 
)

Sets the color and shining direction of the directional light at the given index.

At the moment only a single directional light is supported. Pass 0 as the lightIndex. This value is read out every time the asset is rendered. It will not be serialized when the Asset is saved and therefore has to be set after importing or loading the asset.

Parameters:
lightIndex please pass 0 here until multiple light sources are supported.
lightColor 
lightDir the shining direction originating from the light source in world coordinates
Returns:
true if successful

bool AssimpRendererD3d::AssetHelper::SetDirectionalLightColor ( unsigned int  lightIndex,
D3DCOLOR  lightColor 
)

Sets the color of the directional light at the given index.

At the moment only a single directional light is supported. Pass 0 as the lightIndex. This value is read out every time the asset is rendered. It will not be serialized when the Asset is saved and therefore has to be set after importing or loading the asset.

Parameters:
lightIndex please pass 0 here until multiple light sources are supported.
lightColor 
Returns:
true if successful

bool AssimpRendererD3d::AssetHelper::SetDirectionalLightDirection ( unsigned int  lightIndex,
const aiVector3D &  lightDir 
)

Sets the shining direction of the directional light at the given index.

At the moment only a single directional light is supported. Pass 0 as the lightIndex. This value is read out every time the asset is rendered. It will not be serialized when the Asset is saved and therefore has to be set after importing or loading the asset.

Parameters:
lightIndex please pass 0 here until multiple light sources are supported.
lightDir the shining direction originating from the light source in world coordinates
Returns:
true if successful

bool AssimpRendererD3d::AssetHelper::SetSpecularShininessModificator ( float  modificator  ) 

Alters the shininess of the whole Asset by this multiplier.

The shininess describes the size of "hot spots" reflecting a lightsource, when the light is reflected directly into the camera ("specular lighting"). Each material of the asset stores its own value for the shininess. The default multiplier value is 1.0f. Use this method if you want to amplify or weaken the shininess of the whole asset. The multiplier will not be stored when the Asset is saved to a file.

Parameters:
modificator the multiplier
Returns:
true if successful

bool AssimpRendererD3d::AssetHelper::SetSpecularStrengthModificator ( float  modificator  ) 

Alters the specular strength of the whole Asset by this multiplier.

The specular strength describes the This value will not be stored when the Asset is saved to a file.

Parameters:
modificator the multiplier
Returns:
true if successful


The documentation for this class was generated from the following files:

Generated on Sat May 30 19:20:35 2009 for AssimpRenderer by  doxygen 1.5.9