adapt the multiRotatingAxisMotion to v-1.0

This commit is contained in:
wanqing0421
2025-03-16 00:36:38 +08:00
parent 5eef26a6ed
commit 797334af87
7 changed files with 138 additions and 393 deletions

View File

@ -82,16 +82,22 @@ protected:
multiRotatingAxis* axisList_;
/// Index of parent axis
int32 parentAxisIndex_ = -1;
uint32 parentAxisIndex_ = static_cast<uint32>(-1);
public:
TypeInfoNV("multiRotatingAxis");
// - Constructors
/// Empty Constructor
INLINE_FUNCTION_HD
multiRotatingAxis(){}
/// Construct from dictionary
FUNCTION_H
explicit multiRotatingAxis(const dictionary& dict);
/// Empty with list of axes
FUNCTION_H
multiRotatingAxis(multiRotatingAxisMotion* axisMotion);
@ -123,11 +129,11 @@ public:
while(parIndex != -1)
{
auto& ax = axisList_[parIndex];
parentVel += ax.linTangentialVelocityPoint(p);
parentVel += ax.linVelocityPoint(p);
parIndex = ax.parentAxisIndex();
}
return parentVel + rotatingAxis::linTangentialVelocityPoint(p);
return parentVel + rotatingAxis::linVelocityPoint(p);
}
/// Translate point p for dt seconds based on the axis information
@ -207,6 +213,10 @@ public:
FUNCTION_H
bool write(const multiRotatingAxisMotion* axisMotion, dictionary& dict) const;
/// Write to dictionary
FUNCTION_H
bool write(dictionary& dict) const;
};