Isle
Loading...
Searching...
No Matches
view.cpp
Go to the documentation of this file.
1#include "impl.h"
2
3#include <assert.h>
4
5using namespace TglImpl;
6
8 ViewportAppData(IDirect3DRM2* pRenderer);
10
11 IDirect3DRMFrame2* m_pLightFrame;
12 IDirect3DRMFrame2* m_pCamera;
13 IDirect3DRMFrame2* m_pLastRenderedFrame;
17};
18
20
21// FUNCTION: LEGO1 0x100a10b0
22// FUNCTION: BETA10 0x10168920
23ViewportAppData::ViewportAppData(IDirect3DRM2* pRenderer)
24{
25 Result result = ResultVal(pRenderer->CreateFrame(NULL, &m_pLightFrame));
26 assert(Succeeded(result));
27
33}
34
35// FUNCTION: LEGO1 0x100a10e0
36// FUNCTION: BETA10 0x101689bd
38{
39 int refCount;
40 IDirect3DRMFrameArray* pChildFrames;
41 IDirect3DRMFrame* pChildFrame = NULL;
42 Result result = ResultVal(m_pLightFrame->GetChildren(&pChildFrames));
43 assert(Succeeded(result));
44
45 for (int i = 0; i < (int) pChildFrames->GetSize(); i++) {
46 result = ResultVal(pChildFrames->GetElement(i, &pChildFrame));
47 assert(Succeeded(result));
48
49 result = ResultVal(m_pLightFrame->DeleteChild(pChildFrame));
50 assert(Succeeded(result));
51
52 refCount = pChildFrame->Release(); // GetElement() does AddRef()
53 assert(refCount >= 1);
54 }
55
56 refCount = pChildFrames->Release();
57 assert(refCount == 0);
58
59 refCount = m_pLightFrame->Release();
60 assert(refCount == 0);
61}
62
63// Forward declare to satisfy order check
64void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg);
65
66// FUNCTION: LEGO1 0x100a1160
67// FUNCTION: BETA10 0x10168ba5
69 IDirect3DRM2* pDevice,
70 IDirect3DRMViewport* pViewport,
71 IDirect3DRMFrame2* pCamera
72)
73{
74 ViewportAppData* pViewportAppData = new ViewportAppData(pDevice);
75 assert(pViewportAppData);
76
77 pViewportAppData->m_pCamera = pCamera;
78 assert(!pViewport->GetAppData());
79
80 Result result = ResultVal(pViewport->SetAppData(reinterpret_cast<LPD3DRM_APPDATA>(pViewportAppData)));
81 assert(Succeeded(result));
82 assert(reinterpret_cast<ViewportAppData*>(pViewport->GetAppData()) == pViewportAppData);
83
84 if (Succeeded(result)) {
85 result = ResultVal(pViewport->AddDestroyCallback(ViewportDestroyCallback, pViewportAppData));
86 assert(Succeeded(result));
87 }
88
89 if (!Succeeded(result)) {
90 delete pViewportAppData;
91 pViewport->SetAppData(0);
92 }
93
94 return result;
95}
96
97// FUNCTION: BETA10 0x1016bd80
99 IDirect3DRMFrame* pFrame,
100 IDirect3DRMFrame* pCamera,
101 IDirect3DRMFrame* pLightFrame
102)
103{
104 Result result = Success;
105 if (pFrame) {
106 // remove camera and light frame from frame that was rendered
107 // this doesn't destroy the camera as it is still the camera of the viewport...
108 result = ResultVal(pFrame->DeleteChild(pCamera));
109 assert(Succeeded(result));
110 assert((pCamera->AddRef(), pCamera->Release()) > 0);
111
112 result = ResultVal(pFrame->DeleteChild(pLightFrame));
113 assert(Succeeded(result));
114
115 // decrease frame's ref count (it was increased in ViewPrepareFrameForRender())
116 pFrame->Release();
117 }
118 return result;
119}
120
121// FIXME: from LEGO1/tgl/d3drm/view.cpp
122
123// FUNCTION: LEGO1 0x100a1240
124// FUNCTION: BETA10 0x10168dc9
125void ViewportDestroyCallback(IDirect3DRMObject* pObject, void* pArg)
126{
127 ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pArg);
128 assert(static_cast<ViewImpl::ViewDataType>(pObject));
129 assert(pViewportAppData);
130
132 pViewportAppData->m_pLastRenderedFrame,
133 pViewportAppData->m_pCamera,
134 pViewportAppData->m_pLightFrame
135 );
136
137 assert(Succeeded(result));
138
139 delete pViewportAppData;
140}
141
142// FUNCTION: LEGO1 0x100a1290
143// FUNCTION: BETA10 0x10168eab
145 IDirect3DRMViewport* pViewport,
146 int x,
147 int y,
148 const GroupImpl** ppGroupsToPickFrom,
149 int groupsToPickFromCount,
150 const Group**& rppPickedGroups,
151 int& rPickedGroupCount
152)
153{
154 // Left unimplemented in shipped game.
155 return Error;
156}
157
158inline ViewportAppData* ViewportGetData(IDirect3DRMViewport* pViewport)
159{
160 return reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
161}
162
163// FUNCTION: BETA10 0x10170ab0
164inline IDirect3DRMFrame* ViewportGetLightFrame(IDirect3DRMViewport* pViewport)
165{
166 assert(pViewport->GetAppData());
167 return reinterpret_cast<ViewportAppData*>(pViewport->GetAppData())->m_pLightFrame;
168}
169
170// FUNCTION: LEGO1 0x100a2d80
171// FUNCTION: BETA10 0x1016e640
173{
174 return reinterpret_cast<void*>(&m_data);
175}
176
177// FUNCTION: BETA10 0x10170a40
178inline Result ViewAddLight(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame* pLight)
179{
180 IDirect3DRMFrame* pLightFrame = ViewportGetLightFrame(pViewport);
181
182 assert(pLightFrame);
183 return ResultVal(pLightFrame->AddChild(const_cast<IDirect3DRMFrame*>(pLight)));
184}
185
186// FUNCTION: BETA10 0x101709a0
187inline Result ViewImpl::Add(const LightImpl& rLight)
188{
189 assert(m_data);
190 assert(rLight.ImplementationData());
191
192 return ViewAddLight(m_data, rLight.ImplementationData());
193}
194
195// FUNCTION: LEGO1 0x100a2d90
196// FUNCTION: BETA10 0x1016e690
198{
199 assert(m_data);
200 assert(pLight);
201
202 return Add(*static_cast<const LightImpl*>(pLight));
203}
204
205// FUNCTION: BETA10 0x10170bb0
206inline Result ViewRemoveLight(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame* pLight)
207{
208 IDirect3DRMFrame* pLightFrame = ViewportGetLightFrame(pViewport);
209
210 assert(pLightFrame);
211 return ResultVal(pLightFrame->DeleteChild(const_cast<IDirect3DRMFrame*>(pLight)));
212}
213
214// FUNCTION: BETA10 0x10170b10
215inline Result ViewImpl::Remove(const LightImpl& rLight)
216{
217 assert(m_data);
218 assert(rLight.ImplementationData());
219
220 return ViewRemoveLight(m_data, rLight.ImplementationData());
221}
222
223// FUNCTION: LEGO1 0x100a2dc0
224// FUNCTION: BETA10 0x1016e710
226{
227 assert(m_data);
228 assert(pLight);
229
230 return Remove(*static_cast<const LightImpl*>(pLight));
231}
232
233// FUNCTION: BETA10 0x10170cc0
234inline Result ViewSetCamera(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2* pCamera)
235{
236 ViewportAppData* pViewportAppData;
237 Result result;
238
239 pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
240 assert(pViewportAppData);
241
243 pViewportAppData->m_pLastRenderedFrame,
244 pViewportAppData->m_pCamera,
245 pViewportAppData->m_pLightFrame
246 );
247 assert(Succeeded(result));
248 pViewportAppData->m_pCamera = const_cast<IDirect3DRMFrame2*>(pCamera);
249 pViewportAppData->m_pLastRenderedFrame = 0;
250
251 return ResultVal(pViewport->SetCamera(const_cast<IDirect3DRMFrame2*>(pCamera)));
252}
253
254// FUNCTION: BETA10 0x10170c20
256{
257 assert(m_data);
258 assert(rCamera.ImplementationData());
259
260 return ViewSetCamera(m_data, rCamera.ImplementationData());
261}
262
263// FUNCTION: LEGO1 0x100a2df0
264// FUNCTION: BETA10 0x1016e790
266{
267 assert(m_data);
268 assert(pCamera);
269
270 return SetCamera(*static_cast<const CameraImpl*>(pCamera));
271}
272
273// FUNCTION: BETA10 0x1016e870
274inline Result ViewSetProjection(IDirect3DRMViewport* pViewport, ProjectionType type)
275{
276 D3DRMPROJECTIONTYPE projectionType = Translate(type);
277
278 return ResultVal(pViewport->SetProjection(projectionType));
279}
280
281// FUNCTION: LEGO1 0x100a2e70
282// FUNCTION: BETA10 0x1016e810
284{
285 assert(m_data);
286
287 return ViewSetProjection(m_data, type);
288}
289
290// FUNCTION: BETA10 0x1016e920
292 IDirect3DRMViewport* pViewport,
293 float frontClippingDistance,
294 float backClippingDistance,
295 float degrees
296)
297{
298 float field = frontClippingDistance * tan(DegreesToRadians(degrees / 2));
299 Result result;
300 result = ResultVal(pViewport->SetFront(frontClippingDistance));
301 if (Succeeded(result)) {
302 result = ResultVal(pViewport->SetBack(backClippingDistance));
303 }
304 if (Succeeded(result)) {
305 result = ResultVal(pViewport->SetField(field));
306 }
307
308 return result;
309}
310
311// FUNCTION: LEGO1 0x100a2eb0
312// FUNCTION: BETA10 0x1016e8b0
313Result ViewImpl::SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees)
314{
315 assert(m_data);
316
317 return ViewSetFrustrum(m_data, frontClippingDistance, backClippingDistance, degrees);
318}
319
320// FUNCTION: BETA10 0x1016ea70
321inline Result ViewSetBackgroundColor(IDirect3DRMViewport* pViewport, float r, float g, float b)
322{
323 Result result = Success;
324
325 ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
326 assert(pViewportAppData);
327
328 pViewportAppData->m_backgroundColorRed = r;
329 pViewportAppData->m_backgroundColorGreen = g;
330 pViewportAppData->m_backgroundColorBlue = b;
331
332 if (pViewportAppData->m_pLastRenderedFrame) {
333 result = ResultVal(pViewportAppData->m_pLastRenderedFrame->SetSceneBackgroundRGB(r, g, b));
334 assert(Succeeded(result));
335 }
336
337 return result;
338}
339
340// FUNCTION: LEGO1 0x100a2f30
341// FUNCTION: BETA10 0x1016ea00
342Result ViewImpl::SetBackgroundColor(float r, float g, float b)
343{
344 assert(m_data);
345
346 return ViewSetBackgroundColor(m_data, r, g, b);
347}
348
349// FUNCTION: BETA10 0x1016ebd0
350inline Result ViewGetBackgroundColor(IDirect3DRMViewport* pViewport, float* r, float* g, float* b)
351{
352 ViewportAppData* pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
353 assert(pViewportAppData);
354
355 *r = pViewportAppData->m_backgroundColorRed;
356 *g = pViewportAppData->m_backgroundColorGreen;
357 *b = pViewportAppData->m_backgroundColorBlue;
358
359 return Success;
360}
361
362// FUNCTION: LEGO1 0x100a2f80
363// FUNCTION: BETA10 0x1016eb60
364Result ViewImpl::GetBackgroundColor(float* r, float* g, float* b)
365{
366 assert(m_data);
367
368 return ViewGetBackgroundColor(m_data, r, g, b);
369}
370
371// FUNCTION: BETA10 0x1016ecb0
372inline Result ViewClear(IDirect3DRMViewport* pViewport)
373{
374 return ResultVal(pViewport->Clear());
375}
376
377// FUNCTION: LEGO1 0x100a2fb0
378// FUNCTION: BETA10 0x1016ec50
380{
381 assert(m_data);
382
383 return ViewClear(m_data);
384}
385
386// FUNCTION: BETA10 0x10170fb0
388 IDirect3DRMFrame* pFrame,
389 IDirect3DRMFrame* pCamera,
390 IDirect3DRMFrame* pLightFrame,
391 float backgroundRed,
392 float backgroundGreen,
393 float backgroundBlue
394)
395{
396 Result result = Success;
397
398 if (pFrame) {
399 // set background color
400 result = ResultVal(pFrame->SetSceneBackgroundRGB(backgroundRed, backgroundGreen, backgroundBlue));
401 assert(Succeeded(result));
402
403 // add camera to frame to be rendered
404 result = ResultVal(pFrame->AddChild(pCamera));
405 assert(Succeeded(result));
406
407 // add light frame to frame to be rendered
408 result = ResultVal(pFrame->AddChild(pLightFrame));
409 assert(Succeeded(result));
410
411 // increase ref count of frame to ensure it does not get deleted underneath us
412 pFrame->AddRef();
413 }
414
415 return result;
416}
417
418// FUNCTION: BETA10 0x10170e30
419inline Result ViewRender(IDirect3DRMViewport* pViewport, const IDirect3DRMFrame2* pGroup)
420{
421 ViewportAppData* pViewportAppData;
422 Result result;
423
424 pViewportAppData = reinterpret_cast<ViewportAppData*>(pViewport->GetAppData());
425 assert(pViewportAppData);
426
427 if (pViewportAppData->m_pLastRenderedFrame != pGroup) {
429 pViewportAppData->m_pLastRenderedFrame,
430 pViewportAppData->m_pCamera,
431 pViewportAppData->m_pLightFrame
432 );
433
434 assert(Succeeded(result));
435
436 pViewportAppData->m_pLastRenderedFrame = const_cast<IDirect3DRMFrame2*>(pGroup);
437
439 pViewportAppData->m_pLastRenderedFrame,
440 pViewportAppData->m_pCamera,
441 pViewportAppData->m_pLightFrame,
442 pViewportAppData->m_backgroundColorRed,
443 pViewportAppData->m_backgroundColorGreen,
444 pViewportAppData->m_backgroundColorBlue
445 );
446 }
447
448 assert(Succeeded(result));
449
450 result = ResultVal(pViewport->Render(const_cast<IDirect3DRMFrame2*>(pGroup)));
451 assert(Succeeded(result));
452
453 return result;
454}
455
456// FUNCTION: BETA10 0x10170d90
457inline Result ViewImpl::Render(const GroupImpl& rScene)
458{
459 assert(m_data);
460 assert(rScene.ImplementationData());
461
462 return ViewRender(m_data, rScene.ImplementationData());
463}
464
465// FUNCTION: LEGO1 0x100a2fd0
466// FUNCTION: BETA10 0x1016ece0
468{
469 assert(m_data);
470 assert(pGroup);
471
472 return Render(*static_cast<const GroupImpl*>(pGroup));
473}
474
475// FUNCTION: BETA10 0x1016edd0
477 IDirect3DRMViewport* pViewport,
478 unsigned long x,
479 unsigned long y,
480 unsigned long width,
481 unsigned long height
482)
483{
484 return ResultVal(pViewport->ForceUpdate(x, y, x + width - 1, y + height - 1));
485}
486
487// FUNCTION: LEGO1 0x100a3080
488// FUNCTION: BETA10 0x1016ed60
489Result ViewImpl::ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height)
490{
491 assert(m_data);
492
493 return ViewForceUpdate(m_data, x, y, width, height);
494}
495
496// FUNCTION: BETA10 0x101710f0
498 unsigned long x,
499 unsigned long y,
500 const GroupImpl** ppGroupsToPickFrom,
501 int groupsToPickFromCount,
502 const Group**& rppPickedGroups,
503 int& rPickedGroupCount
504)
505{
506 assert(m_data);
507
508 return ViewportPickImpl(
509 m_data,
510 x,
511 y,
512 ppGroupsToPickFrom,
513 groupsToPickFromCount,
514 rppPickedGroups,
515 rPickedGroupCount
516 );
517}
518
519// FUNCTION: LEGO1 0x100a30c0
520// FUNCTION: BETA10 0x1016ee10
522 unsigned long x,
523 unsigned long y,
524 const Group** ppGroupsToPickFrom,
525 int groupsToPickFromCount,
526 const Group**& rppPickedGroups,
527 int& rPickedGroupCount
528)
529{
530 assert(m_data);
531
532 return Pick(
533 x,
534 y,
535 reinterpret_cast<const GroupImpl**>(ppGroupsToPickFrom),
536 groupsToPickFromCount,
537 rppPickedGroups,
538 rPickedGroupCount
539 );
540}
541
542// FUNCTION: BETA10 0x1016eff0
543inline Result ViewTransformWorldToScreen(IDirect3DRMViewport* pViewport, const float world[3], float screen[4])
544{
545 D3DRMVECTOR4D d3dRMScreen;
546 D3DVECTOR d3dRMWorld;
547 D3DVECTOR* pD3DRMWorld = Translate(world, d3dRMWorld);
548 Result result;
549
550 result = ResultVal(pViewport->Transform(&d3dRMScreen, pD3DRMWorld));
551
552 if (Succeeded(result)) {
553 screen[0] = d3dRMScreen.x;
554 screen[1] = d3dRMScreen.y;
555 screen[2] = d3dRMScreen.z;
556 screen[3] = d3dRMScreen.w;
557 }
558
559 return result;
560}
561
562// FUNCTION: LEGO1 0x100a30f0
563// FUNCTION: BETA10 0x1016ef90
564Result ViewImpl::TransformWorldToScreen(const float world[3], float screen[4])
565{
566 assert(m_data);
567
568 return ViewTransformWorldToScreen(m_data, world, screen);
569}
570
571// FUNCTION: BETA10 0x1016f0d0
572inline Result ViewTransformScreenToWorld(IDirect3DRMViewport* pViewport, const float screen[4], float world[3])
573{
574 D3DVECTOR d3dRMWorld;
575 D3DRMVECTOR4D d3dScreen;
576 d3dScreen.x = screen[0];
577 d3dScreen.y = screen[1];
578 d3dScreen.z = screen[2];
579 d3dScreen.w = screen[3];
580 Result result;
581
582 result = ResultVal(pViewport->InverseTransform(&d3dRMWorld, &d3dScreen));
583
584 if (Succeeded(result)) {
585 world[0] = d3dRMWorld.x;
586 world[1] = d3dRMWorld.y;
587 world[2] = d3dRMWorld.z;
588 }
589
590 return result;
591}
592
593// FUNCTION: LEGO1 0x100a3160
594// FUNCTION: BETA10 0x1016f070
595Result ViewImpl::TransformScreenToWorld(const float screen[4], float world[3])
596{
597 assert(m_data);
598
599 return ViewTransformScreenToWorld(m_data, screen, world);
600}
[AI] Implementation of Tgl::Camera, wraps a Direct3DRMFrame2 and provides transformation management [...
Definition: impl.h:666
const CameraDataType & ImplementationData() const
Retrieves camera pointer (const) [AI].
Definition: impl.h:692
[AI] Implementation of Tgl::Group, wraps a Direct3DRMFrame2 and provides scene graph and transformati...
Definition: impl.h:944
const GroupDataType & ImplementationData() const
Gets internal group/frame pointer, const [AI].
Definition: impl.h:1036
[AI] Implementation of Tgl::Light, wraps a Direct3DRMFrame2 and color data [AI]
Definition: impl.h:737
const LightDataType & ImplementationData() const
Retrieves light pointer (const) [AI].
Definition: impl.h:771
Result Add(const Light *) override
Adds a light to this view [AI].
Definition: view.cpp:197
static Result ViewportCreateAppData(IDirect3DRM2 *, IDirect3DRMViewport *, IDirect3DRMFrame2 *)
Associates user app data with a viewport/frame [AI].
Definition: view.cpp:68
void * ImplementationDataPtr() override
Returns Direct3DRMViewport implementation pointer [AI].
Definition: view.cpp:172
Result Render(const Group *) override
Renders the provided scene/group [AI].
Definition: view.cpp:467
Result GetBackgroundColor(float *r, float *g, float *b) override
Gets the background color [AI].
Definition: view.cpp:364
Result SetFrustrum(float frontClippingDistance, float backClippingDistance, float degrees) override
Sets the view frustum parameters [AI].
Definition: view.cpp:313
Result Pick(unsigned long x, unsigned long y, const Group **ppGroupsToPickFrom, int groupsToPickFromCount, const Group **&rppPickedGroups, int &rPickedGroupCount) override
Picks objects in the view by screen coordinate [AI].
Definition: view.cpp:521
Result SetBackgroundColor(float r, float g, float b) override
Sets background color [AI].
Definition: view.cpp:342
IDirect3DRMViewport * ViewDataType
[AI] Internal pointer to Direct3DRMViewport [AI]
Definition: impl.h:566
Result TransformWorldToScreen(const float world[3], float screen[4]) override
Converts a world coordinate to screen space [AI].
Definition: view.cpp:564
Result SetCamera(const Camera *) override
Sets the active camera for this view [AI].
Definition: view.cpp:265
Result Clear() override
Clears the view [AI].
Definition: view.cpp:379
Result ForceUpdate(unsigned long x, unsigned long y, unsigned long width, unsigned long height) override
Forces an update/redraw of specified rectangle [AI].
Definition: view.cpp:489
Result Remove(const Light *) override
Removes a light from this view [AI].
Definition: view.cpp:225
Result SetProjection(ProjectionType) override
Sets the camera projection type (perspective/orthographic) [AI].
Definition: view.cpp:283
Result TransformScreenToWorld(const float screen[4], float world[3]) override
Converts screen coordinates to world space [AI].
Definition: view.cpp:595
[AI] Represents a viewpoint in the 3D scene.
Definition: tgl.h:531
[AI] Scene graph node for parental transforms/color/material/texture; can hold meshes or other groups...
Definition: tgl.h:669
[AI] Represents a source of lighting in the 3D scene.
Definition: tgl.h:559
enum _D3DRMPROJECTIONTYPE D3DRMPROJECTIONTYPE
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
LPVOID LPD3DRM_APPDATA
[AI] Application data type varies by DirectX version [AI]
Definition: impl.h:10
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
void ViewportDestroyCallback(IDirect3DRMObject *, void *)
Definition: view.cpp:125
[AI] Forward declaration for Direct3DRMTexture interface [AI]
Definition: impl.h:23
Result ResultVal(HRESULT result)
Returns a Tgl Result value for HRESULT [AI].
Definition: impl.h:35
D3DRMRENDERQUALITY Translate(ShadingModel tglShadingModel)
Converts Tgl shading model enum to D3DRM enum [AI].
Definition: impl.h:1398
int Succeeded(Result result)
[AI] Returns whether a Tgl::Result indicates success.
Definition: tgl.h:136
ProjectionType
[AI] Projection modes for camera/view transforms.
Definition: tgl.h:55
Result
[AI] Result type used throughout the Tgl API to report operation success or failure.
Definition: tgl.h:126
@ Success
[AI] Operation succeeded. [AI]
Definition: tgl.h:128
@ Error
[AI] Operation failed. [AI]
Definition: tgl.h:127
double DegreesToRadians(double degrees)
[AI] Converts an angle from degrees to radians.
Definition: tglvector.h:32
ViewportAppData(IDirect3DRM2 *pRenderer)
Definition: view.cpp:23
IDirect3DRMFrame2 * m_pLightFrame
Definition: view.cpp:11
float m_backgroundColorRed
Definition: view.cpp:14
~ViewportAppData()
Definition: view.cpp:37
IDirect3DRMFrame2 * m_pLastRenderedFrame
Definition: view.cpp:13
float m_backgroundColorGreen
Definition: view.cpp:15
IDirect3DRMFrame2 * m_pCamera
Definition: view.cpp:12
float m_backgroundColorBlue
Definition: view.cpp:16
D3DVALUE x
Definition: d3drmdef.h:32
D3DVALUE w
Definition: d3drmdef.h:32
D3DVALUE z
Definition: d3drmdef.h:32
D3DVALUE y
Definition: d3drmdef.h:32
D3DVALUE z
Definition: d3dtypes.h:157
D3DVALUE y
Definition: d3dtypes.h:153
D3DVALUE x
Definition: d3dtypes.h:149
IDirect3DRMFrame * ViewportGetLightFrame(IDirect3DRMViewport *pViewport)
Definition: view.cpp:164
Result ViewPrepareFrameForRender(IDirect3DRMFrame *pFrame, IDirect3DRMFrame *pCamera, IDirect3DRMFrame *pLightFrame, float backgroundRed, float backgroundGreen, float backgroundBlue)
Definition: view.cpp:387
Result ViewSetProjection(IDirect3DRMViewport *pViewport, ProjectionType type)
Definition: view.cpp:274
Result ViewportPickImpl(IDirect3DRMViewport *pViewport, int x, int y, const GroupImpl **ppGroupsToPickFrom, int groupsToPickFromCount, const Group **&rppPickedGroups, int &rPickedGroupCount)
Definition: view.cpp:144
void ViewportDestroyCallback(IDirect3DRMObject *pObject, void *pArg)
Definition: view.cpp:125
Result ViewSetFrustrum(IDirect3DRMViewport *pViewport, float frontClippingDistance, float backClippingDistance, float degrees)
Definition: view.cpp:291
Result ViewRestoreFrameAfterRender(IDirect3DRMFrame *pFrame, IDirect3DRMFrame *pCamera, IDirect3DRMFrame *pLightFrame)
Definition: view.cpp:98
Result ViewRender(IDirect3DRMViewport *pViewport, const IDirect3DRMFrame2 *pGroup)
Definition: view.cpp:419
Result ViewForceUpdate(IDirect3DRMViewport *pViewport, unsigned long x, unsigned long y, unsigned long width, unsigned long height)
Definition: view.cpp:476
Result ViewSetCamera(IDirect3DRMViewport *pViewport, const IDirect3DRMFrame2 *pCamera)
Definition: view.cpp:234
Result ViewTransformScreenToWorld(IDirect3DRMViewport *pViewport, const float screen[4], float world[3])
Definition: view.cpp:572
Result ViewAddLight(IDirect3DRMViewport *pViewport, const IDirect3DRMFrame *pLight)
Definition: view.cpp:178
ViewportAppData * ViewportGetData(IDirect3DRMViewport *pViewport)
Definition: view.cpp:158
Result ViewGetBackgroundColor(IDirect3DRMViewport *pViewport, float *r, float *g, float *b)
Definition: view.cpp:350
Result ViewClear(IDirect3DRMViewport *pViewport)
Definition: view.cpp:372
Result ViewTransformWorldToScreen(IDirect3DRMViewport *pViewport, const float world[3], float screen[4])
Definition: view.cpp:543
Result ViewRemoveLight(IDirect3DRMViewport *pViewport, const IDirect3DRMFrame *pLight)
Definition: view.cpp:206
Result ViewSetBackgroundColor(IDirect3DRMViewport *pViewport, float r, float g, float b)
Definition: view.cpp:321