Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
oivShaderState.h
Go to the documentation of this file.
1#ifndef OIV_SHADER_STATE_H
2#define OIV_SHADER_STATE_H
3
11/*****************************************************************************/
12// Constants
13
18
23
28
33
34/*****************************************************************************/
35// Transforms
36
42
48
54
60
67
73
80
86
92
99
105mat4 OivTextureMatrix(int unit);
106
112
117
118#define OIV_PROJECTION_TYPE_ORTHO 0
119#define OIV_PROJECTION_TYPE_PERSPECTIVE 1
120
125
126/*****************************************************************************/
127// Lighting
128
134
140
146
152
158
167
168#define OIV_LIGHT_TYPE_NONE 0
169#define OIV_LIGHT_TYPE_POINT 1
170#define OIV_LIGHT_TYPE_SPOT 2
171#define OIV_LIGHT_TYPE_DIRECTIONAL 3
172
179
188
197
206
215
224
233
242
251
260
269
278
280
281/*****************************************************************************/
282// Material
283
289
295
301
307
313
319
325
331
339
347
355
363
371
379
387
395
403
410
417
424
433
442
451
452/*****************************************************************************/
453// Clip planes
454
461
467vec4 OivClipPlane(int id);
468
469
470/*****************************************************************************/
471// Fog parameters
472
478
479
485
486
492
493
498float OivFogEnd();
499
500
506
512
517vec4 OivObjectPlaneS(int i);
518
523vec4 OivObjectPlaneT(int i);
524
529vec4 OivObjectPlaneR(int i);
530
535vec4 OivObjectPlaneQ(int i);
536
537#endif /* OIV_SHADER_STATE_H */
vec4 OivFrontLightProductDiffuse(int id)
Get product of diffuse component between back material and id'th light.
float OivLightSourceLinearAttenuation(int id)
Get the light linear attenuation value.
float OivFrontMaterialShininess()
Get front material shininess value.
float OivLightSourceSpotExponent(int id)
Get the light spot exponent.
mat4 OivModelMatrix()
Get transformation of the model (M).
float OivBackMaterialSpecularFactor()
Get back material specular factor value.
vec3 OivLightSourceSpotDirection(int id)
Get the light spot direction.
float OivFogStart()
Get the near distance used in the linear fog equation.
int OivLightSourceType(int id)
Get the type of the light.
float OivFogEnd()
Get the far distance used in the linear fog equation.
float OivFogScale()
Get the fog scale derived from start and end parameters : 1.0 / (end - start)
float OivFrontMaterialRoughness()
Get front material roughness value.
vec4 OivFogColor()
Get the fog color.
int OivMaxTextureCoordinates()
Get the maximum number of texture coordinates sets by Open Inventor.
vec4 OivFrontMaterialAmbient()
Get front material ambient color.
mat4 OivViewMatrixInverse()
Get inverse transformation of the view (V^{-1}).
vec4 OivFrontSceneColor()
Get sum of emissive component of front material and product between front material ambient and global...
bool OivHasColorMaterial()
Ask if color material is enabled.
vec4 OivBackLightProductSpecular(int id)
Get product of specular component between back material and id'th light.
mat4 OivProjectionMatrix()
Get the projection matrix (P).
mat4 OivModelViewMatrix()
Get the combination of model and view transformations (MV), i.e., MV = V * M.
int OivFogType()
Get the fog type.
vec4 OivBackMaterialEmissive()
Get back material emissive color.
vec4 OivFrontLightProductSpecular(int id)
Get product of specular component between back material and id'th light.
vec4 OivFrontLightProductAmbient(int id)
Get product of ambient component between back material and id'th light.
vec4 OivClipPlane(int id)
Get the clip plane coordinates.
vec4 OivBackLightProductDiffuse(int id)
Get product of diffuse component between back material and id'th light.
float OivBackMaterialShininess()
Get back material shininess value.
float OivFrontMaterialMetallic()
Get front material metallic value.
vec4 OivGlobalAmbient()
Gets the global ambient color value.
vec4 OivLightSourcePosition(int id)
Get the light position.
vec4 OivObjectPlaneR(int i)
Get the user-defined planes for texture coordinate generation.
int OivMaxTextureUnits()
Get the maximum number of texture units sets by Open Inventor.
float OivLightSourceSpotCutoff(int id)
Get the light spot cutoff.
mat4 OivTextureMatrix(int unit)
Get texture matrices.
int OivMaxLights()
Get the maximum number of lights sets by Open Inventor.
bool OivHasTwoSidedLighting()
Ask if two-sided lighting is enabled.
bool OivClipPlaneEnabled(int id)
Ask if clip plane is enabled.
float OivLightSourceSpotCosCutoff(int id)
Get the light spot cutoff cosine.
vec4 OivLightSourceSpecular(int id)
Get the light specular color.
mat4 OivModelMatrixInverse()
Get inverse transformation of the model (M^{-1}).
int OivMaxLightId()
vec2 OivViewportSize()
Get the size of the viewport.
mat4 OivProjectionMatrixInverse()
Get the inverse of the projection matrix (P^{-1}).
bool OivLightSourceEnabled(int id)
Ask if the light is enabled.
float OivLightSourceConstantAttenuation(int id)
Get the light constant attenuation value.
vec4 OivObjectPlaneS(int i)
Get the user-defined planes for texture coordinate generation.
float OivLightSourceQuadraticAttenuation(int id)
Get the light quadratic attenuation value.
vec4 OivFrontMaterialDiffuse()
Get front material diffuse color.
vec4 OivBackLightProductAmbient(int id)
Get product of ambient component between back material and id'th light.
float OivFrontMaterialSpecularFactor()
Get front material specular factor value.
int OivMaxClipPlanes()
Get the maximum number of clipping planes sets by Open Inventor.
vec4 OivLightSourceDiffuse(int id)
Get the light diffuse color.
float OivFogDensity()
Get fog density used in exponential fog equations.
vec4 OivLightSourceAmbient(int id)
Get the light ambient color.
vec4 OivFrontMaterialEmissive()
Get front material emissive color.
vec2 OivViewVolumeSize()
Get the near/far view volume of the camera.
float OivBackMaterialRoughness()
Get back material roughness value.
mat3 OivNormalMatrix()
Get the normal matrix (N), i.e., N = tr(MV^{-1}).
mat4 OivViewMatrix()
Get transformation of the view (V).
mat4 OivModelViewProjectionMatrix()
Get the combination of projection and model-view matrices (MVP), i.e., MVP = P * V * M.
vec4 OivBackMaterialSpecular()
Get back material specular color.
vec4 OivFrontMaterialSpecular()
Get front material specular color.
vec4 OivBackMaterialDiffuse()
Get back material diffuse color.
float OivBackMaterialMetallic()
Get back material metallic value.
vec4 OivObjectPlaneT(int i)
Get the user-defined planes for texture coordinate generation.
vec4 OivObjectPlaneQ(int i)
Get the user-defined planes for texture coordinate generation.
vec4 OivBackMaterialAmbient()
Get back material ambient color.
bool OivHasPerPixelLighting()
Ask if per-pixel lighting is enabled.
bool OivHasLighting()
Ask if lighting is enabled.
int OivViewProjectionType()
Get the projection type of the camera (OIV_PROJECTION_TYPE_ORTHO or OIV_PROJECTION_TYPE_PERSPECTIVE)
mat4 OivModelViewMatrixInverse()
Get the inverse of the model-view matrix,.