Inventor/oivShaderState.h File Reference

oiv_include <Inventor/oivShaderStages.h> More...

Go to the source code of this file.

Functions

int OivMaxLights ()
int OivMaxClipPlanes ()
int OivMaxTextureCoordinates ()
int OivMaxTextureUnits ()
mat4 OivModelViewMatrix ()
mat4 OivModelViewMatrixInverse ()
mat3 OivNormalMatrix ()
mat4 OivProjectionMatrix ()
mat4 OivProjectionMatrixInverse ()
mat4 OivModelViewProjectionMatrix ()
mat4 OivTextureMatrix (int unit)
vec4 OivGlobalAmbient ()
bool OivLightSourceEnabled (int id)
vec4 OivLightSourcePosition (int id)
vec3 OivLightSourceSpotDirection (int id)
float OivLightSourceSpotExponent (int id)
float OivLightSourceSpotCutoff (int id)
float OivLightSourceSpotCosCutoff (int id)
vec4 OivLightSourceAmbient (int id)
vec4 OivLightSourceDiffuse (int id)
vec4 OivLightSourceSpecular (int id)
float OivLightSourceConstantAttenuation (int id)
float OivLightSourceLinearAttenuation (int id)
float OivLightSourceQuadraticAttenuation (int id)
vec4 OivFrontMaterialAmbient ()
vec4 OivFrontMaterialDiffuse ()
vec4 OivFrontMaterialSpecular ()
vec4 OivFrontMaterialEmissive ()
float OivFrontMaterialShininess ()
vec4 OivBackMaterialAmbient ()
vec4 OivBackMaterialDiffuse ()
vec4 OivBackMaterialSpecular ()
vec4 OivBackMaterialEmissive ()
float OivBackMaterialShininess ()
vec4 OivFrontSceneColor ()
vec4 OivFrontLightProductAmbient (int id)
vec4 OivFrontLightProductDiffuse (int id)
vec4 OivFrontLightProductSpecular (int id)
vec4 OivBackLightProductAmbient (int id)
vec4 OivBackLightProductDiffuse (int id)
vec4 OivBackLightProductSpecular (int id)
vec4 OivClipPlane (int id)
bool OivClipPlaneEnabled (int id)
vec4 OivFogColor ()
float OivFogDensity ()
float OivFogStart ()
float OivFogEnd ()
float OivFogScale ()
vec4 OivObjectPlaneS (int i)
vec4 OivObjectPlaneT (int i)
vec4 OivObjectPlaneR (int i)
vec4 OivObjectPlaneQ (int i)

Detailed Description

oiv_include <Inventor/oivShaderStages.h>

This file contains fonction to acces built-in GLSL uniforms

Definition in file oivShaderState.h.


Function Documentation

vec4 OivBackLightProductAmbient ( int  id  ) 

Get product of ambient component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of ambient component between back material and id'th light.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackLightProductDiffuse ( int  id  ) 

Get product of diffuse component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of diffuse component between back material and id'th light.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackLightProductSpecular ( int  id  ) 

Get product of specular component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of specular component between back material and id'th light.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackMaterialAmbient (  ) 

Get back material ambient color.

Returns:
ambient color for back material.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackMaterialDiffuse (  ) 

Get back material diffuse color.

Returns:
diffuse color for back material.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackMaterialEmissive (  ) 

Get back material emissive color.

Returns:
emissive color for back material.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

float OivBackMaterialShininess (  ) 

Get back material shininess value.

Returns:
shininess value for back material.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivBackMaterialSpecular (  ) 

Get back material specular color.

Returns:
specular color for back material.

Note that this parameter is relevant only if two side lighting is enabled (i.e. OivHasTwoSidedLighting() returns true).

vec4 OivClipPlane ( int  id  ) 

Get the clip plane coordinates.

Parameters:
id specifies which clip plane id to ask, must be between 0 and OivMaxClipPlanes()-1.
Returns:
the clip plane .
bool OivClipPlaneEnabled ( int  id  ) 

Ask if clip plane is enabled.

Parameters:
id specifies which clip plane id to ask, must be between 0 and OivMaxClipPlanes()-1.
Returns:
true if clip plane with a given id is enabled, false otherwise.
vec4 OivFogColor (  ) 

Get the fog color.

Returns:
fog color.
float OivFogDensity (  ) 

Get fog density used in exponential fog equations.

Returns:
fog density.
float OivFogEnd (  ) 

Get the far distance used in the linear fog equation.

Returns:
fog end.
float OivFogScale (  ) 

Get the fog scale derived from start and end parameters : 1.0 / (end - start).

Returns:
fog scale.
float OivFogStart (  ) 

Get the near distance used in the linear fog equation.

Returns:
fog start.
vec4 OivFrontLightProductAmbient ( int  id  ) 

Get product of ambient component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of ambient component between back material and id'th light.
vec4 OivFrontLightProductDiffuse ( int  id  ) 

