use of net.runelite.api.model.Vertex in project runelite by runelite.
the class RSPlayerMixin method rotate.
@Inject
private List<Triangle> rotate(List<Triangle> triangles, int orientation) {
List<Triangle> rotatedTriangles = new ArrayList<Triangle>();
for (Triangle triangle : triangles) {
Vertex a = triangle.getA();
Vertex b = triangle.getB();
Vertex c = triangle.getC();
Triangle rotatedTriangle = new Triangle(a.rotate(orientation), b.rotate(orientation), c.rotate(orientation));
rotatedTriangles.add(rotatedTriangle);
}
return rotatedTriangles;
}
use of net.runelite.api.model.Vertex in project runelite by runelite.
the class RSModelMixin method getTriangles.
@Override
@Inject
public List<Triangle> getTriangles() {
int[] trianglesX = getTrianglesX();
int[] trianglesY = getTrianglesY();
int[] trianglesZ = getTrianglesZ();
List<Vertex> vertices = getVertices();
List<Triangle> triangles = new ArrayList<Triangle>(getTrianglesCount());
for (int i = 0; i < getTrianglesCount(); ++i) {
int triangleX = trianglesX[i];
int triangleY = trianglesY[i];
int triangleZ = trianglesZ[i];
Triangle triangle = new Triangle(vertices.get(triangleX), vertices.get(triangleY), vertices.get(triangleZ));
triangles.add(triangle);
}
return triangles;
}
use of net.runelite.api.model.Vertex in project runelite by runelite.
the class RSModelMixin method getVertices.
@Override
@Inject
public List<Vertex> getVertices() {
int[] verticesX = getVerticesX();
int[] verticesY = getVerticesY();
int[] verticesZ = getVerticesZ();
List<Vertex> vertices = new ArrayList<Vertex>();
for (int i = 0; i < getVerticesCount(); ++i) {
Vertex v = new Vertex(verticesX[i], verticesY[i], verticesZ[i]);
vertices.add(v);
}
return vertices;
}
Aggregations