Cogs.Core
TrajectoryCrossSectionsComponent.cpp
1#include "Types.h"
2#include "TrajectoryCrossSectionsComponent.h"
3
4using namespace Cogs::Reflection;
5
6void Cogs::Core::TrajectoryCrossSectionsComponent::registerType()
7{
8 static constexpr EnumeratorDef enumerators [] = {
9 { "None", Parameterization::None },
10 { "UnitSquare", Parameterization::UnitSquare },
11 { "CoordLengthOverCircumference", Parameterization::CoordLengthOverCircumference },
12 };
13
14 TypeDatabase::createType<TrajectoryCrossSectionsComponent::Parameterization>()
15 .setEnumerators(enumerators);
16
17 Field fields[] = {
18 Field(Name("trajectory"), &TrajectoryCrossSectionsComponent::trajectory),
25 Field(Name("parameterization"), &TrajectoryCrossSectionsComponent::parameterization),
26 Field(Name("shape"), &TrajectoryCrossSectionsComponent::shape),
27 };
28
29 TypeDatabase::createType<TrajectoryCrossSectionsComponent>()
30 .setBase<Component>()
31 .setFields(fields);
32}
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
int samples
Number of samples around the circumference.
@ CoordLengthOverCircumference
U maps to [0,1) around circumference, V is coordlength divided by circumference.
float outerRadius
The outer radius of the tubular shape, used for all shapes.
float stopMeasuredDepth
Measured depth along trajectory where casing stops.
float innerRadius
The inner radius of the tubular shape, only used for Hollow shape.
float radiusScale
Factor by which to scale the inner and outer radius.
Represents an unique name.
Definition: Name.h:70