open_iA  2019.12
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
iAEngine Class Reference

Class in charge of the raycasting process; it is used to init the render system, start the rendering process and contains all scene data.
More...

#include <iARayTracer.h>

Collaboration diagram for iAEngine:

Public Member Functions

void AllocateOpenCLBuffers ()
 
int DepthRaytrace (iARay &a_Ray, iAVec3f &a_Acc, int a_Depth, float a_RIndex, float &a_Dist, iARayPenetration *ray_p, std::vector< iAIntersection * > &vecIntersections, iATraverseStack *stack, bool dipAsColor=false)
 Raytrace single ray. More...
 
unsigned int * getBuffer ()
 Get ray traced image pixel buffer. More...
 
float getLastAvDipAngle (void)
 Get last rendering's average dip angle. More...
 
float getLastAvPenetrLen (void)
 Get last rendering's average penetration length. More...
 
 iAEngine (iADreamCasterSettings *settings, float *dc_cuda_avpl_buff, float *dc_cuda_dipang_buff)
 
void InitRender (iAVec3f *vp_corners, iAVec3f *vp_delta, iAVec3f *o)
 Initializes the renderer, by resetting line / tile counters´(=render parameters) and precalculating some values. More...
 
bool Render (const iAVec3f *vp_corners, const iAVec3f *vp_delta, const iAVec3f *o, bool rememberData=true, bool dipAsColor=false, bool cuda_enabled=false, bool rasterization=false)
 Render engine's scene. More...
 
bool RenderBatchGPU (unsigned int batchSize, iAVec3f *os, iAVec3f *corns, iAVec3f *deltaxs, iAVec3f *deltays, float *rotsX, float *rotsY, float *rotsZ, bool rememberData=true, bool dipAsColor=false)
 
bool RenderCPU (const iAVec3f *vp_corners, const iAVec3f *vp_delta, const iAVec3f *o, bool rememberData=true, bool dipAsColor=false)
 Render scene on CPU. More...
 
bool RenderGPU (const iAVec3f *vp_corners, const iAVec3f *vp_delta, const iAVec3f *o, bool rememberData=true, bool dipAsColor=false, bool rasterization=false)
 Render scene on GPU. More...
 
iAScenescene ()
 Get engine's scene. More...
 
void SetCutAABBList (std::vector< iAaabb * > *cutAABBList)
 Set pointer on list of cut AABBs. More...
 
void setPositon (float *pos)
 Set object's position. More...
 
void setRotations (float a_X, float a_Y, float a_Z=0)
 Set camera rotations. More...
 
void SetTarget (unsigned int *a_Dest)
 Sets the render target canvas. More...
 
void setup_ids (void *data)
 
void setup_nodes (void *data)
 
void setup_tris (void *data)
 
void Transform (iAVec3f *vec)
 Transforms vector corresponding to rotation and position. More...
 
 ~iAEngine ()
 

Public Attributes

iARenderFromPositioncurBatchRenders
 statistical data about current(last) scene render More...
 
iARenderFromPosition curRender
 statistical data about current(last) scene render More...
 

Protected Attributes

float * cuda_avpl_buff
 float buffer used by cuda to store the results recieved from DreamCaster More...
 
float * cuda_dipang_buff
 float buffer used by cuda to store the results recieved from DreamCaster More...
 
unsigned int m_batchSize
 
iAaabbm_cut_AABBs
 
std::vector< iAaabb * > * m_cutAABBList
 
unsigned int m_cutAABBListSize
 
unsigned int * m_Dest
 ray traced image pixel buffer More...
 
float m_DX
 
float m_DY
 
int m_Height
 
float m_lastAvDipAngle
 last rendering's av. dip angle More...
 
float m_lastAvPenetrLen
 last rendering's av. penetration length More...
 
float m_ORIGIN_Z
 
float m_PLANE_Z
 
iAScenem_Scene
 engine's scene More...
 
int m_Width
 
float m_WX1
 
float m_WX2
 
float m_WY1
 
float m_WY2
 
int msecs
 
iAVec3f position
 object's position More...
 
float rotX
 
float rotY
 
float rotZ
 camera's rotation about x, y and z axis More...
 
iADreamCasterSettingss
 

Friends

class iARaycastingThread
 

Detailed Description

Class in charge of the raycasting process; it is used to init the render system, start the rendering process and contains all scene data.

Constructor & Destructor Documentation

◆ iAEngine()

iAEngine::iAEngine ( iADreamCasterSettings settings,
float *  dc_cuda_avpl_buff,
float *  dc_cuda_dipang_buff 
)

◆ ~iAEngine()

iAEngine::~iAEngine ( )

Member Function Documentation

◆ AllocateOpenCLBuffers()

void iAEngine::AllocateOpenCLBuffers ( )

◆ DepthRaytrace()

int iAEngine::DepthRaytrace ( iARay a_Ray,
iAVec3f a_Acc,
int  a_Depth,
float  a_RIndex,
float &  a_Dist,
iARayPenetration ray_p,
std::vector< iAIntersection * > &  vecIntersections,
iATraverseStack stack,
bool  dipAsColor = false 
)

Raytrace single ray.

Note
not used (using thread->DepthRaytrace(...) instead)

◆ getBuffer()

unsigned int* iAEngine::getBuffer ( )
inline

Get ray traced image pixel buffer.

◆ getLastAvDipAngle()

float iAEngine::getLastAvDipAngle ( void  )
inline

Get last rendering's average dip angle.

◆ getLastAvPenetrLen()

float iAEngine::getLastAvPenetrLen ( void  )
inline

Get last rendering's average penetration length.

◆ InitRender()

