コード例 #1
0
        public BoundVertex GetQuantizedVertex(Vector3 vertex)
        {
            BoundVertex boundVertex = new BoundVertex();

            boundVertex.X = (short)MathF.Round(vertex.X / Quantum.X);
            boundVertex.Y = (short)MathF.Round(vertex.Y / Quantum.Y);
            boundVertex.Z = (short)MathF.Round(vertex.Z / Quantum.Z);
            return(boundVertex);
        }
コード例 #2
0
 public Vector3 GetVertex(BoundVertex quantizedVertex)
 {
     return(new Vector3(quantizedVertex.X * Quantum.X, quantizedVertex.Y * Quantum.Y, quantizedVertex.Z * Quantum.Z));
 }