18#ifndef TRINITYSERVER_SPLINE_H
19#define TRINITYSERVER_SPLINE_H
23#include <G3D/Vector3.h>
133 virtual void clear();
143template<
typename length_type>
184 length_type prev_length = 0, new_length = 0;
187 new_length = cacher(*
this, i);
190 new_length = std::numeric_limits<length_type>::max();
193 ASSERT(prev_length <= new_length);
194 prev_length = new_length;
210 void clear()
override;
SplineBase(SplineBase &&right)=delete
void init_spline_custom(Init &initializer)
std::vector< Vector3 > ControlArray
float SegLengthLinear(index_type) const
ControlArray const & getPoints() const
SplineBase & operator=(SplineBase &&right)=delete
SplineBase & operator=(SplineBase const &right)=delete
static InitMethtod initializers[ModesEnd]
void EvaluateCatmullRom(index_type, float, Vector3 &) const
void EvaluateDerivativeCatmullRom(index_type, float, Vector3 &) const
void evaluate_percent(index_type Idx, float u, Vector3 &c) const
void evaluate_derivative(index_type Idx, float u, Vector3 &hermite) const
void EvaluateBezier3(index_type, float, Vector3 &) const
float SegLengthBezier3(index_type) const
float UninitializedSplineSegLenghtMethod(index_type) const
float SegLengthCatmullRom(index_type) const
void UninitializedSplineInitMethod(Vector3 const *, index_type, index_type)
float SegLength(index_type i) const
void EvaluateDerivativeBezier3(index_type, float, Vector3 &) const
void EvaluateDerivativeLinear(index_type, float, Vector3 &) const
Vector3 const & getPoint(index_type i) const
void init_cyclic_spline(const Vector3 *controls, index_type count, EvaluationMode m, index_type cyclic_point, float orientation=0.0f)
void init_spline(const Vector3 *controls, index_type count, EvaluationMode m, float orientation=0.0f)
void InitBezier3(Vector3 const *, index_type, index_type)
SplineBase(SplineBase const &right)=delete
void(SplineBase::* EvaluationMethtod)(index_type, float, Vector3 &) const
void(SplineBase::* InitMethtod)(Vector3 const *, index_type, index_type)
index_type stepsPerSegment
void EvaluateLinear(index_type, float, Vector3 &) const
void InitLinear(Vector3 const *, index_type, index_type)
std::string ToString() const
float(SplineBase::* SegLenghtMethtod)(index_type) const
static EvaluationMethtod derivative_evaluators[ModesEnd]
static SegLenghtMethtod seglengths[ModesEnd]
void set_steps_per_segment(index_type newStepsPerSegment)
index_type getPointCount() const
void UninitializedSplineEvaluationMethod(index_type, float, Vector3 &) const
static EvaluationMethtod evaluators[ModesEnd]
EvaluationMode mode() const
void InitCatmullRom(Vector3 const *, index_type, index_type)
std::vector< length_type > LengthArray
length_type length(index_type first, index_type last) const
void computeIndex(float t, index_type &out_idx, float &out_u) const
void initLengths(T &cacher)
length_type length(index_type Idx) const
void set_length(index_type i, length_type length)
index_type computeIndexInBounds(length_type length) const
length_type length() const
void evaluate_derivative(float t, Vector3 &hermite) const
void evaluate_percent(float t, Vector3 &c) const
TC_COMMON_API void Init(_TCHAR *serviceLongName, _TCHAR *serviceName, _TCHAR *serviceDescription, int(*entryPoint)(int argc, char **argv), int *status)