Last change
on this file since 193 was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
851 bytes
|
Rev | Line | |
---|
[78] | 1 | package com.framsticks.model; |
---|
| 2 | |
---|
[86] | 3 | import com.framsticks.params.annotations.ParamAnnotation; |
---|
[84] | 4 | import com.framsticks.util.math.Point3d; |
---|
[78] | 5 | |
---|
| 6 | /** |
---|
| 7 | * Author: Piotr Śniegowski |
---|
| 8 | */ |
---|
| 9 | public class BaseJoint { |
---|
| 10 | |
---|
[86] | 11 | @ParamAnnotation(id = "stif") |
---|
| 12 | public double stiffness; |
---|
[78] | 13 | |
---|
[86] | 14 | @ParamAnnotation(id = "rotstif") |
---|
| 15 | public double rotationStiffness; |
---|
[78] | 16 | |
---|
[86] | 17 | @ParamAnnotation |
---|
[78] | 18 | public double rx, ry, rz; |
---|
| 19 | |
---|
| 20 | public Point3d getRotation() { return new Point3d(rx, ry, rz); } |
---|
| 21 | public void setRotation(Point3d r) { rx = r.x; ry = r.y; rz = r.z; } |
---|
| 22 | |
---|
[86] | 23 | @ParamAnnotation |
---|
[78] | 24 | public double dx, dy, dz; |
---|
| 25 | |
---|
| 26 | public Point3d getDelta() { return new Point3d(dx, dy, dz); } |
---|
| 27 | public void setDelta(Point3d d) { dx = d.x; dy = d.y; dz = d.z; } |
---|
| 28 | |
---|
| 29 | public void copyFrom(BaseJoint j) { |
---|
| 30 | stiffness = j.stiffness; |
---|
| 31 | rotationStiffness = j.rotationStiffness; |
---|
| 32 | setRotation(j.getRotation()); |
---|
| 33 | setDelta(j.getDelta()); |
---|
| 34 | } |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.