void iAEngine::InitRender ( iAVec3f vp_corners,
iAVec3f vp_delta,
iAVec3f o 
)

Initializes the renderer, by resetting line / tile counters´(=render parameters) and precalculating some values.

Prepares transformation matrix which is applied to origin and screen plane.

Parameters
vp_corners[out] plane's corners in 3d
vp_delta[out] plane's x and y axes' directions in 3D
o[out] ray's origin point in world coordinates
Note
rotations and translations are inversed, because we rotating plane and origin instead of object

◆ Render()

bool iAEngine::Render ( const iAVec3f vp_corners,
const iAVec3f vp_delta,
const iAVec3f o,
bool  rememberData = true,
bool  dipAsColor = false,
bool  cuda_enabled = false,
bool  rasterization = false 
)

Render engine's scene.

Parameters
vp_corners
vp_delta
o
rememberDataremember data.
dipAsColordraw image colored corresponding to dip angles.
cuda_enableduse cuda based code for rendering
rasterizationwhether to use rasterization
Returns
true

◆ RenderBatchGPU()

bool iAEngine::RenderBatchGPU ( unsigned int  batchSize,
iAVec3f os,
iAVec3f corns,
iAVec3f deltaxs,
iAVec3f deltays,
float *  rotsX,
float *  rotsY,
float *  rotsZ,
bool  rememberData = true,
bool  dipAsColor = false 
)

◆ RenderCPU()

bool iAEngine::RenderCPU ( const iAVec3f vp_corners,
const iAVec3f vp_delta,
const iAVec3f o,
bool  rememberData = true,
bool  dipAsColor = false 
)

Render scene on CPU.

◆ RenderGPU()

bool iAEngine::RenderGPU ( const iAVec3f vp_corners,
const iAVec3f vp_delta,
const iAVec3f o,
bool  rememberData = true,
bool  dipAsColor = false,
bool  rasterization = false 
)

Render scene on GPU.

◆ scene()

iAScene* iAEngine::scene ( )
inline

Get engine's scene.

Returns
pointer to scene class

◆ SetCutAABBList()

void iAEngine::SetCutAABBList ( std::vector< iAaabb * > *  cutAABBList)
inline

Set pointer on list of cut AABBs.

Parameters
cutAABBListthe list of cut AABB's

◆ setPositon()

void iAEngine::setPositon ( float *  pos)

Set object's position.

◆ setRotations()

void iAEngine::setRotations ( float  a_X,
float  a_Y,
float  a_Z = 0 
)

Set camera rotations.

◆ SetTarget()

void iAEngine::SetTarget ( unsigned int *  a_Dest)

Sets the render target canvas.

Parameters
a_Destimage pixel buffer.

◆ setup_ids()

void iAEngine::setup_ids ( void *  data)

◆ setup_nodes()

void iAEngine::setup_nodes ( void *  data)

◆ setup_tris()

void iAEngine::setup_tris ( void *  data)

◆ Transform()

void iAEngine::Transform ( iAVec3f vec)

Transforms vector corresponding to rotation and position.

Parameters
vecVector to transform
Note
rotations and translations are inversed, because we rotating plane and origin instead of object

Friends And Related Function Documentation

◆ iARaycastingThread

friend class iARaycastingThread
friend

Member Data Documentation

◆ cuda_avpl_buff

float* iAEngine::cuda_avpl_buff
protected

float buffer used by cuda to store the results recieved from DreamCaster

◆ cuda_dipang_buff

float* iAEngine::cuda_dipang_buff
protected

float buffer used by cuda to store the results recieved from DreamCaster

◆ curBatchRenders

iARenderFromPosition* iAEngine::curBatchRenders

statistical data about current(last) scene render

◆ curRender

iARenderFromPosition iAEngine::curRender

statistical data about current(last) scene render

◆ m_batchSize

unsigned int iAEngine::m_batchSize
protected

◆ m_cut_AABBs

iAaabb* iAEngine::m_cut_AABBs
protected

◆ m_cutAABBList

std::vector<iAaabb*>* iAEngine::m_cutAABBList
protected

◆ m_cutAABBListSize

unsigned int iAEngine::m_cutAABBListSize
protected

◆ m_Dest

unsigned int* iAEngine::m_Dest
protected

ray traced image pixel buffer

◆ m_DX

float iAEngine::m_DX
protected

◆ m_DY

float iAEngine::m_DY
protected

◆ m_Height

int iAEngine::m_Height
protected

◆ m_lastAvDipAngle

float iAEngine::m_lastAvDipAngle
protected

last rendering's av. dip angle

◆ m_lastAvPenetrLen

float iAEngine::m_lastAvPenetrLen
protected

last rendering's av. penetration length

◆ m_ORIGIN_Z

float iAEngine::m_ORIGIN_Z
protected

◆ m_PLANE_Z

float iAEngine::m_PLANE_Z
protected

◆ m_Scene

iAScene* iAEngine::m_Scene
protected

engine's scene

◆ m_Width

int iAEngine::m_Width
protected

◆ m_WX1

float iAEngine::m_WX1
protected

◆ m_WX2

float iAEngine::m_WX2
protected

◆ m_WY1

float iAEngine::m_WY1
protected

◆ m_WY2

float iAEngine::m_WY2
protected

◆ msecs

int iAEngine::msecs
protected

◆ position

iAVec3f iAEngine::position
protected

object's position

◆ rotX

float iAEngine::rotX
protected

◆ rotY

float iAEngine::rotY
protected

◆ rotZ

float iAEngine::rotZ
protected

camera's rotation about x, y and z axis

◆ s

iADreamCasterSettings* iAEngine::s
protected

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