
Public Member Functions | |
| virtual void MCCOMAPI | Clone (I3DShShader **clone, ECloneMode mode) const =0 |
| virtual boolean MCCOMAPI | IsConstant ()=0 |
| virtual boolean MCCOMAPI | AssignsChannels ()=0 |
| virtual void MCCOMAPI | GetShadingFlags (ShadingFlags &theFlags)=0 |
| virtual boolean MCCOMAPI | HasExplicitLightingModel (const LightingContext &lightingContext)=0 |
| virtual void MCCOMAPI | ShadeAndLight (LightingDetail &result, const LightingContext &lightingContext)=0 |
| virtual void MCCOMAPI | DoShade (ShadingOut &result, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetValue (real &result, boolean &fullArea, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetColor (TMCColorRGBA &result, boolean &fullArea, ShadingIn &shadingIn)=0 |
| virtual real MCCOMAPI | GetVector (TVector3 &result, ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | GetReflection (TReflectionParameters &reflectionParams, const ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | GetTransparency (TTransparencyParameters &transparencyParams, const ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | GetShaderApproximation (ShadingOut &result, ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | GetShaderApproxColor (TMCColorRGBA &result, ShadingIn &shadingIn)=0 |
| virtual void MCCOMAPI | GetBump (TVector3 &result, ShadingIn &shadingIn)=0 |
| virtual EShaderOutput MCCOMAPI | GetImplementedOutput () const =0 |
| virtual MCCOMErr MCCOMAPI | GetOriginalParametricTextureMap (const uint32 &uvSpaceID, const uint32 &channelIndex, IShTextureMap **outMap)=0 |
| virtual IShParameterComponent *MCCOMAPI | GetTransformComponent ()=0 |
| virtual boolean MCCOMAPI | GetSubShaderPreview (IShParameterComponent **shader, IShParameterComponent *subShader, FourCharT subShaderKeyword)=0 |
| virtual void MCCOMAPI | GetShaderPreview (IShParameterComponent **shader)=0 |
| virtual EShaderFunctionType MCCOMAPI | GetSubShaderType (IDType keyword)=0 |
| virtual MCCOMErr MCCOMAPI | SetupPreviewScene (IPreviewMaker *previewMaker, I3DShMasterShader *masterShader)=0 |
| virtual boolean MCCOMAPI | IsChannelConstantInUVSpace (const uint32 &uvSpaceID, const uint32 &channelIndex)=0 |
There are two interfaces to access a component: The shell interface (I3DShShader) and the external interface (I3DExShader) . You can get one from the other using QueryInterface.
Whenever it is possible you should use the Shell interface (I3DShShader) to access the component because the Shell will make sure that the parameter map of the external component is valid. This is especially important if the component is animated. For more information on components see the Overview of the SDK.
| virtual void MCCOMAPI I3DShShader::Clone | ( | I3DShShader ** | clone, | |
| ECloneMode | mode | |||
| ) | const [pure virtual] |
Makes a copy of a shader and its sub shaders.
| clone | A pointer to the copy of the shader. | |
| mode | The clone Mode (see ECloneMode). |
| virtual boolean MCCOMAPI I3DShShader::IsConstant | ( | ) | [pure virtual] |
Returns true if the shader has a constant result (to optimize things like Value and Color shaders).
| virtual boolean MCCOMAPI I3DShShader::AssignsChannels | ( | ) | [pure virtual] |
Should returns true if DoShade is implemented.
| virtual void MCCOMAPI I3DShShader::GetShadingFlags | ( | ShadingFlags & | theFlags | ) | [pure virtual] |
Returns the ShadingFlags associated with this shader.
| theFlags | The ShadingFlags associated with this shader. |
| virtual boolean MCCOMAPI I3DShShader::HasExplicitLightingModel | ( | const LightingContext & | lightingContext | ) | [pure virtual] |
**************************************************************************** HasExplicitLightingModel
Returns true if there is an explicit lighting model in the subtree. This is mostly used for layer lists to determine if DoShade or ShadeAndLight should be called on the layer.
| lightingContext | The information about the point that should be lit. |
| virtual void MCCOMAPI I3DShShader::ShadeAndLight | ( | LightingDetail & | result, | |
| const LightingContext & | lightingContext | |||
| ) | [pure virtual] |
Calculates the shading and lighting in one point
| result | The color seen by the observer | |
| lightingContext | info about the point being shaded and the lighting of the scene |
| virtual void MCCOMAPI I3DShShader::DoShade | ( | ShadingOut & | result, | |
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns the shading for a given point.
| result | The shading of the point. | |
| shadingIn | The information about the point to shade. |
| virtual real MCCOMAPI I3DShShader::GetValue | ( | real & | result, | |
| boolean & | fullArea, | |||
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns the value of the shading function at a given point.
| result | The value of the shading function | |
| fullArea | True if the shading as been averaged for antiliasing. | |
| shadingIn | The info about the point to shade. |
| virtual real MCCOMAPI I3DShShader::GetColor | ( | TMCColorRGBA & | result, | |
| boolean & | fullArea, | |||
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns the value of the shading function at a given point.
| result | The value of the shading function | |
| fullArea | True if the shading as been averaged for antiliasing. | |
| shadingIn | The info about the point to shade. |
| virtual real MCCOMAPI I3DShShader::GetVector | ( | TVector3 & | result, | |
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns a pertubation of the normal in local coordinates
| result | A vector in local coordinates. | |
| shadingIn | The info about the point to shade. |
| virtual void MCCOMAPI I3DShShader::GetReflection | ( | TReflectionParameters & | reflectionParams, | |
| const ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns the parameters used to calculate the reflection. This function is only called if the shader is placed in the reflection channel of a multichannel.
| reflectionParams | The parameters used for reflections calculations | |
| shadingIn | The info about the point to shade |
| virtual void MCCOMAPI I3DShShader::GetTransparency | ( | TTransparencyParameters & | transparencyParams, | |
| const ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns the parameters used to calculate the transparency. This function is only called if the shader is placed in the transparency channel of a multichannel.
| transparencyParams | The parameters used for transparency calculations | |
| shadingIn | The info about the point to shade |
| virtual void MCCOMAPI I3DShShader::GetShaderApproximation | ( | ShadingOut & | result, | |
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns information used to approximate the shading for the real time display
| result | The approximation of the shading. | |
| shadingIn | The info about the point to shade. |
| virtual void MCCOMAPI I3DShShader::GetShaderApproxColor | ( | TMCColorRGBA & | result, | |
| ShadingIn & | shadingIn | |||
| ) | [pure virtual] |
Returns information used to approximate the shading for the real time display
| result | The approximation of the shading. | |
| shadingIn | The info about the point to shade. |
| virtual EShaderOutput MCCOMAPI I3DShShader::GetImplementedOutput | ( | ) | const [pure virtual] |
Returns a bit field that determines which methods are implemented by this shading function.
| virtual MCCOMErr MCCOMAPI I3DShShader::GetOriginalParametricTextureMap | ( | const uint32 & | uvSpaceID, | |
| const uint32 & | channelIndex, | |||
| IShTextureMap ** | outMap | |||
| ) | [pure virtual] |
Returns a texture map if there is one for a given channel (Color, Alpha, Transparency...)
| uvSpaceID | The UVSpaceID that is considered. | |
| channelIndex | The index of the channel | |
| outMap | The map the is output if there is one. |
| virtual IShParameterComponent* MCCOMAPI I3DShShader::GetTransformComponent | ( | ) | [pure virtual] |
Returns a pointer to the transform component that defines the 3D transform of the shader.
| virtual boolean MCCOMAPI I3DShShader::GetSubShaderPreview | ( | IShParameterComponent ** | shader, | |
| IShParameterComponent * | subShader, | |||
| FourCharT | subShaderKeyword | |||
| ) | [pure virtual] |
Creates a shader that can be used to preview one of the subshader.
| shader | Shader created to be used for the preview. | |
| subShader | Shader to put in the sub shader with the keyword subShaderKeyword. | |
| subShaderKeyword | Keywork of the sub shader (in the PMap). |
| virtual void MCCOMAPI I3DShShader::GetShaderPreview | ( | IShParameterComponent ** | shader | ) | [pure virtual] |
Creates a shader that can be used to preview this shader.
| shader | Shader created to be used for the preview (this shader must be a clone). |
| virtual EShaderFunctionType MCCOMAPI I3DShShader::GetSubShaderType | ( | IDType | keyword | ) | [pure virtual] |
Get the type of a sub shader.
| keyword | Id of the sub shader. |
| virtual MCCOMErr MCCOMAPI I3DShShader::SetupPreviewScene | ( | IPreviewMaker * | previewMaker, | |
| I3DShMasterShader * | masterShader | |||
| ) | [pure virtual] |
Setup the preview maker to render a preview of this shader.
| previewMaker | The preview maker to setup. | |
| masterShader | The master shader to be previewed. |
| virtual boolean MCCOMAPI I3DShShader::IsChannelConstantInUVSpace | ( | const uint32 & | uvSpaceID, | |
| const uint32 & | channelIndex | |||
| ) | [pure virtual] |
Return true if this channel is constant on that UV Space. If not, an exporter should try to bake a texture map.
| uvSpaceID | The UVSpaceID that is considered. | |
| channelIndex | The index of the channel |
1.5.3