34 lines
684 B
C#
34 lines
684 B
C#
using System.Numerics;
|
|
|
|
namespace ln.ethercat.kinematics
|
|
{
|
|
public class RotationalJoint : Joint
|
|
{
|
|
private Vector3 axis;
|
|
private float angle;
|
|
|
|
public RotationalJoint()
|
|
{
|
|
}
|
|
|
|
public Vector3 Axis
|
|
{
|
|
get => axis;
|
|
set
|
|
{
|
|
ForwardMatrix = Matrix4x4.CreateFromAxisAngle(value, angle);
|
|
axis = value;
|
|
}
|
|
}
|
|
|
|
public float Angle
|
|
{
|
|
get => angle;
|
|
set
|
|
{
|
|
ForwardMatrix = Matrix4x4.CreateFromAxisAngle(axis, value);
|
|
angle = value;
|
|
}
|
|
}
|
|
}
|
|
} |