Changeset 78 for java/main/src/main/java/com/framsticks/model/Creature.java
- Timestamp:
- 01/09/13 00:09:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/model/Creature.java
r77 r78 1 1 package com.framsticks.model; 2 2 3 import com.framsticks. model.MechPart;4 import com.framsticks. model.Joint;3 import com.framsticks.params.FramsClass; 4 import com.framsticks.util.Orientation; 5 5 import com.framsticks.util.Point3d; 6 6 … … 8 8 import java.util.List; 9 9 10 public class Creature {10 public class Creature extends F0Model { 11 11 public String name; 12 12 … … 94 94 public void setVertpos(Double c_vertpos) { averageVerticalPosition = c_vertpos; } 95 95 96 public Point3d position = new Point3d(); 96 /** pos_x, pos_y, pos_z*/ 97 public double pos_x, pos_y, pos_z; 97 98 98 public Double getPos_x() { return position.x; }99 public void setPos _x(Double pos_x) { position.x = pos_x; }99 public Point3d getPosition() { return new Point3d(pos_x, pos_y, pos_z) ; } 100 public void setPosition(Point3d pos) { pos_x = pos.x; pos_y = pos.y; pos_z = pos.z; } 100 101 101 public Double getPos_y() { return position.y; } 102 public void setPos_y(Double pos_y) { position.y = pos_y; } 102 public double size_x, size_y, size_z; 103 103 104 public Double getPos_z() { return position.z; }105 public void set Pos_z(Double pos_z) { position.z = pos_z; }104 public Point3d getBoundingBox() { return new Point3d(size_x, size_y, size_z) ; } 105 public void setBoundingBox(Point3d size) { size_x = size.x; size_y = size.y; size_z = size.z; } 106 106 107 public Point3d boundingBox = new Point3d();108 public Double getSize_x() { return boundingBox.x; }109 public void setSize_x(Double size_x) { boundingBox.x = size_x; }110 107 111 public Double getSize_y() { return boundingBox.y; }112 public void setSize_y(Double size_y) { boundingBox.y = size_y; }108 /** center_x, center_y, center_z*/ 109 public double center_x, center_y, center_z; 113 110 114 public Double getSize_z() { return boundingBox.z; } 115 public void setSize_z(Double size_z) { boundingBox.z = size_z; } 116 117 public Point3d center = new Point3d(); 118 119 public Double getCenter_x() { return center.x; } 120 public void setCenter_x(Double center_x) { center.x = center_x; } 121 122 public Double getCenter_y() { return center.y; } 123 public void setCenter_y(Double center_y) { center.y = center_y; } 124 125 public Double getCenter_z() { return center.z; } 126 public void setCenter_z(Double center_z) { center.z = center_z; } 111 public Point3d getCenter() { return new Point3d(center_x, center_y, center_z) ; } 112 public void setCenter(Point3d center) { center_x = center.x; center_y = center.y; center_z = center.z; } 127 113 128 114 public Integer getNumparts() { return parts.size(); } … … 161 147 public final List<NeuroDef> neurodefs = new ArrayList<NeuroDef>(); 162 148 163 public final List<MechPart> mechparts = new ArrayList<MechPart>(); 164 public final List<MechJoint> mechjoints = new ArrayList<MechJoint>(); 165 public final List<Neuro> neurons = new ArrayList<Neuro>(); 149 150 151 public final List<Part> getParts() { return parts; } 152 public final List<Joint> getJoints() { return joints; } 153 public final List<NeuroDef> getNeuroDefs() { return neurodefs; } 166 154 167 155 168 156 157 public static void constructFramsClass(FramsClass.Constructor constructor) { 158 constructor.field("name"); 159 constructor.field("parts"); 160 constructor.field("joints"); 161 constructor.field("neurodefs"); 162 } 163 169 164 }
Note: See TracChangeset
for help on using the changeset viewer.