Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PolygonMesh3DPainter.cs
1using System;
2using System.Numerics;
4
6{
11 {
23 public void DrawGraph(Graphs3D.Canvas3D Canvas, Vector4[,] Points, Vector4[,] Normals,
24 object[] Parameters, Vector4[,] PrevPoints, Vector4[,] PrevNormals,
25 object[] PrevParameters, DrawingVolume DrawingVolume)
26 {
27 int i, c = Points.GetLength(0);
28 int j, d = Points.GetLength(1);
29 I3DShader Shader = Graph3D.ToShader(Parameters[0]);
30 bool TwoSided = Expression.ToDouble(Parameters[1]) != 0;
31 Vector4[] Nodes = new Vector4[4];
32
33 c--;
34 d--;
35
36 for (i = 0; i < c; i++)
37 {
38 for (j = 0; j < d; j++)
39 {
40 Nodes[0] = Points[i, j];
41 Nodes[1] = Points[i + 1, j];
42 Nodes[2] = Points[i + 1, j + 1];
43 Nodes[3] = Points[i, j + 1];
44
45 Canvas.Polygon(Nodes, Shader, TwoSided);
46 }
47 }
48 }
49 }
50}
Class managing a script expression.
Definition: Expression.cs:39
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:4824
Contains information about the current drawing area.
void DrawGraph(Graphs3D.Canvas3D Canvas, Vector4[,] Points, Vector4[,] Normals, object[] Parameters, Vector4[,] PrevPoints, Vector4[,] PrevNormals, object[] PrevParameters, DrawingVolume DrawingVolume)
Draws the graph on a canvas.
Handles three-dimensional graphs.
Definition: Graph3D.cs:28
static I3DShader ToShader(object Argument)
Gets a shader object from an argument.
Definition: Graph3D.cs:1414
Interface for 3D shaders.
Definition: I3DShader.cs:11
Interface for 3D graph drawing functions.
Definition: IPainter3D.cs:11