PowerVR Software Development Kit


Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

PVRTVertex.h File Reference

Utility functions which process vertices. More...

Go to the source code of this file.

Enumerations

enum  EPVRTDataType {
  EPODDataNone, EPODDataFloat, EPODDataInt, EPODDataUnsignedShort,
  EPODDataRGBA, EPODDataARGB, EPODDataD3DCOLOR, EPODDataUBYTE4,
  EPODDataDEC3N, EPODDataFixed16_16, EPODDataUnsignedByte, EPODDataShort,
  EPODDataShortNorm, EPODDataByte, EPODDataByteNorm
}

Functions

void PVRTDataTypeRead (PVRTVECTOR4f *const pV, const void *const pData, const EPVRTDataType eType, const int nCnt)
void PVRTDataTypeRead (unsigned int *const pV, const void *const pData, const EPVRTDataType eType)
void PVRTDataTypeWrite (void *const pOut, const EPVRTDataType eType, const int nCnt, const PVRTVECTOR4f *const pV)
void PVRTDataTypeWrite (void *const pOut, const EPVRTDataType eType, const unsigned int V)
void PVRTVertexTangentBinormal (PVRTVECTOR3 *const pvTan, PVRTVECTOR3 *const pvBin, const PVRTVECTOR3 *const pvNor, const float *const pfPosA, const float *const pfPosB, const float *const pfPosC, const float *const pfTexA, const float *const pfTexB, const float *const pfTexC)
bool PVRTVertexGenerateTangentSpace (int *const pnVtxNumOut, char **const pVtxOut, unsigned short *const pwIdx, const int nVtxNum, const char *const pVtx, const int nStride, const int nOffsetPos, EPVRTDataType eTypePos, const int nOffsetNor, EPVRTDataType eTypeNor, const int nOffsetTex, EPVRTDataType eTypeTex, const int nOffsetTan, EPVRTDataType eTypeTan, const int nOffsetBin, EPVRTDataType eTypeBin, const int nTriNum, const float fSplitDifference)


Detailed Description

Utility functions which process vertices.

Author:
PowerVR
Date:
Febuary 2003
Copyright:
Copyright 2003-2004 by Imagination Technologies Limited. All rights reserved. No part of this software, either material or conceptual may be copied or distributed, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language in any form by any means, electronic, mechanical, manual or other-wise, or disclosed to third parties without the express written permission of Imagination Technologies Limited, Unit 8, HomePark Industrial Estate, King's Langley, Hertfordshire, WD4 8LZ, U.K.
Platform:
ANSI compatible
Description:
Utility functions which process vertices.
Revision
1.21

Enumeration Type Documentation



EPVRTDataType


enum EPVRTDataType
 

Enumeration values:
EPODDataNone 
EPODDataFloat 
EPODDataInt 
EPODDataUnsignedShort 
EPODDataRGBA 
EPODDataARGB 
EPODDataD3DCOLOR 
EPODDataUBYTE4 
EPODDataDEC3N 
EPODDataFixed16_16 
EPODDataUnsignedByte 
EPODDataShort 
EPODDataShortNorm 
EPODDataByte 
EPODDataByteNorm 

Function Documentation



PVRTDataTypeRead


void PVRTDataTypeRead unsigned int *const  pV,
const void *const  pData,
const EPVRTDataType  eType
 



PVRTDataTypeRead


void PVRTDataTypeRead PVRTVECTOR4f *const  pV,
const void *const  pData,
const EPVRTDataType  eType,
const int  nCnt
 

Outputs:
pV 
Inputs:
pData 
eType 
nCnt 
Description:
Read a vector



PVRTDataTypeWrite


void PVRTDataTypeWrite void *const  pOut,
const EPVRTDataType  eType,
const unsigned int  V
 



PVRTDataTypeWrite


void PVRTDataTypeWrite void *const  pOut,
const EPVRTDataType  eType,
const int  nCnt,
const PVRTVECTOR4f *const  pV
 

Outputs:
pOut 
Inputs:
eType 
nCnt 
pV 
Description:
Write a vector



PVRTVertexGenerateTangentSpace


bool PVRTVertexGenerateTangentSpace int *const  pnVtxNumOut,
char **const  pVtxOut,
unsigned short *const  pwIdx,
const int  nVtxNum,
const char *const  pVtx,
const int  nStride,
const int  nOffsetPos,
EPVRTDataType  eTypePos,
const int  nOffsetNor,
EPVRTDataType  eTypeNor,
const int  nOffsetTex,
EPVRTDataType  eTypeTex,
const int  nOffsetTan,
EPVRTDataType  eTypeTan,
const int  nOffsetBin,
EPVRTDataType  eTypeBin,
const int  nTriNum,
const float  fSplitDifference
 

Outputs:
pnVtxNumOut Output vertex count
pVtxOut Output vertices (program must free() this)
Modified:
pwIdx input AND output; index array for triangle list
Inputs:
nVtxNum Input vertex count
pVtx Input vertices
nStride Size of a vertex (in bytes)
nOffsetPos Offset in bytes to the vertex position
eTypePos Data type of the position
nOffsetNor Offset in bytes to the vertex normal
eTypeNor Data type of the normal
nOffsetTex Offset in bytes to the vertex texture coordinate to use
eTypeTex Data type of the texture coordinate
nOffsetTan Offset in bytes to the vertex tangent
eTypeTan Data type of the tangent
nOffsetBin Offset in bytes to the vertex binormal
eTypeBin Data type of the binormal
nTriNum Number of triangles
fSplitDifference Split a vertex if the DP3 of tangents/binormals are below this (range -1..1)
Returns:
false if there was a problem.
Description:
Calculates the tangent space for all supplied vertices. Writes tangent and binormal vectors to the output vertices, copies all other elements from input vertices. Will split vertices if necessary - i.e. if two triangles sharing a vertex want to assign it different tangent-space matrices. The decision whether to split uses fSplitDifference - of the DP3 of two desired tangents or two desired binormals is higher than this, the vertex will be split.



PVRTVertexTangentBinormal


void PVRTVertexTangentBinormal PVRTVECTOR3 *const  pvTan,
PVRTVECTOR3 *const  pvBin,
const PVRTVECTOR3 *const  pvNor,
const float *const  pfPosA,
const float *const  pfPosB,
const float *const  pfPosC,
const float *const  pfTexA,
const float *const  pfTexB,
const float *const  pfTexC
 

Outputs:
pvTan 
pvBin 
Inputs:
pvNor 
pfPosA 
pfPosB 
pfPosC 
pfTexA 
pfTexB 
pfTexC 
Description:
Calculates the tangent and binormal vectors for vertex 'A' of the triangle defined by the 3 supplied 3D position coordinates (pfPosX) and 2D texture coordinates (pfTexX).


Copyright © 1999-2006, PowerVR Technologies and partners. PowerVR Technologies is a division of Imagination Technologies Ltd.


Generated by DOXYGEN 1.3.6