Beam tracer: draft implementation

This commit is contained in:
Paolo Andreetto
2020-12-26 12:01:36 +01:00
parent 843a2d69cf
commit a2bd38fc2c
2 changed files with 95 additions and 46 deletions

View File

@@ -63,13 +63,8 @@ public:
};
public:
VoxRaytracer(StructuredGrid &image) : m_Image(&image) {
m_scale <<
(m_Image->GetWorldMatrix() * Vector4f(1,0,0,0)).norm(),
(m_Image->GetWorldMatrix() * Vector4f(0,1,0,0)).norm(),
(m_Image->GetWorldMatrix() * Vector4f(0,0,1,0)).norm();
}
public:
VoxRaytracer(StructuredGrid &image);
bool GetEntryPoint(const HLine3f &line, HPoint3f &pt);
@@ -77,6 +72,9 @@ public:
RayData TraceBetweenPoints(const HPoint3f &in, const HPoint3f &out) const;
RayData BeamBetweenPoints(const HPoint3f &in, const HPoint3f &out,
int h_thick = 0, int v_thick = 0) const;
RayData TraceLine(const HLine3f &line) const;
inline StructuredGrid* GetImage() const { return this->m_Image; }