/*------------------------------------------------------------------------------ * FILE: spmatrix.h * $Author: jef $ * $Date: 93/11/17 10:51:04 $ * $Locker: $ * $Revision: 1.1 $ * $Source: /usr/people/saturn/Devel/src/api/RCS/matrix.h,v $ * $State: Exp $ * * Copyright (C) by SEGA Enterprises Ltd. 1992. All rights reserved. * * PURPOSE: * * * DESCRIPTION: * * * AUTHOR(S): * * * MOD HISTORY: * * *------------------------------------------------------------------------------ */ #ifndef __SHMATRIX_H__ #define __SHMATRIX_H__ #include "shtypes.h" #include "matrix.h" extern Matrix *sclCTM; typedef struct FlatPoint { /* flat shading surface point data */ Card16 attr; /* attribute flag */ Card16 texOrColor; /* texture no. or color no. */ XYZ surNormal; /* surface unit normal vector */ XYZ pt[2]; /* vertices 2 point */ } FlatPoint; typedef struct GourPoint { /* gouraud shading surface point data */ Card16 attr; /* attribute flag */ Card16 texOrColor; /* texture no. or color no. */ XYZ surNormal; /* surface unit normal vector */ XYZ pt[2]; /* vertices 2 point */ XYZ ptNormal[2]; /* point unit normal vector 2 point */ } GourPoint; typedef struct FlatPointRes { /* flat shading result point data */ Int16 surColor; /* surface color No. */ XYZ pt[2]; /* vertices 2 point */ } FlatPointRes; typedef struct GourPointRes { /* gouraud shading result point data */ Int16 surColor; /* surface color No. */ XYZ pt[2]; /* vertices 2 point */ Int16 ptColor[2]; /* point color No. */ } GourPointRes; void shInitMatrixStack(void); void shClearMatrix(void); void shPushMatrix(void); void shPopMatrix(void); void shRotateX(Fixed32 angle); void shRotateY(Fixed32 angle); void shRotateZ(Fixed32 angle); void shMove(Fixed32 xVal, Fixed32 yVal, Fixed32 zVal); void shCoordTrans(XYZ *srcList, XYZ *dstList); void shNormalTrans(XYZ *, XYZ *); void sh2InitMatrixStack(void); void sh2ClearMatrix(void); void sh2PushMatrix(void); void sh2PopMatrix(void); void sh2RotateX(Fixed32 angle); void sh2RotateY(Fixed32 angle); void sh2RotateZ(Fixed32 angle); void sh2Move(Fixed32 xVal, Fixed32 yVal, Fixed32 zVal); void sh2CoordTrans(XYZ *srcList, XYZ *dstList); void sh2NormalTrans(XYZ *, XYZ *); void MatxLightVector(XYZ *pt); void VertCoordTransFlat(Card16, FlatPoint*, FlatPointRes*); void VertCoordTransGour(Card16, GourPoint*, GourPointRes*); void ComputeBrightness(XYZ *, XYZ *, Int16 *); #endif /* ifndef __SH_MATRIX_H__ */