public VMDMotion set(VMDMotion m) { boneIndex = m.boneIndex; frameNo = m.frameNo; location.set(m.location); rotation.set(m.rotation); System.arraycopy(m.interpolation, 0, interpolation, 0, 64); vmdFile = m.vmdFile; return m; }
/** * Forcibly moves a vertex to the (x,y) location by setting its x and y * locations to the inputted location. Does not add the vertex to the * "dontmove" list, and (in the default implementation) does not make any * adjustments to the rest of the graph. */ public void setLocation(V picked, float x, float y, float z) { Point3f coord = getCoordinates(picked); coord.set(x, y, z); }
public void getPoint(int index, Point3f pointToPack) { pointToPack.set(scan.get(index)); }
public void setLocation(V picked, Point3f p) { Point3f coord = getCoordinates(picked); coord.set(p); }
@Override public void set(LidarScanCommand other) { timestamp = other.timestamp; lidarPose.setIncludingFrame(other.lidarPose); scan.clear(); for (int i = 0; i < other.scan.size(); i++) scan.add().set(other.scan.get(i)); }
/** * @param v * @param xOffset * @param yOffset */ protected void offsetVertex(V v, float xOffset, float yOffset, float zOffset) { Point3f c = getCoordinates(v); c.set(c.getX()+xOffset, c.getY()+yOffset, c.getZ()+zOffset); setLocation(v, c); }
xyd.set((float)Math.min(Math.max(xyd.getX(), min_pos[0]), max_pos[0]), (float)Math.min(Math.max(xyd.getY(), min_pos[1]), max_pos[1]), (float)Math.min(Math.max(xyd.getZ(), min_pos[2]), max_pos[2]));
xyd.set( (float)(xyd.getX()+Math.max(-5, Math.min(5, vd.dx))), (float)(xyd.getY()+Math.max(-5, Math.min(5, vd.dy))), xyd.set(-radius, xyd.getY(), xyd.getZ());// setX(0); } else if (xyd.getX() > radius) { xyd.set(radius, xyd.getY(), xyd.getZ()); //setX(width); xyd.set(xyd.getX(),-radius, xyd.getZ());//setY(0); } else if (xyd.getY() > radius) { xyd.set(xyd.getX(), radius, xyd.getZ()); //setY(height); xyd.set(xyd.getX(), xyd.getY(), -radius);//setY(0); } else if (xyd.getZ() > radius) { xyd.set(xyd.getX(), xyd.getY(), radius); //setY(height);
private synchronized void adjust() { //Generate random position in graph space tempISOM = new ISOMVertexData(); tempXYD = new Point3f(); // creates a new XYZ data location tempXYD.set((float)(10 + Math.random() * getSize().getRadius()), (float)(10 + Math.random() * getSize().getRadius()), (float)(10 + Math.random() * getSize().getRadius())); //Get closest vertex to random position V winner = elementAccessor.getVertex(this, tempXYD); while(true) { try { for(V v : getGraph().getVertices()) { ISOMVertexData ivd = getISOMVertexData(v); ivd.distance = 0; ivd.visited = false; } break; } catch(ConcurrentModificationException cme) {} } adjustVertex(winner); }
double factor = adaption / Math.pow(2, currData.distance); currXYData.set((float)(currXYData.getX()+(factor*dx)), (float)(currXYData.getY()+(factor*dy)), (float)(currXYData.getZ()+(factor*dz)));
candidateLidarPoint.set(fullPointCloud[i]); worldToCameraTransform.transform(candidateLidarPoint);
vertices.add().set(vertex); for (TexCoord2f texturePoint : meshDataHolder.getTexturePoints()) texturePoints.add().set(texturePoint);
/** * Append a mesh to this. * @param other the mesh to append. Not modified. * @param updateTriangleIndices whether the indices of the given mesh should be updated when appended. Highly recommended, set it to false only if you what you are doing. */ public void add(ModifiableMeshDataHolder other, boolean updateTriangleIndices) { if (updateTriangleIndices) { int shift = vertices.size(); for (int i = 0; i < other.triangleIndices.size(); i++) triangleIndices.add(other.triangleIndices.get(i) + shift); } else { triangleIndices.addAll(other.triangleIndices); } for (int i = 0; i < other.vertices.size(); i++) vertices.add().set(other.vertices.get(i)); for (int i = 0; i < other.texturePoints.size(); i++) texturePoints.add().set(other.texturePoints.get(i)); for (int i = 0; i < other.vertexNormals.size(); i++) vertexNormals.add().set(other.vertexNormals.get(i)); } }