ChessMod

ChessMod

104k Downloads

Rendering for TileEntities needs better primitive operations

ramou opened this issue ยท 0 comments

commented

The way all this is done is 3D geometric shapes off of 3D geometric shapes. It'd be nice if we had something that represented that. Draw your shape centered around a normal vector with the "down" being tangent to whatever you were drawing off of (or perpenducular to the normal vector at its "down" point). Then just allow for regular polyhedron primitives, with die-based face-labels where appropriate, prisms, pyramids. The also allow for the curved stuff if we get fancy, so spheroids and whatever you call cylinders and cones when the bases can be elipses and not just circles. At that point, thrown in the torus because WTF.

allow the chaining of shape drawing using a builder pattern, e.g.:

Side square = new Square (10);
Side tinySquare = new Square (5);
Vector normalVector = new Vector(0,10,0);
ShapeSpaceNode regularCuboid = shapeSpaceTree.prism(square, normalVectrr);
ShapeSpaceNode smallerIrregularCuboid = cube.face(Cuboid.UP).prism(tinySquare, tinySquare.scale(05), normalVector.scale(0.5));
ShapeSpaceNode sphere = smallerCube.face(Cuboid.EAST).spehere(1);

When we make the regularCuboid we specified one face and the prism just projects the other end along the normal vector. Since it's straight up, we'd get a 10x10 cube whose down face was on (0,0) of the x/z axis ('cause we're in minecraft). the smallerIrregularCuboid would sit on top of the regularCuboid and would be 5x5 at the bottom where it touched and 2.5x2.5 at the top. Lastly, we draw a sphere that touches the center of the east face of the smallerIrregularCuboid and has a radius of 1. Vectors and 2D shapes can scale, the ShapeSpaceNode allows a slide with cartesian reference (0,0) x/z on the reference point with the y axis being along the tangent (or along a passed normal) or radial reference along the similarly specified tangential plane (default or specified normal vector) and we can even pick faces off the sphere with two radial arguments (off of up and north).

Since this builds a Tree, we can also specify names to nodes as we create them, traverse upwards and downwards (namespaces to a parent node) and otherwise have an easy go of making complex figures. We should be able to re-bind textures as needed, and at the end it should allow us to extract all the necessary vectors, grouped by texture so we can get single draws on groups and hopefully cacehable.