PowerVR Software Development Kit


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

PVRTMisc.h File Reference

Miscellaneous functions used in 3D rendering. More...

Go to the source code of this file.

Functions

void PVRTMiscCalculateIntersectionLinePlane (PVRTVECTOR3 *const pvIntersection, const VERTTYPE pfPlane[4], const PVRTVECTOR3 *const pv0, const PVRTVECTOR3 *const pv1)
int PVRTMiscCalculateInfinitePlane (VERTTYPE *const pfVtx, const int nStride, const PVRTVECTOR4 *const pvPlane, const PVRTMATRIX *const pmViewProjInv, const PVRTVECTOR3 *const pFrom, const VERTTYPE fFar)
void PVRTCreateSkybox (float scale, bool adjustUV, int textureSize, VERTTYPE **Vertices, VERTTYPE **UVs)
void PVRTDestroySkybox (VERTTYPE *Vertices, VERTTYPE *UVs)
void PVRTMiscTwiddle (unsigned int &a, const unsigned int u, const unsigned int v)
void PVRTMiscDeTwiddle (unsigned int &u, unsigned int &v, const unsigned int a)


Detailed Description

Miscellaneous functions used in 3D rendering.

Author:
PowerVR
Date:
August 1999
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:
Miscellaneous functions used in 3D rendering.
Revision
1.15

Function Documentation



PVRTCreateSkybox


void PVRTCreateSkybox float  scale,
bool  adjustUV,
int  textureSize,
VERTTYPE **  Vertices,
VERTTYPE **  UVs
 

Inputs:
scale Scale the skybox
adjustUV Adjust or not UVs for PVRT compression
textureSize Texture size in pixels
Outputs:
Vertices Array of vertices
UVs Array of UVs
Description:
Creates the vertices and texture coordinates for a skybox



PVRTDestroySkybox


void PVRTDestroySkybox VERTTYPE *  Vertices,
VERTTYPE *  UVs
 

Inputs:
Vertices Vertices array to destroy
UVs UVs array to destroy
Description:
Destroy the memory allocated for a skybox



PVRTMiscCalculateInfinitePlane


int PVRTMiscCalculateInfinitePlane VERTTYPE *const  pfVtx,
const int  nStride,
const PVRTVECTOR4 *const  pvPlane,
const PVRTMATRIX *const  pmViewProjInv,
const PVRTVECTOR3 *const  pFrom,
const VERTTYPE  fFar
 

Inputs:
nStride Size of each vertex structure containing pfVtx
pvPlane Length 4 [A,B,C,D], values for plane equation
pmViewProjInv The inverse of the View Projection matrix
pFrom Position of the camera
fFar Far clipping distance
Outputs:
pfVtx Position of the first of 3 floats to receive the position of vertex 0; up to 5 vertex positions will be written (5 is the maximum number of vertices required to draw an infinite polygon clipped to screen and far clip plane).
Returns:
Number of vertices in the polygon fan (Can be 0, 3, 4 or 5)
Description:
Calculates world-space coords of a screen-filling representation of an infinite plane The resulting vertices run counter-clockwise around the screen, and can be simply drawn using non-indexed TRIANGLEFAN



PVRTMiscCalculateIntersectionLinePlane


void PVRTMiscCalculateIntersectionLinePlane PVRTVECTOR3 *const  pvIntersection,
const VERTTYPE  pfPlane[4],
const PVRTVECTOR3 *const  pv0,
const PVRTVECTOR3 *const  pv1
 

Inputs:
pfPlane Length 4 [A,B,C,D], values for plane equation
pv0 A point on the line
pv1 Another point on the line
Outputs:
pvIntersection The point of intersection
Description:
Calculates coords of the intersection of a line and an infinite plane



PVRTMiscDeTwiddle


void PVRTMiscDeTwiddle unsigned int &  u,
unsigned int &  v,
const unsigned int  a
 

Outputs:
u Coordinate axis 0
v Coordinate axis 1
Inputs:
a Twiddled value
Description:
Extract 2D coordinates from a twiddled value.



PVRTMiscTwiddle


void PVRTMiscTwiddle unsigned int &  a,
const unsigned int  u,
const unsigned int  v
 

Outputs:
a Twiddled value
Inputs:
u Coordinate axis 0
v Coordinate axis 1
Description:
Combine a 2D coordinate into a twiddled value


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


Generated by DOXYGEN 1.3.6