Isle
Loading...
Searching...
No Matches
light.cpp
Go to the documentation of this file.
1#include "impl.h"
2
3using namespace TglImpl;
4
7
8// FUNCTION: LEGO1 0x100a3770
9// FUNCTION: BETA10 0x1016f630
11{
12 return reinterpret_cast<void*>(&m_data);
13}
14
15// FUNCTION: LEGO1 0x100a3780
17{
18 D3DRMMATRIX4D helper;
19 D3DRMMATRIX4D* d3dMatrix = Translate(matrix, helper);
20 return ResultVal(m_data->AddTransform(D3DRMCOMBINE_REPLACE, *d3dMatrix));
21}
22
23// FUNCTION: LEGO1 0x100a37e0
24Result LightImpl::SetColor(float r, float g, float b)
25{
26 IDirect3DRMLightArray* lightArray;
27 IDirect3DRMLight* light;
28 m_data->GetLights(&lightArray);
29 lightArray->GetElement(0, &light);
30 return ResultVal(light->SetColorRGB(r, g, b));
31}
[AI] Implementation of Tgl::Light, wraps a Direct3DRMFrame2 and color data [AI]
Definition: impl.h:737
Result SetTransformation(FloatMatrix4 &) override
Sets transformation matrix for the light [AI].
Definition: light.cpp:16
Result SetColor(float r, float g, float b) override
Sets color for the light [AI].
Definition: light.cpp:24
void * ImplementationDataPtr() override
Returns Direct3DRMFrame2 implementation pointer [AI].
Definition: light.cpp:10
[AI] Represents a source of lighting in the 3D scene.
Definition: tgl.h:559
@ D3DRMCOMBINE_REPLACE
Definition: d3drmdef.h:109
D3DVALUE D3DRMMATRIX4D[4][4]
Definition: d3drmdef.h:35
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
[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
Result
[AI] Result type used throughout the Tgl API to report operation success or failure.
Definition: tgl.h:126
float FloatMatrix4[4][4]
[AI] Represents a 4x4 matrix of single-precision floating point values.
Definition: tglvector.h:53