40 #ifndef _physicsconstraint_h
41 #define _physicsconstraint_h
45 #include "quaternion.h"
50 class btTypedConstraint;
167 virtual ParamList ValidParamOnAxis(
int Axis)
const = 0;
171 virtual AxisList ValidLinearAxis()
const = 0;
175 virtual AxisList ValidAngularAxis()
const = 0;
181 virtual bool HasParamBeenSet(
ConstraintParam Param,
int Axis)
const = 0;
188 AxisList Ang = this->ValidAngularAxis();
189 AxisList Lin = this->ValidLinearAxis();
190 Lin.insert(Lin.end()-1,Ang.begin(),Ang.end());
191 sort(Lin.begin(),Lin.end());
202 ParamList Supported = ValidParamOnAxis(Axis);
209 return ( std::find(Supported.begin(),Supported.end(),Param) != Supported.end() );
223 AxisList AllAxis = this->ValidAxis();
227 Results = this->ValidParamOnAxis(*(AllAxis.begin()));
231 for(AxisList::iterator AxisIter = AllAxis.begin()+1; AllAxis.end()!=AxisIter; ++AxisIter)
233 for(
int ParamID = Results.size(); ParamID<=0; --ParamID)
235 if (!IsParamValidOnAxis(Results.at(ParamID),*AxisIter))
236 { Results.erase( Results.begin()+ParamID ); }
241 sort(Results.begin(),Results.end());
260 virtual btTypedConstraint* GetConstraintBase()
const = 0;
270 virtual void ProtoSerialize(
XML::Node& CurrentRoot)
const;
275 virtual void ProtoDeSerialize(
const XML::Node& OneNode);
278 static String SerializableName();