ScummVM API documentation
RenderObject2D.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/*
23 * Copyright (C) 2006-2010 - Frictional Games
24 *
25 * This file is part of HPL1 Engine.
26 */
27
28#ifndef HPL_RENDEROBJECT2D_H
29#define HPL_RENDEROBJECT2D_H
30
31#include "hpl1/engine/graphics/GraphicsTypes.h"
32#include "hpl1/engine/graphics/Material.h"
33#include "hpl1/engine/system/SystemTypes.h"
34
35namespace hpl {
36
38public:
39 virtual ~iRenderObject2DRenderer() = default;
40 virtual void RenderToBatch(eMaterialRenderType aRenderType,
41 unsigned int &aIdxAdd) = 0;
42};
43
45public:
46 cRenderObject2D(iMaterial *apMaterial, tVertexVec *mpVtxVec, tUIntVec *mpIdxVec,
47 ePrimitiveType aType, float afZ, cRect2f &aRect, cMatrixf *apMtx = NULL, cVector3f *apTransform = NULL);
48
49 cRenderObject2D(iMaterial *apMaterial, iRenderObject2DRenderer *apRenderer,
50 ePrimitiveType aType, float afZ);
51
53
54 iMaterial *GetMaterial() const { return mpMaterial; }
55 tVertexVec *GetVertexVec() const { return mpVtxVec; }
56 tUIntVec *GetIndexVec() const { return mpIdxVec; }
57 ePrimitiveType GetType() const { return mType; }
58 cVector3f *GetTransform() const { return mpTransform; }
59 float GetZ() const { return mfZ; }
60 const cRect2f &GetRect() const { return mRect; }
61 iRenderObject2DRenderer *GetCustomRenderer() const { return mpCustomRenderer; }
62
63private:
64 iMaterial *mpMaterial;
65 tVertexVec *mpVtxVec;
66 tUIntVec *mpIdxVec;
67 ePrimitiveType mType;
68 cMatrixf *mpMtx;
69 cVector3f *mpTransform;
70 float mfZ;
71 cRect2f mRect;
72 iRenderObject2DRenderer *mpCustomRenderer;
73};
74
75} // namespace hpl
76
77#endif // HPL_RENDEROBJECT2D_H
Definition: RenderObject2D.h:44
Definition: Material.h:203
Definition: RenderObject2D.h:37