Get product of diffuse component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of diffuse component between back material and id'th light.
vec4 OivFrontLightProductSpecular ( int  id  ) 

Get product of specular component between back material and id'th light.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
product of specular component between back material and id'th light.
vec4 OivFrontMaterialAmbient (  ) 

Get front material ambient color.

Returns:
ambient color for front material.
vec4 OivFrontMaterialDiffuse (  ) 

Get front material diffuse color.

Returns:
diffuse color for front material.
vec4 OivFrontMaterialEmissive (  ) 

Get front material emissive color.

Returns:
emissive color for front material.
float OivFrontMaterialShininess (  ) 

Get front material shininess value.

Returns:
shininess value for front material.
vec4 OivFrontMaterialSpecular (  ) 

Get front material specular color.

Returns:
specular color for front material.
vec4 OivFrontSceneColor (  ) 

Get sum of emissive component of front material and product between front material ambient and global ambient value.

Returns:
sum of emissive component of front material and product between front material ambient and global ambient value.
vec4 OivGlobalAmbient (  ) 

Gets the global ambient color value.

Returns:
The global ambient color value
vec4 OivLightSourceAmbient ( int  id  ) 

Get the light ambient color.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light ambient color for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

float OivLightSourceConstantAttenuation ( int  id  ) 

Get the light constant attenuation value.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light constant attenuation value for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

vec4 OivLightSourceDiffuse ( int  id  ) 

Get the light diffuse color.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light diffuse color for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

bool OivLightSourceEnabled ( int  id  ) 

Ask if the light is enabled.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
true if light with a given id is enabled, false otherwise.
float OivLightSourceLinearAttenuation ( int  id  ) 

Get the light linear attenuation value.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light linear attenuation value for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

vec4 OivLightSourcePosition ( int  id  ) 

Get the light position.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light position for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

float OivLightSourceQuadraticAttenuation ( int  id  ) 

Get the light quadratic attenuation value.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light quadratic attenuation value for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

vec4 OivLightSourceSpecular ( int  id  ) 

Get the light specular color.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light specular color for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

float OivLightSourceSpotCosCutoff ( int  id  ) 

Get the light spot cutoff cosine.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light spot cutoff cosine for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

float OivLightSourceSpotCutoff ( int  id  ) 

Get the light spot cutoff.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light spot cutoff for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

vec3 OivLightSourceSpotDirection ( int  id  ) 

Get the light spot direction.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light spot direction for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

float OivLightSourceSpotExponent ( int  id  ) 

Get the light spot exponent.

Parameters:
id specifies which light id to ask, must be between 0 and OivMaxLights()-1.
Returns:
the light spot exponent for a given light id.

Note that this parameter is relevant only if lighting is enabled (i.e. OivHasLighting() returns true).

int OivMaxClipPlanes (  ) 

Get the maximum number of clipping planes sets by Open Inventor.

int OivMaxLights (  ) 

Get the maximum number of lights sets by Open Inventor.

int OivMaxTextureCoordinates (  ) 

Get the maximum number of texture coordinates sets by Open Inventor.

int OivMaxTextureUnits (  ) 

Get the maximum number of texture units sets by Open Inventor.

mat4 OivModelViewMatrix (  ) 

Get the combination of model and view transformations (MV), i.e., MV = V * M.

Returns:
the model-view matrix.
mat4 OivModelViewMatrixInverse (  ) 

Get the inverse of the model-view matrix,.

Returns:
the inverse of the model-view matrix.
mat4 OivModelViewProjectionMatrix (  ) 

Get the combination of projection and model-view matrices (MVP), i.e., MVP = P * V * M.

Returns:
the model-view-projection matrix
mat3 OivNormalMatrix (  ) 

Get the normal matrix (N), i.e., N = tr(MV^{-1}).

Returns:
the normal matrix.
vec4 OivObjectPlaneQ ( int  i  ) 

Get the user-defined planes for texture coordinate generation.

Returns:
user-defined plane
vec4 OivObjectPlaneR ( int  i  ) 

Get the user-defined planes for texture coordinate generation.

Returns:
user-defined plane
vec4 OivObjectPlaneS ( int  i  ) 

Get the user-defined planes for texture coordinate generation.

Returns:
user-defined plane
vec4 OivObjectPlaneT ( int  i  ) 

Get the user-defined planes for texture coordinate generation.

Returns:
user-defined plane
mat4 OivProjectionMatrix (  ) 

Get the projection matrix (P).

Returns:
the projection matrix.
mat4 OivProjectionMatrixInverse (  ) 

Get the inverse of the projection matrix (P^{-1}).

Returns:
the inverse projection matrix.
mat4 OivTextureMatrix ( int  unit  ) 

Get texture matrices.

Parameters:
unit specifies which texture unit between 0 and OivMaxTextureUnit()-1.
Returns:
the texture matrix for a given unit.

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/