ftp.nice.ch/pub/next/developer/objc/api/intuitiv3d_API.s.tar.gz#/i3dApi/Documentation/TypesAndConstants/CX3DShader.rtf

This is CX3DShader.rtf in view mode; [Download] [Up]

 intuitiv'3d API documentation Copyright ©1993 by Cub'x SystÜmes. All Rights Reserved.

This file describes types and constants you will need when using or making a subclass of CX3DShader


CXShaderType

This type describes the type of a shader. Values can be:

		CXSTSurface	A surface shader.
		CXSTLight	A light shader.
		CXSTDisplacement	A displacement shader.
		CXSTVolume	A volume shader.
		CXSTTransformation	A transformation shader.
		CXSTImager	An imager shader.
		CXSTUndefined	A shader without any type (not initialized)

CXRenderType

	This type describes Renderman functions that can be used to render a shader. Values could be:

		CXRTSurface	RiSurface()
		CXRTDisplacement	RiDisplacement()
		CXRTAreaLight	RiAreaLightSource()
		CXRTInterior	RiInterior()
		CXRTExterior	RiExterior()
		CXRTAtmosphere	RiAtmosphere()
		CXRTUndefined	Don't know how to render a shader

CXArgType

	This type describes the argument types that can be used with the Rendeman Shading Language.

		CXATPoint	A 3d point.
		CXATColor	A color
		CXATScalar	A float value
		CXATMap	A 2d picture file. (.tx)
		CXATUndefined	An obscure argument type.

WrapType
	The wrapType defines how a tiff map is translated into .tx. Values could be:

		Black			RI_BLACK.
		Periodic		RI_PERIODIC	
		Clamp			RI_CLAMP

Texture

typedef struct 
	{
  	char 			mapName[255];
  	char			realMapName[255];
  	unsigned int 	isTiff; 
  	WrapType 		wrapS, wrapT;
  	char 			 *filterFunc;
  	RtFloat 		widthX;
  	RtFloat 		widthY;
	} Texture;

	mapName			This field contains the user input for mapping. (.tx or.tiff)

	realMapName	This field contains the final map used at rendering (.tx)

	isTiff				0 if mapName is a .tx 1 otherwise.

	wrapS,wrapT		Wrap type on s and on t 
	
	*filterFunc		The filter function used for the translation.

	widthX			width of the texture.

	widthY			height of the texture.

CXArg
	This type describes a shader argument: 

typedef struct
	{
  	char 			argName[255];
 	CXArgType 	type;
  	RtToken 		argNameToken;
 	 union
    		{
      		RtPoint 		point;
      		NXColor 		color;
    		 float  			scalar;
     		 Texture 		txt;
    		} data;

  	union 
  		 {
      		RtPoint 	bpoint;
      		RtColor 	bcolor;
      		RtFloat		bscalar;
      		char    		*bstring;
    		} arg;
	} CXArg;

	argName			name of the argument.

	type				type of the argument.

	argNameToken	token used at rendering for this parameter.

	argNameToken	token used at rendering for this parameter.

	data				This union contains the data given to the shader at rendering. 						Names speak by themselves.
	arg					This union is a buffer used internally when rendering.


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.