File: BillBoard.cpp

package info (click to toggle)
pinball 0.3.20201218-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 8,452 kB
  • sloc: cpp: 15,230; makefile: 840; sh: 381; xml: 24
file content (54 lines) | stat: -rw-r--r-- 1,225 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/***************************************************************************
                          BillBoard.cpp  -  description
                             -------------------
    begin                : Sun Dec 16 2001
    copyright            : (C) 2001 by henqvist
    email                : henqvist@excite.com
 ***************************************************************************/

#include "Private.h"
#include "BillBoard.h"

BillBoard::BillBoard(EmTexture * tex, float sizex, float sizey) {
	EmAssert(tex != NULL, "texture not allowed to be null");

	m_iProperties = 0;
	p_Parent = NULL;
	m_Texture = tex;
	m_fSizexD2 = sizex / 2;
	m_fSizeyD2 = sizey / 2;
	m_fZOffset = 0;

	m_aTexCoord[0].u = 0;
	m_aTexCoord[0].v = 0;
	m_aTexCoord[1].u = 1;
	m_aTexCoord[1].v = 0;
	m_aTexCoord[2].u = 1;
	m_aTexCoord[2].v = 1;
	m_aTexCoord[3].u = 0;
	m_aTexCoord[3].v = 1;

	m_vtxSrc.x = 0;
	m_vtxSrc.y = 0;
	m_vtxSrc.z = 0;
}

BillBoard::~BillBoard() {
}

void BillBoard::setProperty(int p) {
	m_iProperties |= p;
}

void BillBoard::unsetProperty(int p) {
	m_iProperties -= (m_iProperties & p);
}

void BillBoard::setParent(Group* p) {
	p_Parent = p;
}

void BillBoard::setTexture(EmTexture* tex) {
	m_Texture = tex;
}