Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Engine::Data::VolumeObject Class Reference

#include <Engine/Data/VolumeObject.hpp>

+ Inheritance diagram for Ra::Engine::Data::VolumeObject:
+ Collaboration diagram for Ra::Engine::Data::VolumeObject:

Public Member Functions

 VolumeObject (const std::string &name)
 
 VolumeObject (const VolumeObject &rhs)=delete
 
void operator= (const VolumeObject &rhs)=delete
 
const Core::Geometry::AbstractGeometrygetAbstractGeometry () const override
 
Core::Geometry::AbstractGeometrygetAbstractGeometry () override
 
const Core::Geometry::AbstractVolumegetVolume () const
 Returns the underlying AbstractVolume.
 
Core::Geometry::AbstractVolumegetVolume ()
 
void loadGeometry (Core::Geometry::AbstractVolume *volume)
 Use the given volume for display.
 
void loadGeometry (Core::Geometry::AbstractVolume *volume, const Core::Aabb &aabb)
 
void setDirty ()
 Mark the data types as dirty, forcing an update of the openGL buffer.
 
const TexturegetDataTexture ()
 get read access to the 3d texture storing the data
 
void updateGL () override
 
void render (const ShaderProgram *prog) override
 Draw the mesh.
 
size_t getNumFaces () const override
 6 quad faces of the cube, thus 12 triangles.
 
size_t getNumVertices () const override
 8 vertices of the cube
 
const std::stringgetName () const
 Returns the name of the mesh.
 
- Public Member Functions inherited from Ra::Engine::Data::Displayable
 Displayable (const std::string &name)
 
 Displayable (const Displayable &rhs)=delete
 
void operator= (const Displayable &rhs)=delete
 
PickingRenderMode pickingRenderMode () const
 Returns the picking rendermode advised by the object (default PickingRenderMode::NO_PICKING)
 
const std::stringgetName () const
 Returns the name of the mesh.
 

Additional Inherited Members

- Public Types inherited from Ra::Engine::Data::Displayable
enum  PickingRenderMode {
  PKM_POINTS = 0 , PKM_LINES = 1 , PKM_LINE_ADJ = 2 , PKM_TRI = 3 ,
  NO_PICKING
}
 
- Protected Attributes inherited from Ra::Engine::Data::Displayable
PickingRenderMode m_pickingRenderMode { NO_PICKING }
 

Detailed Description

A class representing an openGL volume

Todo
Right now, a volumeObject define both the geometry (a parallelepiped) and the material (a density grid) This should be modified to handle density grids deleimited by a general geometry.

Definition at line 22 of file VolumeObject.hpp.

Constructor & Destructor Documentation

◆ VolumeObject()

Ra::Engine::Data::VolumeObject::VolumeObject ( const std::string & name)
explicit

Definition at line 13 of file VolumeObject.cpp.

◆ ~VolumeObject()

Ra::Engine::Data::VolumeObject::~VolumeObject ( )
override

Definition at line 16 of file VolumeObject.cpp.

Member Function Documentation

◆ getAbstractGeometry() [1/2]

const Core::Geometry::AbstractGeometry & Ra::Engine::Data::VolumeObject::getAbstractGeometry ( ) const
inlineoverridevirtual

Returns the underlying AbstractGeometry, which is in fact a AbstractVolume

See also
getTriangleMesh

Implements Ra::Engine::Data::Displayable.

Definition at line 80 of file VolumeObject.hpp.

◆ getAbstractGeometry() [2/2]

Core::Geometry::AbstractGeometry & Ra::Engine::Data::VolumeObject::getAbstractGeometry ( )
inlineoverridevirtual

Implements Ra::Engine::Data::Displayable.

Definition at line 85 of file VolumeObject.hpp.

◆ getDataTexture()

const Texture & Ra::Engine::Data::VolumeObject::getDataTexture ( )
inline

get read access to the 3d texture storing the data

Definition at line 54 of file VolumeObject.hpp.

◆ getName()

const std::string & Ra::Engine::Data::Displayable::getName ( ) const
inline

Returns the name of the mesh.

Definition at line 42 of file DisplayableObject.hpp.

◆ getNumFaces()

size_t Ra::Engine::Data::VolumeObject::getNumFaces ( ) const
inlineoverridevirtual

6 quad faces of the cube, thus 12 triangles.

Reimplemented from Ra::Engine::Data::Displayable.

Definition at line 66 of file VolumeObject.hpp.

◆ getNumVertices()

size_t Ra::Engine::Data::VolumeObject::getNumVertices ( ) const
inlineoverridevirtual

8 vertices of the cube

Reimplemented from Ra::Engine::Data::Displayable.

Definition at line 68 of file VolumeObject.hpp.

◆ getVolume() [1/2]

Core::Geometry::AbstractVolume & Ra::Engine::Data::VolumeObject::getVolume ( )
inline

Definition at line 96 of file VolumeObject.hpp.

◆ getVolume() [2/2]

const Core::Geometry::AbstractVolume & Ra::Engine::Data::VolumeObject::getVolume ( ) const
inline

Returns the underlying AbstractVolume.

Definition at line 91 of file VolumeObject.hpp.

◆ loadGeometry() [1/2]

void Ra::Engine::Data::VolumeObject::loadGeometry ( Core::Geometry::AbstractVolume * volume)

Use the given volume for display.

Warning
Takes the pointer ownership

Definition at line 81 of file VolumeObject.cpp.

+ Here is the call graph for this function:

◆ loadGeometry() [2/2]

void Ra::Engine::Data::VolumeObject::loadGeometry ( Core::Geometry::AbstractVolume * volume,
const Core::Aabb & aabb )

Use the given volume for display and build the proxy from the given aabb.

Warning
Takes the pointer ownership
Todo
clean tmp hack

Definition at line 18 of file VolumeObject.cpp.

+ Here is the call graph for this function:

◆ render()

void Ra::Engine::Data::VolumeObject::render ( const ShaderProgram * prog)
overridevirtual

Draw the mesh.

Implements Ra::Engine::Data::Displayable.

Definition at line 95 of file VolumeObject.cpp.

◆ setDirty()

void Ra::Engine::Data::VolumeObject::setDirty ( )
inline

Mark the data types as dirty, forcing an update of the openGL buffer.

Definition at line 51 of file VolumeObject.hpp.

◆ updateGL()

void Ra::Engine::Data::VolumeObject::updateGL ( )
overridevirtual

This function is called at the start of the rendering. It will update the necessary openGL buffers.

Implements Ra::Engine::Data::Displayable.

Definition at line 85 of file VolumeObject.cpp.


The documentation for this class was generated from the following files: