MeVisLab Toolbox Reference
WEMIndexedFace.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#pragma once
14
15#include "MLWEMIncludes.h"
17#include "WEMPatch.h"
18
20
22
25{
26public:
27
30
33
35 virtual ~WEMIndexedFace();
36
38 inline unsigned int getNumIndices() const { return static_cast<unsigned int>(_indices.size()); }
40 inline int getIndexAt(unsigned int index) const { return _indices[index]; }
42 inline void addIndex(int index) { _indices.push_back(index); }
43
45 inline unsigned int getNumTextelIndices() const { return static_cast<unsigned int>(_tindices.size()); }
47 inline int getTextelIndexAt(unsigned int index) const { return _tindices[index]; }
49 inline void addTextelIndex(int index) { _tindices.push_back(index); }
50
52 inline Vector3 getNormal() const { return _normal; }
54 inline void setNormal(Vector3 normal) { _normal = normal; }
55
57 void mirror();
58
61
62private:
63
65 std::vector<int> _indices;
66
68 std::vector<int> _tindices;
69
71 Vector3 _normal;
72};
73
75
#define MLWEM_EXPORT
Definition MLWEMSystem.h:18
Defines the mesh component: an face holding a list of up to 100 indices.
virtual ~WEMIndexedFace()
Standard destructor.
unsigned int getNumIndices() const
Returns the number of nodes.
unsigned int getNumTextelIndices() const
Returns the number of textels.
int getTextelIndexAt(unsigned int index) const
Returns the textel index at the given index in the face.
WEMIndexedFace()
Standard constructor.
void addIndex(int index)
Adds an index (dynamic).
void setNormal(Vector3 normal)
Sets the normal.
WEMIndexedFace(const WEMIndexedFace &f)
Standard copy constructor.
WEMVector< WEMIndexedFace > * tessellate(WEMPatch *wemPatch)
Partitions concave polygons.
void addTextelIndex(int index)
Returns the textel index (dynamic).
Vector3 getNormal() const
Returns the normal.
void mirror()
Mirrors the face.
int getIndexAt(unsigned int index) const
Returns the index at the given index in the face.
Base class for triangle and quad patches.
Definition WEMPatch.h:48
Dynamic templated vector.
Definition WEMVector.h:28
Target mlrange_cast(Source arg)
Generic version of checked ML casts.