TDME2
1.9.121
src
tdme
engine
subsystems
rendering
Object3DBase_TransformedFacesIterator.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
5
#include <
tdme/tdme.h
>
6
#include <
tdme/engine/model/Node.h
>
7
#include <
tdme/engine/subsystems/rendering/Object3DBase.h
>
8
#include <
tdme/engine/subsystems/rendering/Object3DNode.h
>
9
#include <
tdme/math/fwd-tdme.h
>
10
#include <
tdme/math/Matrix4x4.h
>
11
#include <
tdme/math/Vector3.h
>
12
13
using
std::array;
14
15
using
tdme::engine::model::Node
;
16
using
tdme::engine::subsystems::rendering::Object3DBase
;
17
using
tdme::engine::subsystems::rendering::Object3DNode
;
18
using
tdme::math::Matrix4x4
;
19
using
tdme::math::Vector3
;
20
21
/**
22
* Transformed faces iterator
23
* @author Andreas Drewke
24
* @version $Id$
25
*/
26
class
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator
27
{
28
private
:
29
Object3DBase
*
object3DBase
{
nullptr
};
30
Node
*
node
{
nullptr
};
31
array<Vector3, 3>
vertices
;
32
Matrix4x4
matrix
;
33
int32_t
faceCount
;
34
int32_t
faceIdxTotal
;
35
int32_t
faceIdx
;
36
int32_t
object3DNodeIdx
;
37
int32_t
facesEntityIdx
;
38
39
private
:
40
41
/**
42
* Reset
43
*/
44
void
reset
();
45
public
:
46
/**
47
* Public constructor
48
*/
49
Object3DBase_TransformedFacesIterator
(
Object3DBase
*
object3DBase
);
50
51
/**
52
* Return iterator ready to iterate
53
*/
54
Object3DBase_TransformedFacesIterator
*
iterator
();
55
56
/**
57
* Has next
58
*/
59
inline
bool
hasNext
() {
60
return
faceIdxTotal
<
faceCount
;
61
}
62
63
/**
64
* Retrieve next triangle
65
* @return next 3 triangle vectors
66
*/
67
const
array<Vector3, 3>&
next
();
68
69
/**
70
* @return current node
71
*/
72
inline
Node
*
getNode
() {
73
return
node
;
74
}
75
76
};
Matrix4x4.h
Node.h
Object3DBase.h
Object3DNode.h
Vector3.h
tdme::engine::model::Node
Model node.
Definition:
Node.h:31
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator
Transformed faces iterator.
Definition:
Object3DBase_TransformedFacesIterator.h:27
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::matrix
Matrix4x4 matrix
Definition:
Object3DBase_TransformedFacesIterator.h:32
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::getNode
Node * getNode()
Definition:
Object3DBase_TransformedFacesIterator.h:72
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::next
const array< Vector3, 3 > & next()
Retrieve next triangle.
Definition:
Object3DBase_TransformedFacesIterator.cpp:56
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::faceIdx
int32_t faceIdx
Definition:
Object3DBase_TransformedFacesIterator.h:35
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::facesEntityIdx
int32_t facesEntityIdx
Definition:
Object3DBase_TransformedFacesIterator.h:37
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::object3DBase
Object3DBase * object3DBase
Definition:
Object3DBase_TransformedFacesIterator.h:29
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::hasNext
bool hasNext()
Has next.
Definition:
Object3DBase_TransformedFacesIterator.h:59
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::faceCount
int32_t faceCount
Definition:
Object3DBase_TransformedFacesIterator.h:33
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::Object3DBase_TransformedFacesIterator
Object3DBase_TransformedFacesIterator(Object3DBase *object3DBase)
Public constructor.
Definition:
Object3DBase_TransformedFacesIterator.cpp:23
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::iterator
Object3DBase_TransformedFacesIterator * iterator()
Return iterator ready to iterate.
Definition:
Object3DBase_TransformedFacesIterator.cpp:51
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::object3DNodeIdx
int32_t object3DNodeIdx
Definition:
Object3DBase_TransformedFacesIterator.h:36
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::vertices
array< Vector3, 3 > vertices
Definition:
Object3DBase_TransformedFacesIterator.h:31
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::node
Node * node
Definition:
Object3DBase_TransformedFacesIterator.h:30
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::reset
void reset()
Reset.
Definition:
Object3DBase_TransformedFacesIterator.cpp:29
tdme::engine::subsystems::rendering::Object3DBase_TransformedFacesIterator::faceIdxTotal
int32_t faceIdxTotal
Definition:
Object3DBase_TransformedFacesIterator.h:34
tdme::engine::subsystems::rendering::Object3DBase
Object3D base class.
Definition:
Object3DBase.h:38
tdme::engine::subsystems::rendering::Object3DNode
Object 3d node specifically for rendering.
Definition:
Object3DNode.h:39
tdme::math::Matrix4x4
4x4 3D Matrix class
Definition:
Matrix4x4.h:24
tdme::math::Vector3
3D vector 3 class
Definition:
Vector3.h:22
fwd-tdme.h
tdme.h
Generated by
1.9.3