| 92 | }; |
| 93 | |
| 94 | class VectorField : public ChartRenderableBase<detail::vector_field_impl> { |
| 95 | public: |
| 96 | VectorField(const unsigned pNumPoints, |
| 97 | const forge::dtype pDataType, |
| 98 | const forge::ChartType pChartType) { |
| 99 | if (pChartType == FG_CHART_2D) { |
| 100 | mShrdPtr = std::make_shared< detail::vector_field2d_impl >(pNumPoints, pDataType); |
| 101 | } else { |
| 102 | mShrdPtr = std::make_shared< detail::vector_field_impl >(pNumPoints, pDataType); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | VectorField(const fg_vector_field pOther) |
| 107 | : ChartRenderableBase<detail::vector_field_impl>( |
| 108 | reinterpret_cast<VectorField*>(pOther)->impl()) { |
| 109 | } |
| 110 | |
| 111 | inline unsigned dbo() const { |
| 112 | return mShrdPtr->directions(); |
| 113 | } |
| 114 | |
| 115 | inline size_t dboSize() const { |
| 116 | return mShrdPtr->directionsSize(); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | } |
| 121 | } |