-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.text
47 lines (35 loc) · 1.93 KB
/
README.text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
----------------------------------------------------------------------
XS3D: The Extremely Simple 3D Rendering Engine
Copyright (C) 2011,2012 K. Udo Schuermann
Licensed under the GNU General Public License v3 or later
----------------------------------------------------------------------
This engine supports the rendering of points (as tiny spheres), edges
(connecting two points), and faces (formed by three or more edges).
If any part of a compound element (edge or face) falls behind the
viewer, no part of it is rendered because the engine performs z-buffer
sorting at an object, rather than the pixel-level, and cannot clip the
display using a pixel-level z-buffer. Objects are drawn from the back
to the front. There is no hidden surface removal.
Please note that there are plenty of 3D engines out there (Irrlicht
and JMonkeyEngine, for example, or the venerable Java3D) which are to
XS3D what a shining skyscraper is to a moonshiner's rickety shack, but
I've had need for drawing extremely simple shapes in 3D space and did
not want the weight and complexity of a full-blown 3D framework, just
a simple piece of code that did the job, but had no dependencies.
You, too, might like it simply for what it is, an extremely simple 3D
rendering engine!
--Udo Schuermann
(August 2011)
QUICK START
The Mesh class represents a 3D object. It contains the following:
Mesh.Point3d — A single point in 3D space
Mesh.Edge — A line connecting two Point3d; color may be null
Mesh.Face — A colored surface consisting of 3+ Edges
Create Point3d objects, combine pairs of them into Edges, and then
combine three (or more) Edges into Faces (the edges must connect).
Finally, create a Mesh based on Faces. You can also create a Mesh
based only on edges, or a Mesh based only on Point3d objects, with
no faces at all. Experiment!
Hold down (any) mouse button and drag to rotate around the z-axis.
Use the mouse wheel to zoom in/out of the center (0,0,0) position.
#eot