This is CX3DShader.h in view mode; [Download] [Up]
/*
* Copyright 1993 by Cub'x Systemes
*
* All Rights Reserved
*
* Permission to use, copy, and distribute this software and its
* documentation for the purpose of making new intuitiv'3d modules.
* This copyright notice must appears in all copies that you distribute.
* The name of Cub'x Systeme should not be used in advertising or publicity
* without specific, written prior permission.
* CUB'X SYSTEMES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* CUB'X SYSTEMES BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
/*******************************************************************************
* *
* Project intuitiv'3d *
* ------------------- *
* *
* *
* File: CX3DShader.h *
* *
* *
* Creation date: Tue Jul 27 14:43:36 GMT+0200 1993 *
* *
* *
* Contents: A class to describe a shader *
* *
* *
*******************************************************************************/
#import <ri/ri.h>
#import <i3d/ObjectView.h>
#import <i3d/ExportedVariable.h>
#define CLASS_NAME_SIZE 256
typedef enum
{
CXSTSurface = 0,
CXSTLight = 1,
CXSTDisplacement = 2,
CXSTVolume = 3,
CXSTTransformation = 4,
CXSTImager = 5,
CXSTUndefined = 6
} CXShaderType;
typedef enum
{
CXRTSurface = 0,
CXRTDisplacement,
CXRTAreaLight,
CXRTInterior,
CXRTExterior,
CXRTAtmosphere,
CXRTUndefined
} CXRenderType;
typedef enum
{
CXATPoint = 0,
CXATColor,
CXATScalar,
CXATMap,
CXATUndefined
} CXArgType;
typedef enum { Black, Periodic, Clamp } WrapType;
typedef struct {
char mapName[255];
char realMapName[255];
unsigned int isTiff; // 0 : no other:ID
WrapType wrapS, wrapT;
char * filterFunc;
RtFloat widthX;
RtFloat widthY;
} Texture;
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;
@interface CX3DShader : ObjectView
{
char className [CLASS_NAME_SIZE];
CXShaderType type;
CXRenderType renderType;
int argCount;
CXArg *arg;
BOOL canRender;
float scale[3];
float dispBound;
id owner;
}
/*
* Initialization
*/
- init;
- initWithShaderClassName:(const char*) aName;
- setColorIDForType;
- copy;
- initParametersFromShader: anObject;
- free;
/*
* Rendering
*/
- preRender: displayer;
- render;
- postRender: displayer;
/*
* Attributes
*/
- setOwner: anObject;
- owner;
- setDisplacementBound:(float) aValue;
- (float) displacementBound;
- setScaleX: (float) sx Y:(float) sy Z:(float) sz;
- getScaleX: (float*) sx Y:(float*) sy Z: (float*) sz;
- (const char*) className;
- (CXShaderType) type;
- (CXRenderType) shaderRenderType;
- (BOOL) renderTypeCompatible: (CXRenderType) r;
- setShaderRenderType:(CXRenderType) aType;
- setDefaultShaderRenderType;
- (unsigned int) argCount;
- (CXArg*) argArray;
/*
* N3DObject compatibility
*/
- (BOOL) isALight;
/*
* Inspectors
*/
- inspectorClass;
/*******************************************************************************
* *
* Reading and writing *
* *
*******************************************************************************/
+ (ExportedVariable*) exportedVariable;
- read:(NXTypedStream*)s;
- write:(NXTypedStream*)s;
- awake;
- (unsigned long) calcSum;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.