source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemo/src/gtp_shader/gtp_shader_opticsutil.h @ 2196

Revision 2196, 2.0 KB checked in by szirmay, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14//@cpp
15
16#ifndef S3D_ENG_SPECIALSHADER_OPTICS_UTIL_H
17#define S3D_ENG_SPECIALSHADER_OPTICS_UTIL_H
18
19#include "../../interf/eng_gfxstruct.h"
20#include "../../interf/eng_shader.h"
21
22///////////////////////////////////////////////////////////////////////////////
23
24//@
25class gtp_ShaderOpticsUtil
26{
27public:
28    static bool CalcViewNormalDist(
29            s3d_CUtilVec3f &ViewNormal, float &ViewDist,
30            s3d_CUtilTranslQuatf_cr ViewTransf);
31    static bool CalcChildCamFull(
32            s3d_CEngGfxCam &ChildCam,
33            void *Exclude,
34            int MaxRecursion, float Coeff, float Precision,
35            bool UseCompactFrustum, s3d_CEngShaderScope *Scope,
36            s3d_CUtilTranslQuatf_cr ViewTransf,
37            s3d_CUtilVec3f_cr ViewNormal, float ViewDist);
38    static bool CalcChildRange(
39            s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
40            s3d_CUtilTranslQuatf_cr ViewTransf,
41            s3d_CUtilVec3f_cr BoundCen, s3d_CUtilVec3f_cr BoundExt,
42            s3d_CEngShaderScope *Scope);
43    static void SnapChildRange(
44            s3d_CUtilVec3f &SubNeg, s3d_CUtilVec3f &SubPos,
45            int SnapWidth, int SnapHeight);
46    static void ApplyRangeToChildCam(
47            s3d_CEngGfxCam &ChildCam, s3d_CUtilMat4x4f &BaseProj,
48            s3d_CUtilVec3f_cr SubNeg, s3d_CUtilVec3f_cr SubPos);
49
50    static int RoundToPowerOfTwoDown(int x);
51    static int RoundToPowerOfTwoUp(int x);
52};
53
54///////////////////////////////////////////////////////////////////////////////
55
56#endif
Note: See TracBrowser for help on using the repository browser.