Open PaperOpt
p3d::RndRay Class Reference

#include <RndRay.h>

List of all members.

Public Member Functions

 RndRay (RndVolume *vol, V3< double > pos, V3< double > dir, int threadNo=0)
 RndRay (const RndRay &rRay, V3< double > dir, int *discon)
V3< double > Test (int level=0, int disp=0)
int GetMaterial () const
int GetIntersectType () const
V3< double > GetPosition () const
double GetTraceLen () const
const V3< double > & GetDirection () const
const V3< double > & GetHitNormal () const
const V3< double > & GetHitPlaneNormal () const
int GetLatZ () const
int GetNumAccZ () const
void SetNewDir (V3< double > &rNdir)
void NormalizeDir ()
int TraceToLattice ()
int FindNextLatticeExit ()
int MoveToNextLatticePoint ()
int TestSingleBox (double dispX, double dispY, OrientClipBox *cb, double &rTHit)
int IntersectRayClipboxes ()
int IntersectPolysFromAir (OrientClipBox *box, double dispX, double dispY)
void EstimateFromAirNormal ()
void EnterLumenFromAir ()
int TraceInsideLumen ()
void LeaveLumenToAir ()
void EstimateFromLumenNormal ()
void EnterFiberFrom_x ()
int LeaveFiberTo_x ()
int TraceInsideFiber (double *limit=0)
void EstimateFromFiberNormal ()
void FindLatXYFromOrgin ()

Detailed Description

Position uppdate policy:

mOrgin,mOrginRx,mOrginRy are always uppdated when state is air together with lattice indices

mOrginRx,mOrginRy are not valid if outside lattice

mTrnOrg,mTrnOrgRx,mTrnOrgRy inherits mOrgin when entering fiber/lumen and becomes master. Echoes state to mOrgin on border hit

General trace rules: NOTE: Not yet finnished!!!!

Vars used outside fiber mOrgin, mDir, mTtoHit

Vars used inside fiber

Vars used inside lumen


Constructor & Destructor Documentation

RndRay::RndRay ( RndVolume vol,
V3< double >  pos,
V3< double >  dir,
int  threadNo = 0 
)

Here is the call graph for this function:

RndRay::RndRay ( const RndRay rRay,
V3< double >  dir,
int *  discon 
)

Here is the call graph for this function:


Member Function Documentation

void RndRay::EnterFiberFrom_x ( )

Setup ray from passage ?->fiber through currently detected intersection Moves to hitpoint

Here is the caller graph for this function:

void RndRay::EnterLumenFromAir ( )

Setup ray from passage air->lumen through end caping Call after trace has hit lumen area of end capping Moves to hitpoint

Here is the caller graph for this function:

void RndRay::EstimateFromAirNormal ( )

Can be called when IntersectRayClipboxes()->true. Uses mHit* Stores result in mHitNormal

Here is the call graph for this function:

Here is the caller graph for this function:

void RndRay::EstimateFromFiberNormal ( )

Estimates normal after fiber wall hit Stores result in mHitNormal

Here is the call graph for this function:

Here is the caller graph for this function:

void RndRay::EstimateFromLumenNormal ( )

Estimates normal after lumen hit. Can only be called if fiber wall and not end capping is hit!! Stores result in mHitNormal

Here is the call graph for this function:

Here is the caller graph for this function:

void RndRay::FindLatXYFromOrgin ( )

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::FindNextLatticeExit ( )

Find t of next lattice change and setup change

Note:
May change current lattice point as well if ray "just missed" due to roundoff errors
Returns:
1 if current point is outside lattice

Here is the call graph for this function:

Here is the caller graph for this function:

const V3<double>& p3d::RndRay::GetDirection ( ) const [inline]

Here is the caller graph for this function:

const V3<double>& p3d::RndRay::GetHitNormal ( ) const [inline]

Here is the caller graph for this function:

const V3<double>& p3d::RndRay::GetHitPlaneNormal ( ) const [inline]

Here is the caller graph for this function:

int p3d::RndRay::GetIntersectType ( ) const [inline]

Here is the caller graph for this function:

int p3d::RndRay::GetLatZ ( ) const [inline]

Here is the caller graph for this function:

int p3d::RndRay::GetMaterial ( ) const [inline]

Here is the caller graph for this function:

int p3d::RndRay::GetNumAccZ ( ) const [inline]

Here is the caller graph for this function:

V3<double> p3d::RndRay::GetPosition ( ) const [inline]

Here is the caller graph for this function:

double p3d::RndRay::GetTraceLen ( ) const [inline]

Here is the caller graph for this function:

int RndRay::IntersectPolysFromAir ( OrientClipBox box,
double  dispX,
double  dispY 
)
Returns:
true on hit. Called from IntersectRayClipboxes. Init mPolyIntersectLimit prior to call Uppdates mHit*

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::IntersectRayClipboxes ( )
Returns:
true on hit or falce if no hit in this lattice box note Does _NOT_ check that latice extents are calculated will crash out major if not...

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::LeaveFiberTo_x ( )

Setup ray from passage fiber->? through currently detected intersection Moves to hitpoint

Note:
Allocates new ray-number if passage -> air
Returns:
true on error. May hapen if misses intersection passes out through end caping outside lattice

Here is the call graph for this function:

Here is the caller graph for this function:

void RndRay::LeaveLumenToAir ( )

Setup ray from passage lumen->air through currently detected intersection Moves to hitpoint

Note:
Allocates new ray-number

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::MoveToNextLatticePoint ( )

Forwards ray to next precalculated lattice point note Does _NOT_ check that point is calculated!! This point may lie outside ray, calc next to find out...

Returns:
1 if new point is outside lattice

Here is the caller graph for this function:

void p3d::RndRay::NormalizeDir ( ) [inline]

Here is the call graph for this function:

void RndRay::SetNewDir ( V3< double > &  rNdir)

Sets new direction. Warning, latice boundaries must be recalculated.

Note:
Also resets the accumulated traveled distance to 0 and any eventual nontaken hit

Here is the call graph for this function:

Here is the caller graph for this function:

V3< double > RndRay::Test ( int  level = 0,
int  disp = 0 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::TestSingleBox ( double  dispX,
double  dispY,
OrientClipBox cb,
double &  rTHit 
) [inline]

True on hit, then tHit is set to hit value Uses hit-cache. Called by IntersectRayClipboxes.

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::TraceInsideFiber ( double *  limit = 0)

Trace ray inside fiber for next hit. Returns true on a hit. If false, call again. -1=error, 1=Hit wall, 2=Trace-limit expired Moves to hitpoint

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::TraceInsideLumen ( )

Trace ray inside lumen for next hit. Returns true on a hit. If false, call again. -1=error Moves to hitpoint

Note:
approximation (makes little error) stated in code!

Here is the call graph for this function:

Here is the caller graph for this function:

int RndRay::TraceToLattice ( )

Trace from outside -> first lattice box, by calcing t.

Returns:
0-Ok, 1-Missed. Note: Unsafe...

Here is the call graph for this function:

Here is the caller graph for this function:


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