source: trunk/BUTE/src/PreComputingRuns/CAURenderRefractObjectMapPass.cpp @ 126

Revision 126, 1.7 KB checked in by barsi, 19 years ago (diff)

Added a folder remotely

RevLine 
[126]1//      author: Barnabas Aszodi (BME-IIT)
2
3#include "Ogre.h"
4#include "OgreEffectWrapper.h"
5#include "ManagedOgreRenderTexturePass.h"
6#include "CAURenderRefractObjectMapPass.h"
7
8
9CAURenderRefractObjectMapPass::CAURenderRefractObjectMapPass(
10                        Root* mRoot):ManagedOgreRenderTexturePass(mRoot,"NO_RENDER_TEXTURE",1,1)
11{
12        effectWrapper->createMaterial("RenderRefractObj");
13}
14
15void CAURenderRefractObjectMapPass::onRenderStart(NameValuePairList* namedParams){
16        effectWrapper->SetTechniqueToUse(0);
17        effectWrapper->BeginPass();
18        effectWrapper->SetVertexProgramParameters();
19        effectWrapper->SetMatrix("g_mWorldViewProj",g_mWorldViewProj);
20        effectWrapper->SetMatrix("g_mWorldEntityMesh",g_mWorldEntityMesh);
21        effectWrapper->SetVector3("g_vCameraPos3f",g_vCameraPos3f);
22        effectWrapper->SetFragmentProgramParameters();
23        effectWrapper->SetFloat("g_fFovCamera", g_fFovCamera);
24}
25
26
27void CAURenderRefractObjectMapPass::onRenderEnd(NameValuePairList* namedParams)
28{
29        effectWrapper->EndPass();
30}
31
32Matrix4 CAURenderRefractObjectMapPass::getWorldEntityMesh()
33{
34        return g_mWorldEntityMesh;
35}
36
37void CAURenderRefractObjectMapPass::setWorldEntityMesh( Matrix4 matrix4 )
38{
39        g_mWorldEntityMesh = matrix4;
40}
41
42Matrix4 CAURenderRefractObjectMapPass::getWorldViewProj()
43{
44        return g_mWorldViewProj;
45}
46
47void CAURenderRefractObjectMapPass::setWorldViewProj( Matrix4 matrix4 )
48{
49        g_mWorldViewProj = matrix4;
50}
51
52Vector3 CAURenderRefractObjectMapPass::getCameraPos3f()
53{
54        return g_vCameraPos3f;
55}
56
57void CAURenderRefractObjectMapPass::setCameraPos3f( Vector3 v )
58{
59        g_vCameraPos3f = v;
60}
61
62float CAURenderRefractObjectMapPass::getFovCamera()
63{
64        return g_fFovCamera;
65}
66
67void CAURenderRefractObjectMapPass::setFovCamera( float f )
68{
69        g_fFovCamera = f;
70}
Note: See TracBrowser for help on using the repository browser.