File: NullModel.cpp

package info (click to toggle)
darkradiant 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,080 kB
  • sloc: cpp: 264,743; ansic: 10,659; python: 1,852; xml: 1,650; sh: 92; makefile: 21
file content (68 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (3)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "NullModel.h"

#include <stdexcept>

namespace model
{

NullModel::NullModel() :
	_aabbLocal(Vector3(0, 0, 0), Vector3(8, 8, 8))
{}

const AABB& NullModel::localAABB() const
{
	return _aabbLocal;
}

std::string NullModel::getFilename() const
{
	return _filename;
}

void NullModel::setFilename(const std::string& filename)
{
	_filename = filename;
}

std::string NullModel::getModelPath() const
{
	return _modelPath;
}

void NullModel::setModelPath(const std::string& modelPath)
{
	_modelPath = modelPath;
}

void NullModel::applySkin(const decl::ISkin::Ptr& skin)
{
	// do nothing
}

int NullModel::getSurfaceCount() const
{
	return 0;
}

int NullModel::getVertexCount() const
{
	return 0;
}

int NullModel::getPolyCount() const
{
	return 0;
}

const IModelSurface& NullModel::getSurface(unsigned surfaceNum) const
{
	throw std::runtime_error("NullModel::getSurface: invalid call, no surfaces.");
}

const StringList& NullModel::getActiveMaterials() const
{
	static std::vector<std::string> _dummyMaterials;
	return _dummyMaterials;
}

} // namespace model