Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine
1.5.26
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
c
d
f
g
i
l
m
n
o
p
q
r
s
t
u
v
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
b
d
f
i
m
s
v
w
Typedefs
a
b
c
f
g
i
k
n
o
r
s
t
u
v
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
VolumeObject.hpp
1
#pragma once
2
3
#include <Core/Geometry/AbstractGeometry.hpp>
4
#include <
Core/Types.hpp
>
5
#include <Engine/Data/DisplayableObject.hpp>
6
#include <Engine/Data/Mesh.hpp>
7
#include <Engine/Data/Texture.hpp>
8
#include <Engine/RaEngine.hpp>
9
#include <memory>
10
#include <string>
11
12
namespace
Ra
{
13
namespace
Engine {
14
namespace
Data {
15
class
ShaderProgram;
16
}
// namespace Data
17
}
// namespace Engine
18
19
namespace
Core {
20
namespace
Geometry
{
21
class
AbstractVolume;
22
}
// namespace Geometry
23
}
// namespace Core
24
namespace
Engine {
25
namespace
Data {
32
class
RA_ENGINE_API
VolumeObject
:
public
Displayable
33
{
34
35
public
:
36
explicit
VolumeObject
(
const
std::string
& name );
37
VolumeObject
(
const
VolumeObject
& rhs ) =
delete
;
38
void
operator=(
const
VolumeObject
& rhs ) =
delete
;
39
40
~VolumeObject
()
override
;
41
42
using
Displayable::getName;
43
46
inline
const
Core::Geometry::AbstractGeometry
& getAbstractGeometry()
const override
;
47
inline
Core::Geometry::AbstractGeometry
& getAbstractGeometry()
override
;
48
50
inline
const
Core::Geometry::AbstractVolume
& getVolume()
const
;
51
inline
Core::Geometry::AbstractVolume
& getVolume();
52
54
void
loadGeometry(
Core::Geometry::AbstractVolume
* volume );
55
58
void
loadGeometry(
Core::Geometry::AbstractVolume
* volume,
const
Core::Aabb& aabb );
59
61
inline
void
setDirty
() { m_isDirty =
true
; }
62
64
const
Texture
&
getDataTexture
() {
return
m_tex; }
65
70
void
updateGL()
override
;
71
73
void
render(
const
ShaderProgram
* prog )
override
;
74
76
size_t
getNumFaces
()
const override
{
return
12; }
78
inline
size_t
getNumVertices
()
const override
{
return
8; }
79
80
private
:
81
std::unique_ptr<Core::Geometry::AbstractVolume>
m_volume;
82
Texture
m_tex { {} };
84
Mesh m_mesh;
85
87
bool
m_isDirty {
false
};
88
};
32
class
RA_ENGINE_API
VolumeObject
:
public
Displayable
{
…
};
89
90
const
Core::Geometry::AbstractGeometry
&
VolumeObject::getAbstractGeometry
()
const
{
91
CORE_ASSERT( m_volume,
"Volume is not initialized"
);
92
return
*(
Core::Geometry::AbstractGeometry
*)( m_volume.get() );
93
}
90
const
Core::Geometry::AbstractGeometry
&
VolumeObject::getAbstractGeometry
()
const
{
…
}
94
95
Core::Geometry::AbstractGeometry
&
VolumeObject::getAbstractGeometry
() {
96
CORE_ASSERT( m_volume,
"Volume is not initialized"
);
97
return
*(
Core::Geometry::AbstractGeometry
*)( m_volume.get() );
98
}
99
101
const
Core::Geometry::AbstractVolume
&
VolumeObject::getVolume
()
const
{
102
CORE_ASSERT( m_volume,
"Volume is not initialized"
);
103
return
*m_volume.get();
104
}
101
const
Core::Geometry::AbstractVolume
&
VolumeObject::getVolume
()
const
{
…
}
105
106
Core::Geometry::AbstractVolume
&
VolumeObject::getVolume
() {
107
CORE_ASSERT( m_volume,
"Volume is not initialized"
);
108
return
*m_volume.get();
109
}
110
111
}
// namespace Data
112
}
// namespace Engine
113
}
// namespace Ra
Types.hpp
std::string
Ra::Core::Geometry::AbstractVolume
Definition
Volume.hpp:36
Ra::Engine::Data::Displayable
Definition
DisplayableObject.hpp:22
Ra::Engine::Data::ShaderProgram
Definition
ShaderProgram.hpp:35
Ra::Engine::Data::Texture
Represent a Texture of the engine.
Definition
Texture.hpp:120
Ra::Engine::Data::VolumeObject
Definition
VolumeObject.hpp:33
Ra::Engine::Data::VolumeObject::getDataTexture
const Texture & getDataTexture()
get read access to the 3d texture storing the data
Definition
VolumeObject.hpp:64
Ra::Engine::Data::VolumeObject::getAbstractGeometry
const Core::Geometry::AbstractGeometry & getAbstractGeometry() const override
Definition
VolumeObject.hpp:90
Ra::Engine::Data::VolumeObject::getVolume
const Core::Geometry::AbstractVolume & getVolume() const
Returns the underlying AbstractVolume.
Definition
VolumeObject.hpp:101
Ra::Engine::Data::VolumeObject::setDirty
void setDirty()
Mark the data types as dirty, forcing an update of the openGL buffer.
Definition
VolumeObject.hpp:61
Ra::Engine::Data::VolumeObject::getNumFaces
size_t getNumFaces() const override
6 quad faces of the cube, thus 12 triangles.
Definition
VolumeObject.hpp:76
Ra::Engine::Data::VolumeObject::getNumVertices
size_t getNumVertices() const override
8 vertices of the cube
Definition
VolumeObject.hpp:78
Ra::Engine::Rendering::RenderObjectType::Geometry
@ Geometry
"Geometry" render objects are those loaded using Radium::IO and generated by GeometrySystem
Ra
hepler function to manage enum as underlying types in VariableSet
Definition
Cage.cpp:4
Ra::Core::Geometry::AbstractGeometry
Definition
AbstractGeometry.hpp:17
std::unique_ptr
src
Engine
Data
VolumeObject.hpp
Generated by
1.12.0