beastapi/beastmaterial.h Source File

beastmaterial.h
Go to the documentation of this file.
1 /*
2 Copyright 2014 Autodesk, Inc. All rights reserved.
3 Use of this software is subject to the terms of the Autodesk license agreement
4 provided at the time of installation or download, or which otherwise
5 accompanies this software in either electronic or hard copy form.
6 */
7 
11 #ifndef BEASTMATERIAL_H
12 #define BEASTMATERIAL_H
13 #include "beastapitypes.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif // __cplusplus
18 
23 typedef enum {
32  ILB_CC_TOTAL_CHANNELS
34 
35 typedef enum {
39  ILB_WM_TOTAL_MODES
41 
50 ILB_DLL_FUNCTION ILBStatus ILBCreateMaterial(ILBSceneHandle scene,
51  ILBConstString name,
52  ILBMaterialHandle* material);
53 
63 ILB_DLL_FUNCTION ILBStatus ILBFindMaterial(ILBSceneHandle scene,
64  ILBConstString name,
65  ILBMaterialHandle* material);
66 
74 ILB_DLL_FUNCTION ILBStatus ILBSetMaterialColor(ILBMaterialHandle material,
75  ILBMaterialChannel channel,
76  const ILBLinearRGBA* color);
77 
87 ILB_DLL_FUNCTION ILBStatus ILBSetMaterialScale(ILBMaterialHandle material,
88  ILBMaterialChannel channel,
89  float scale);
90 
98 ILB_DLL_FUNCTION ILBStatus ILBSetMaterialTexture(ILBMaterialHandle material,
99  ILBMaterialChannel channel,
100  ILBTextureHandle texture);
111  ILBMaterialChannel channel,
112  ILBMaterialChannelWrapMode wrapModeU,
113  ILBMaterialChannelWrapMode wrapModeV,
114  ILBTextureHandle texture);
115 
116 
125  ILBMaterialChannel channel);
126 
136 ILB_DLL_FUNCTION ILBStatus ILBSetChannelUVLayer(ILBMaterialHandle material,
137  ILBMaterialChannel channel,
138  ILBConstString uvLayerName);
139 
146 ILB_DLL_FUNCTION ILBStatus ILBSetAlphaAsTransparency(ILBMaterialHandle material,
147  ILBBool alphaAsTransparency);
148 
149 
157 ILB_DLL_FUNCTION ILBStatus ILBSetPrimaryGICorrection(ILBMaterialHandle material,
158  float intensity,
159  float saturation);
160 
168 ILB_DLL_FUNCTION ILBStatus ILBSetSecondaryGICorrection(ILBMaterialHandle material,
169  float intensity,
170  float saturation);
171 
172 
181 ILB_DLL_FUNCTION ILBStatus ILBSetGIScale(ILBMaterialHandle material,
182  float diffuseBoost,
183  float emissiveScale,
184  float specularScale);
185 
194 ILB_DLL_FUNCTION ILBStatus ILBSetMaterialDisplayName(ILBMaterialHandle material,
195  ILBConstString displayName);
196 
197 
198 
206 ILB_DLL_FUNCTION ILBStatus ILBCreateShader(ILBManagerHandle beastManager,
207  ILBConstString uniqueName,
208  ILBConstString fileName,
209  ILBShaderHandle* target);
210 
218 ILB_DLL_FUNCTION ILBStatus ILBFindShader(ILBManagerHandle beastManager,
219  ILBConstString uniqueName,
220  ILBShaderHandle* target);
221 
228 ILB_DLL_FUNCTION ILBStatus ILBSetShader(ILBMaterialHandle material,
229  ILBShaderHandle shader);
230 
237 ILB_DLL_FUNCTION ILBStatus ILBSetShaderParamFloat(ILBMaterialHandle material,
238  ILBConstString param,
239  float value);
240 
247 ILB_DLL_FUNCTION ILBStatus ILBSetShaderParamInt(ILBMaterialHandle material,
248  ILBConstString param,
249  int32 value);
250 
257 ILB_DLL_FUNCTION ILBStatus ILBSetShaderParamColor(ILBMaterialHandle material,
258  ILBConstString param,
259  ILBLinearRGB* value);
260 
267 ILB_DLL_FUNCTION ILBStatus ILBSetShaderParamTexture(ILBMaterialHandle material,
268  ILBConstString param,
269  ILBTextureHandle value);
270 
280 ILB_DLL_FUNCTION ILBStatus ILBSetShaderParamUV(ILBMaterialHandle material,
281  ILBConstString param,
282  ILBConstString value);
283 
284 
285 #ifdef __cplusplus
286 }
287 #endif // __cplusplus
288 
289 
290 #endif // BEASTMATERIAL_H
291 
Definition: beastmaterial.h:37
Definition: beastmaterial.h:28
ILBStatus ILBSetSecondaryGICorrection(ILBMaterialHandle material, float intensity, float saturation)
Sets color correction on the secondary GI calculations on the material.
Color with alpha definition All colors are expressed in linear space as opposed to gamma corrected...
Definition: beastapitypes.h:356
ILBStatus ILBSetMaterialDisplayName(ILBMaterialHandle material, ILBConstString displayName)
Sets the display name for the material.
ILBStatus ILBSetPrimaryGICorrection(ILBMaterialHandle material, float intensity, float saturation)
Sets color correction on the primary GI calculations on the material.
ILBStatus ILBSetShaderParamInt(ILBMaterialHandle material, ILBConstString param, int32 value)
Sets an OSL integer input parameter for a material.
ILBStatus ILBFindMaterial(ILBSceneHandle scene, ILBConstString name, ILBMaterialHandle *material)
Checks if the material exists, if it does, it returns its handle.
This header is the base for getting platform consistent types for the Beast API.
ILBStatus ILBSetShaderParamFloat(ILBMaterialHandle material, ILBConstString param, float value)
Sets an OSL float input parameter for a material.
Definition: beastmaterial.h:38
const ILBCharType * ILBConstString
Beast api const string type.
Definition: beastapitypes.h:245
ILBStatus ILBSetAlphaAsTransparency(ILBMaterialHandle material, ILBBool alphaAsTransparency)
Sets if the material should use the alpha value of the diffuse channel as transparency.
ILBStatus ILBSetMaterialColor(ILBMaterialHandle material, ILBMaterialChannel channel, const ILBLinearRGBA *color)
Sets the color for a channel on a material.
ILBStatus ILBSetMaterialTexture(ILBMaterialHandle material, ILBMaterialChannel channel, ILBTextureHandle texture)
Sets the texture for a channel on a material.
Definition: beastmaterial.h:27
ILBStatus ILBSetGIScale(ILBMaterialHandle material, float diffuseBoost, float emissiveScale, float specularScale)
Sets boost and scaling factors for different aspects of the material in GI calculations.
ILBStatus ILBSetMaterialScale(ILBMaterialHandle material, ILBMaterialChannel channel, float scale)
Sets a scale for a channel on a material Will be multiplied with material color, texture and vertex c...
ILBStatus ILBFindShader(ILBManagerHandle beastManager, ILBConstString uniqueName, ILBShaderHandle *target)
Retrieves an OSL shader based on its unique name.
ILBStatus ILBSetMaterialUseVertexColors(ILBMaterialHandle material, ILBMaterialChannel channel)
Sets the material to use vertex color for a channel.
Definition: beastmaterial.h:36
Definition: beastmaterial.h:26
ILBStatus ILBSetShaderParamUV(ILBMaterialHandle material, ILBConstString param, ILBConstString value)
Connects an UV set to an OSL UV input parameter for a material.
ILBStatus ILBSetChannelUVLayer(ILBMaterialHandle material, ILBMaterialChannel channel, ILBConstString uvLayerName)
Sets what UV layer should be used for the texture for a color channel.
Definition: beastmaterial.h:25
Definition: beastmaterial.h:24
Definition: beastmaterial.h:30
Handle for Beast materials Intentionally hidden implementation.
Definition: beastapitypes.h:443
Handle for Beast textures Intentionally hidden implementation.
Definition: beastapitypes.h:450
ILBStatus ILBSetShader(ILBMaterialHandle material, ILBShaderHandle shader)
Assigns an OSL shader to a material.
ILBStatus ILBCreateMaterial(ILBSceneHandle scene, ILBConstString name, ILBMaterialHandle *material)
Add a material to the scene.
ILBMaterialChannel
Defines the different channels in the Beast API shading model.
Definition: beastmaterial.h:23
ILBStatus ILBSetShaderParamTexture(ILBMaterialHandle material, ILBConstString param, ILBTextureHandle value)
Sets an OSL texture input parameter for a material.
ILBStatus ILBSetMaterialTextureWrapMode(ILBMaterialHandle material, ILBMaterialChannel channel, ILBMaterialChannelWrapMode wrapModeU, ILBMaterialChannelWrapMode wrapModeV, ILBTextureHandle texture)
Sets the texture wrap mode for a channel on a material.
Handle for Beast managers Intentionally hidden implementation.
Handle for an OSL shader.
Definition: beastapitypes.h:522
Color definition All colors are expressed in linear space as opposed to gamma corrected.
Definition: beastapitypes.h:338
ILBMaterialChannelWrapMode
Definition: beastmaterial.h:35
int32 ILBBool
Bool type with a well defined size to avoid compatibility-problems.
Definition: beastapitypes.h:284
Definition: beastmaterial.h:29
Handle for Beast scenes Intentionally hidden implementation.
Definition: beastapitypes.h:408
ILBStatus
Status codes for Beast API calls.
Definition: beastapitypes.h:153
ILBStatus ILBSetShaderParamColor(ILBMaterialHandle material, ILBConstString param, ILBLinearRGB *value)
Sets an OSL color input parameter for a material.
Definition: beastmaterial.h:31
ILBStatus ILBCreateShader(ILBManagerHandle beastManager, ILBConstString uniqueName, ILBConstString fileName, ILBShaderHandle *target)
Compiles and creates a representation of an OSL shader.