-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fin tapter angle in 2D * Fix surface mesh printing in hole etching example * Enable primary direction in cell set tracing * Read average filling fraction * csTracign point source * Tapered fin in 3D * Added fin unit test
- Loading branch information
Showing
12 changed files
with
305 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <csUtil.hpp> | ||
#include <raySource.hpp> | ||
|
||
template <typename NumericType, int D> | ||
class csPointSource : public raySource<NumericType, D> { | ||
const unsigned mNumPoints; | ||
const csTriple<NumericType> origin; | ||
const csTriple<NumericType> direction; | ||
|
||
public: | ||
csPointSource(csTriple<NumericType> passedOrigin, | ||
csTriple<NumericType> passedDirection, | ||
std::array<int, 5> &pTraceSettings, const size_t pNumPoints) | ||
: origin(passedOrigin), direction(passedDirection), | ||
mNumPoints(pNumPoints) {} | ||
|
||
void fillRay(RTCRay &ray, const size_t idx, rayRNG &RngState) override final { | ||
#ifdef ARCH_X86 | ||
reinterpret_cast<__m128 &>(ray) = | ||
_mm_set_ps(1e-4f, (float)origin[2], (float)origin[1], (float)origin[0]); | ||
|
||
reinterpret_cast<__m128 &>(ray.dir_x) = _mm_set_ps( | ||
0.0f, (float)direction[2], (float)direction[1], (float)direction[0]); | ||
#else | ||
ray.org_x = (float)origin[0]; | ||
ray.org_y = (float)origin[1]; | ||
ray.org_z = (float)origin[2]; | ||
ray.tnear = 1e-4f; | ||
|
||
ray.dir_x = (float)direction[0]; | ||
ray.dir_y = (float)direction[1]; | ||
ray.dir_z = (float)direction[2]; | ||
ray.time = 0.0f; | ||
#endif | ||
} | ||
|
||
size_t getNumPoints() const override final { return mNumPoints; } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.