source: java/main/src/main/java/com/framsticks/model/BaseJoint.java @ 78

Last change on this file since 78 was 78, checked in by psniegowski, 11 years ago

Add f0 parsing and f0->Model transformation.

File size: 986 bytes
Line 
1package com.framsticks.model;
2
3import com.framsticks.util.Point3d;
4
5/**
6 * Author: Piotr Śniegowski
7 */
8public class BaseJoint {
9
10        /** stif */
11        public Double stiffness;
12        public Double getStif() { return stiffness; }
13        public void setStif(Double stif) { stiffness = stif; }
14
15        /** rotstif */
16        public Double rotationStiffness;
17        public Double getRotstif() { return rotationStiffness; }
18        public void setRotstif(Double rotstif) { rotationStiffness = rotstif; }
19
20        /** rx, ry, rz*/
21        public double rx, ry, rz;
22
23        public Point3d getRotation() { return new Point3d(rx, ry, rz); }
24        public void setRotation(Point3d r) { rx = r.x; ry = r.y; rz = r.z; }
25
26        /** dx, dy, dz*/
27        public double dx, dy, dz;
28
29        public Point3d getDelta() { return new Point3d(dx, dy, dz); }
30        public void setDelta(Point3d d) { dx = d.x; dy = d.y; dz = d.z; }
31
32        public void copyFrom(BaseJoint j) {
33                stiffness = j.stiffness;
34                rotationStiffness = j.rotationStiffness;
35                setRotation(j.getRotation());
36                setDelta(j.getDelta());
37        }
38}
Note: See TracBrowser for help on using the repository browser.