2#include "TrajectoryComponent.h"
11 const float startDepth,
12 const float stopDepth)
15 ix0 =
static_cast<int>(std::lower_bound(
indexes.begin(),
indexes.end(), startDepth) -
indexes.begin());
16 ix0 =
static_cast<int>(std::min(ix0,
int(
indexes.size()) - 2));
20 if ((0 < ix0) && (startDepth + std::numeric_limits<float>::epsilon() <
indexes[ix0])) {
25 ix1 =
static_cast<int>(std::lower_bound(
indexes.begin() + ix0,
indexes.end(), stopDepth) -
indexes.begin());
26 ix1 =
static_cast<int>(std::min(ix1,
int(
indexes.size()) - 1));
30 if ((0 < ix1) && (stopDepth <
indexes[ix1 - 1] + std::numeric_limits<float>::epsilon())) {
34 ix1 = std::max(ix0, ix1);
36 slices = ix1 - ix0 + 1;
40void Cogs::Core::TrajectoryComponent::registerType()
46 Field(
Name(
"stopRadialAnchor"), &TrajectoryComponent::stopRadialAnchor),
50 TypeDatabase::createType<TrajectoryComponent>().setBase<Component>().setFields(fields);
Field definition describing a single data member of a data structure.
Contains reflection support.
std::vector< float > indexes
Positive distances along trajectory. For wells Measured Depth (MD). Set same length of indexes and po...
COGSCORE_DLL_API void determineindices(int &ix0, int &ix1, int &slices, const float startDepth, const float stopDepth)
std::vector< glm::vec3 > positions
Trajectory positions. For wells the Z component is a measurement of True Vertical Depth (TVD)....
glm::vec3 startRadialAnchor
Represents an unique name.