Radium Engine  1.5.0
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. More...
 
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::string & getName () 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::string & getName () 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.

Member Function Documentation

◆ getAbstractGeometry()

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.

◆ 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 75 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

Definition at line 18 of file VolumeObject.cpp.

+ Here is the call graph for this function:

◆ 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 79 of file VolumeObject.cpp.


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