joonsrenderer 1.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +53 -0
- data/.mvn/extensions.xml +8 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +6 -0
- data/LICENSE +674 -0
- data/README.md +2 -0
- data/Rakefile +43 -0
- data/docs/.gitignore +6 -0
- data/docs/_config.yml +20 -0
- data/docs/_includes/footer.html +38 -0
- data/docs/_includes/head.html +15 -0
- data/docs/_includes/header.html +27 -0
- data/docs/_includes/icon-github.html +1 -0
- data/docs/_includes/icon-github.svg +1 -0
- data/docs/_includes/icon-twitter.html +1 -0
- data/docs/_includes/icon-twitter.svg +1 -0
- data/docs/_layouts/default.html +20 -0
- data/docs/_layouts/page.html +14 -0
- data/docs/_layouts/post.html +15 -0
- data/docs/_posts/2017-01-08-animated_ray_tracing.md +72 -0
- data/docs/_posts/2017-01-08-welcome.md +78 -0
- data/docs/_sass/_base.scss +206 -0
- data/docs/_sass/_layout.scss +242 -0
- data/docs/_sass/_syntax-highlighting.scss +71 -0
- data/docs/about.md +12 -0
- data/docs/assets/Animation.ogv +0 -0
- data/docs/assets/Animation.png +0 -0
- data/docs/assets/basic.png +0 -0
- data/docs/assets/basic_traced.png +0 -0
- data/docs/css/main.scss +38 -0
- data/docs/favicon.ico +0 -0
- data/docs/feed.xml +30 -0
- data/docs/index.html +38 -0
- data/joonsrenderer.gemspec +23 -0
- data/lib/joonsrenderer.rb +12 -0
- data/lib/joonsrenderer/version.rb +3 -0
- data/pom.rb +75 -0
- data/pom.xml +163 -0
- data/src/main/java/SunflowGUI.java +1354 -0
- data/src/main/java/joons/JRFiller.java +79 -0
- data/src/main/java/joons/JRImagePanel.java +141 -0
- data/src/main/java/joons/JRRecorder.java +183 -0
- data/src/main/java/joons/JRStatics.java +199 -0
- data/src/main/java/joons/JoonsRenderer.java +837 -0
- data/src/main/java/org/sunflow/AsciiFileSunflowAPI.java +98 -0
- data/src/main/java/org/sunflow/Benchmark.java +313 -0
- data/src/main/java/org/sunflow/BinaryFileSunflowAPI.java +228 -0
- data/src/main/java/org/sunflow/FileSunflowAPI.java +354 -0
- data/src/main/java/org/sunflow/PluginRegistry.java +322 -0
- data/src/main/java/org/sunflow/RealtimeBenchmark.java +125 -0
- data/src/main/java/org/sunflow/RenderObjectMap.java +344 -0
- data/src/main/java/org/sunflow/SunflowAPI.java +762 -0
- data/src/main/java/org/sunflow/SunflowAPIInterface.java +277 -0
- data/src/main/java/org/sunflow/core/AccelerationStructure.java +20 -0
- data/src/main/java/org/sunflow/core/AccelerationStructureFactory.java +36 -0
- data/src/main/java/org/sunflow/core/BucketOrder.java +21 -0
- data/src/main/java/org/sunflow/core/Camera.java +125 -0
- data/src/main/java/org/sunflow/core/CameraLens.java +29 -0
- data/src/main/java/org/sunflow/core/CausticPhotonMapInterface.java +15 -0
- data/src/main/java/org/sunflow/core/Display.java +78 -0
- data/src/main/java/org/sunflow/core/Filter.java +27 -0
- data/src/main/java/org/sunflow/core/GIEngine.java +42 -0
- data/src/main/java/org/sunflow/core/Geometry.java +157 -0
- data/src/main/java/org/sunflow/core/GlobalPhotonMapInterface.java +21 -0
- data/src/main/java/org/sunflow/core/ImageSampler.java +26 -0
- data/src/main/java/org/sunflow/core/Instance.java +224 -0
- data/src/main/java/org/sunflow/core/InstanceList.java +83 -0
- data/src/main/java/org/sunflow/core/IntersectionState.java +120 -0
- data/src/main/java/org/sunflow/core/LightSample.java +104 -0
- data/src/main/java/org/sunflow/core/LightServer.java +382 -0
- data/src/main/java/org/sunflow/core/LightSource.java +67 -0
- data/src/main/java/org/sunflow/core/Modifier.java +16 -0
- data/src/main/java/org/sunflow/core/Options.java +20 -0
- data/src/main/java/org/sunflow/core/ParameterList.java +758 -0
- data/src/main/java/org/sunflow/core/PhotonStore.java +62 -0
- data/src/main/java/org/sunflow/core/PrimitiveList.java +70 -0
- data/src/main/java/org/sunflow/core/Ray.java +219 -0
- data/src/main/java/org/sunflow/core/RenderObject.java +25 -0
- data/src/main/java/org/sunflow/core/Scene.java +377 -0
- data/src/main/java/org/sunflow/core/SceneParser.java +58 -0
- data/src/main/java/org/sunflow/core/Shader.java +30 -0
- data/src/main/java/org/sunflow/core/ShadingCache.java +84 -0
- data/src/main/java/org/sunflow/core/ShadingState.java +939 -0
- data/src/main/java/org/sunflow/core/Statistics.java +85 -0
- data/src/main/java/org/sunflow/core/Tesselatable.java +36 -0
- data/src/main/java/org/sunflow/core/Texture.java +128 -0
- data/src/main/java/org/sunflow/core/TextureCache.java +48 -0
- data/src/main/java/org/sunflow/core/accel/BoundingIntervalHierarchy.java +652 -0
- data/src/main/java/org/sunflow/core/accel/KDTree.java +833 -0
- data/src/main/java/org/sunflow/core/accel/NullAccelerator.java +30 -0
- data/src/main/java/org/sunflow/core/accel/UniformGrid.java +329 -0
- data/src/main/java/org/sunflow/core/bucket/BucketOrderFactory.java +26 -0
- data/src/main/java/org/sunflow/core/bucket/ColumnBucketOrder.java +21 -0
- data/src/main/java/org/sunflow/core/bucket/DiagonalBucketOrder.java +28 -0
- data/src/main/java/org/sunflow/core/bucket/HilbertBucketOrder.java +65 -0
- data/src/main/java/org/sunflow/core/bucket/InvertedBucketOrder.java +28 -0
- data/src/main/java/org/sunflow/core/bucket/RandomBucketOrder.java +49 -0
- data/src/main/java/org/sunflow/core/bucket/RowBucketOrder.java +21 -0
- data/src/main/java/org/sunflow/core/bucket/SpiralBucketOrder.java +43 -0
- data/src/main/java/org/sunflow/core/camera/FisheyeLens.java +25 -0
- data/src/main/java/org/sunflow/core/camera/PinholeLens.java +43 -0
- data/src/main/java/org/sunflow/core/camera/SphericalLens.java +22 -0
- data/src/main/java/org/sunflow/core/camera/ThinLens.java +107 -0
- data/src/main/java/org/sunflow/core/display/FastDisplay.java +119 -0
- data/src/main/java/org/sunflow/core/display/FileDisplay.java +83 -0
- data/src/main/java/org/sunflow/core/display/FrameDisplay.java +97 -0
- data/src/main/java/org/sunflow/core/display/ImgPipeDisplay.java +109 -0
- data/src/main/java/org/sunflow/core/filter/BlackmanHarrisFilter.java +28 -0
- data/src/main/java/org/sunflow/core/filter/BoxFilter.java +16 -0
- data/src/main/java/org/sunflow/core/filter/CatmullRomFilter.java +29 -0
- data/src/main/java/org/sunflow/core/filter/CubicBSpline.java +32 -0
- data/src/main/java/org/sunflow/core/filter/GaussianFilter.java +24 -0
- data/src/main/java/org/sunflow/core/filter/LanczosFilter.java +30 -0
- data/src/main/java/org/sunflow/core/filter/MitchellFilter.java +28 -0
- data/src/main/java/org/sunflow/core/filter/SincFilter.java +25 -0
- data/src/main/java/org/sunflow/core/filter/TriangleFilter.java +16 -0
- data/src/main/java/org/sunflow/core/gi/AmbientOcclusionGIEngine.java +57 -0
- data/src/main/java/org/sunflow/core/gi/FakeGIEngine.java +48 -0
- data/src/main/java/org/sunflow/core/gi/InstantGI.java +194 -0
- data/src/main/java/org/sunflow/core/gi/IrradianceCacheGIEngine.java +268 -0
- data/src/main/java/org/sunflow/core/gi/PathTracingGIEngine.java +65 -0
- data/src/main/java/org/sunflow/core/light/DirectionalSpotlight.java +103 -0
- data/src/main/java/org/sunflow/core/light/ImageBasedLight.java +303 -0
- data/src/main/java/org/sunflow/core/light/PointLight.java +72 -0
- data/src/main/java/org/sunflow/core/light/SphereLight.java +166 -0
- data/src/main/java/org/sunflow/core/light/SunSkyLight.java +362 -0
- data/src/main/java/org/sunflow/core/light/TriangleMeshLight.java +296 -0
- data/src/main/java/org/sunflow/core/modifiers/BumpMappingModifier.java +37 -0
- data/src/main/java/org/sunflow/core/modifiers/NormalMapModifier.java +34 -0
- data/src/main/java/org/sunflow/core/modifiers/PerlinModifier.java +80 -0
- data/src/main/java/org/sunflow/core/parser/Keyword.java +39 -0
- data/src/main/java/org/sunflow/core/parser/RA2Parser.java +107 -0
- data/src/main/java/org/sunflow/core/parser/RA3Parser.java +68 -0
- data/src/main/java/org/sunflow/core/parser/SCAbstractParser.java +299 -0
- data/src/main/java/org/sunflow/core/parser/SCAsciiParser.java +251 -0
- data/src/main/java/org/sunflow/core/parser/SCBinaryParser.java +156 -0
- data/src/main/java/org/sunflow/core/parser/SCParser.java +1403 -0
- data/src/main/java/org/sunflow/core/parser/ShaveRibParser.java +174 -0
- data/src/main/java/org/sunflow/core/parser/TriParser.java +79 -0
- data/src/main/java/org/sunflow/core/photonmap/CausticPhotonMap.java +429 -0
- data/src/main/java/org/sunflow/core/photonmap/GlobalPhotonMap.java +530 -0
- data/src/main/java/org/sunflow/core/photonmap/GridPhotonMap.java +308 -0
- data/src/main/java/org/sunflow/core/primitive/Background.java +55 -0
- data/src/main/java/org/sunflow/core/primitive/BanchoffSurface.java +100 -0
- data/src/main/java/org/sunflow/core/primitive/Box.java +210 -0
- data/src/main/java/org/sunflow/core/primitive/CornellBox.java +476 -0
- data/src/main/java/org/sunflow/core/primitive/CubeGrid.java +318 -0
- data/src/main/java/org/sunflow/core/primitive/Cylinder.java +104 -0
- data/src/main/java/org/sunflow/core/primitive/Hair.java +275 -0
- data/src/main/java/org/sunflow/core/primitive/JuliaFractal.java +266 -0
- data/src/main/java/org/sunflow/core/primitive/ParticleSurface.java +114 -0
- data/src/main/java/org/sunflow/core/primitive/Plane.java +163 -0
- data/src/main/java/org/sunflow/core/primitive/QuadMesh.java +413 -0
- data/src/main/java/org/sunflow/core/primitive/Sphere.java +101 -0
- data/src/main/java/org/sunflow/core/primitive/SphereFlake.java +234 -0
- data/src/main/java/org/sunflow/core/primitive/Torus.java +145 -0
- data/src/main/java/org/sunflow/core/primitive/TriangleMesh.java +849 -0
- data/src/main/java/org/sunflow/core/renderer/BucketRenderer.java +491 -0
- data/src/main/java/org/sunflow/core/renderer/MultipassRenderer.java +237 -0
- data/src/main/java/org/sunflow/core/renderer/ProgressiveRenderer.java +171 -0
- data/src/main/java/org/sunflow/core/renderer/SimpleRenderer.java +106 -0
- data/src/main/java/org/sunflow/core/shader/AmbientOcclusionShader.java +53 -0
- data/src/main/java/org/sunflow/core/shader/AnisotropicWardShader.java +216 -0
- data/src/main/java/org/sunflow/core/shader/ConstantShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/DiffuseShader.java +65 -0
- data/src/main/java/org/sunflow/core/shader/GlassShader.java +147 -0
- data/src/main/java/org/sunflow/core/shader/IDShader.java +27 -0
- data/src/main/java/org/sunflow/core/shader/MirrorShader.java +68 -0
- data/src/main/java/org/sunflow/core/shader/NormalShader.java +32 -0
- data/src/main/java/org/sunflow/core/shader/PhongShader.java +89 -0
- data/src/main/java/org/sunflow/core/shader/PrimIDShader.java +30 -0
- data/src/main/java/org/sunflow/core/shader/QuickGrayShader.java +63 -0
- data/src/main/java/org/sunflow/core/shader/ShinyDiffuseShader.java +98 -0
- data/src/main/java/org/sunflow/core/shader/SimpleShader.java +24 -0
- data/src/main/java/org/sunflow/core/shader/TexturedAmbientOcclusionShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/TexturedDiffuseShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/TexturedPhongShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/TexturedShinyDiffuseShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/TexturedWardShader.java +31 -0
- data/src/main/java/org/sunflow/core/shader/UVShader.java +27 -0
- data/src/main/java/org/sunflow/core/shader/UberShader.java +149 -0
- data/src/main/java/org/sunflow/core/shader/ViewCausticsShader.java +33 -0
- data/src/main/java/org/sunflow/core/shader/ViewGlobalPhotonsShader.java +25 -0
- data/src/main/java/org/sunflow/core/shader/ViewIrradianceShader.java +25 -0
- data/src/main/java/org/sunflow/core/shader/WireframeShader.java +83 -0
- data/src/main/java/org/sunflow/core/tesselatable/BezierMesh.java +254 -0
- data/src/main/java/org/sunflow/core/tesselatable/FileMesh.java +251 -0
- data/src/main/java/org/sunflow/core/tesselatable/Gumbo.java +1147 -0
- data/src/main/java/org/sunflow/core/tesselatable/Teapot.java +237 -0
- data/src/main/java/org/sunflow/image/Bitmap.java +15 -0
- data/src/main/java/org/sunflow/image/BitmapReader.java +39 -0
- data/src/main/java/org/sunflow/image/BitmapWriter.java +79 -0
- data/src/main/java/org/sunflow/image/BlackbodySpectrum.java +16 -0
- data/src/main/java/org/sunflow/image/ChromaticitySpectrum.java +55 -0
- data/src/main/java/org/sunflow/image/Color.java +374 -0
- data/src/main/java/org/sunflow/image/ColorEncoder.java +94 -0
- data/src/main/java/org/sunflow/image/ColorFactory.java +122 -0
- data/src/main/java/org/sunflow/image/ConstantSpectralCurve.java +21 -0
- data/src/main/java/org/sunflow/image/IrregularSpectralCurve.java +57 -0
- data/src/main/java/org/sunflow/image/RGBSpace.java +207 -0
- data/src/main/java/org/sunflow/image/RegularSpectralCurve.java +30 -0
- data/src/main/java/org/sunflow/image/SpectralCurve.java +118 -0
- data/src/main/java/org/sunflow/image/XYZColor.java +50 -0
- data/src/main/java/org/sunflow/image/formats/BitmapBlack.java +27 -0
- data/src/main/java/org/sunflow/image/formats/BitmapG8.java +36 -0
- data/src/main/java/org/sunflow/image/formats/BitmapGA8.java +30 -0
- data/src/main/java/org/sunflow/image/formats/BitmapRGB8.java +40 -0
- data/src/main/java/org/sunflow/image/formats/BitmapRGBA8.java +40 -0
- data/src/main/java/org/sunflow/image/formats/BitmapRGBE.java +60 -0
- data/src/main/java/org/sunflow/image/formats/BitmapXYZ.java +38 -0
- data/src/main/java/org/sunflow/image/formats/GenericBitmap.java +73 -0
- data/src/main/java/org/sunflow/image/readers/BMPBitmapReader.java +39 -0
- data/src/main/java/org/sunflow/image/readers/HDRBitmapReader.java +155 -0
- data/src/main/java/org/sunflow/image/readers/IGIBitmapReader.java +104 -0
- data/src/main/java/org/sunflow/image/readers/JPGBitmapReader.java +39 -0
- data/src/main/java/org/sunflow/image/readers/PNGBitmapReader.java +40 -0
- data/src/main/java/org/sunflow/image/readers/TGABitmapReader.java +141 -0
- data/src/main/java/org/sunflow/image/writers/EXRBitmapWriter.java +395 -0
- data/src/main/java/org/sunflow/image/writers/HDRBitmapWriter.java +54 -0
- data/src/main/java/org/sunflow/image/writers/IGIBitmapWriter.java +75 -0
- data/src/main/java/org/sunflow/image/writers/PNGBitmapWriter.java +39 -0
- data/src/main/java/org/sunflow/image/writers/TGABitmapWriter.java +63 -0
- data/src/main/java/org/sunflow/math/BoundingBox.java +340 -0
- data/src/main/java/org/sunflow/math/MathUtils.java +159 -0
- data/src/main/java/org/sunflow/math/Matrix4.java +573 -0
- data/src/main/java/org/sunflow/math/MovingMatrix4.java +119 -0
- data/src/main/java/org/sunflow/math/OrthoNormalBasis.java +110 -0
- data/src/main/java/org/sunflow/math/PerlinScalar.java +331 -0
- data/src/main/java/org/sunflow/math/PerlinVector.java +132 -0
- data/src/main/java/org/sunflow/math/Point2.java +36 -0
- data/src/main/java/org/sunflow/math/Point3.java +133 -0
- data/src/main/java/org/sunflow/math/QMC.java +209 -0
- data/src/main/java/org/sunflow/math/Solvers.java +142 -0
- data/src/main/java/org/sunflow/math/Vector3.java +197 -0
- data/src/main/java/org/sunflow/system/BenchmarkFramework.java +73 -0
- data/src/main/java/org/sunflow/system/BenchmarkTest.java +17 -0
- data/src/main/java/org/sunflow/system/ByteUtil.java +119 -0
- data/src/main/java/org/sunflow/system/FileUtils.java +27 -0
- data/src/main/java/org/sunflow/system/ImagePanel.java +282 -0
- data/src/main/java/org/sunflow/system/Memory.java +18 -0
- data/src/main/java/org/sunflow/system/Parser.java +162 -0
- data/src/main/java/org/sunflow/system/Plugins.java +142 -0
- data/src/main/java/org/sunflow/system/RenderGlobalsPanel.java +209 -0
- data/src/main/java/org/sunflow/system/SearchPath.java +67 -0
- data/src/main/java/org/sunflow/system/Timer.java +53 -0
- data/src/main/java/org/sunflow/system/UI.java +112 -0
- data/src/main/java/org/sunflow/system/UserInterface.java +46 -0
- data/src/main/java/org/sunflow/system/ui/ConsoleInterface.java +48 -0
- data/src/main/java/org/sunflow/system/ui/SilentInterface.java +28 -0
- data/src/main/java/org/sunflow/util/FastHashMap.java +220 -0
- data/src/main/java/org/sunflow/util/FloatArray.java +77 -0
- data/src/main/java/org/sunflow/util/IntArray.java +77 -0
- data/src/test/java/a_maintest.java +129 -0
- metadata +300 -0
@@ -0,0 +1,354 @@
|
|
1
|
+
package org.sunflow;
|
2
|
+
|
3
|
+
import java.util.Locale;
|
4
|
+
|
5
|
+
import org.sunflow.core.Display;
|
6
|
+
import org.sunflow.core.ParameterList.InterpolationType;
|
7
|
+
import org.sunflow.core.parser.*;
|
8
|
+
import org.sunflow.image.ColorFactory;
|
9
|
+
import org.sunflow.math.Matrix4;
|
10
|
+
import org.sunflow.math.Point2;
|
11
|
+
import org.sunflow.math.Point3;
|
12
|
+
import org.sunflow.math.Vector3;
|
13
|
+
import org.sunflow.system.UI;
|
14
|
+
import org.sunflow.system.UI.Module;
|
15
|
+
|
16
|
+
abstract class FileSunflowAPI implements SunflowAPIInterface {
|
17
|
+
|
18
|
+
private int frame;
|
19
|
+
|
20
|
+
protected FileSunflowAPI() {
|
21
|
+
frame = 1;
|
22
|
+
reset();
|
23
|
+
}
|
24
|
+
|
25
|
+
@Override
|
26
|
+
public void camera(String name, String lensType) {
|
27
|
+
writeKeyword(Keyword.CAMERA);
|
28
|
+
writeString(name);
|
29
|
+
writeString(lensType);
|
30
|
+
writeNewline(0);
|
31
|
+
writeNewline(0);
|
32
|
+
}
|
33
|
+
|
34
|
+
@Override
|
35
|
+
public void geometry(String name, String typeName) {
|
36
|
+
writeKeyword(Keyword.GEOMETRY);
|
37
|
+
writeString(name);
|
38
|
+
writeString(typeName);
|
39
|
+
writeNewline(0);
|
40
|
+
writeNewline(0);
|
41
|
+
}
|
42
|
+
|
43
|
+
public int getCurrentFrame() {
|
44
|
+
return frame;
|
45
|
+
}
|
46
|
+
|
47
|
+
@Override
|
48
|
+
public void instance(String name, String geoname) {
|
49
|
+
writeKeyword(Keyword.INSTANCE);
|
50
|
+
writeString(name);
|
51
|
+
writeString(geoname);
|
52
|
+
writeNewline(0);
|
53
|
+
writeNewline(0);
|
54
|
+
}
|
55
|
+
|
56
|
+
@Override
|
57
|
+
public void light(String name, String lightType) {
|
58
|
+
writeKeyword(Keyword.LIGHT);
|
59
|
+
writeString(name);
|
60
|
+
writeString(lightType);
|
61
|
+
writeNewline(0);
|
62
|
+
writeNewline(0);
|
63
|
+
}
|
64
|
+
|
65
|
+
@Override
|
66
|
+
public void modifier(String name, String modifierType) {
|
67
|
+
writeKeyword(Keyword.MODIFIER);
|
68
|
+
writeString(name);
|
69
|
+
writeString(modifierType);
|
70
|
+
writeNewline(0);
|
71
|
+
writeNewline(0);
|
72
|
+
}
|
73
|
+
|
74
|
+
@Override
|
75
|
+
public void options(String name) {
|
76
|
+
writeKeyword(Keyword.OPTIONS);
|
77
|
+
writeString(name);
|
78
|
+
writeNewline(0);
|
79
|
+
writeNewline(0);
|
80
|
+
}
|
81
|
+
|
82
|
+
@Override
|
83
|
+
public void parameter(String name, String value) {
|
84
|
+
writeKeyword(Keyword.PARAMETER);
|
85
|
+
writeString(name);
|
86
|
+
writeKeyword(Keyword.STRING);
|
87
|
+
writeString(value);
|
88
|
+
writeNewline(0);
|
89
|
+
}
|
90
|
+
|
91
|
+
@Override
|
92
|
+
public void parameter(String name, boolean value) {
|
93
|
+
writeKeyword(Keyword.PARAMETER);
|
94
|
+
writeString(name);
|
95
|
+
writeKeyword(Keyword.BOOL);
|
96
|
+
writeBoolean(value);
|
97
|
+
writeNewline(0);
|
98
|
+
}
|
99
|
+
|
100
|
+
@Override
|
101
|
+
public void parameter(String name, int value) {
|
102
|
+
writeKeyword(Keyword.PARAMETER);
|
103
|
+
writeString(name);
|
104
|
+
writeKeyword(Keyword.INT);
|
105
|
+
writeInt(value);
|
106
|
+
writeNewline(0);
|
107
|
+
}
|
108
|
+
|
109
|
+
@Override
|
110
|
+
public void parameter(String name, float value) {
|
111
|
+
writeKeyword(Keyword.PARAMETER);
|
112
|
+
writeString(name);
|
113
|
+
writeKeyword(Keyword.FLOAT);
|
114
|
+
writeFloat(value);
|
115
|
+
writeNewline(0);
|
116
|
+
}
|
117
|
+
|
118
|
+
@Override
|
119
|
+
public void parameter(String name, String colorspace, float... data) {
|
120
|
+
writeKeyword(Keyword.PARAMETER);
|
121
|
+
writeString(name);
|
122
|
+
writeKeyword(Keyword.COLOR);
|
123
|
+
if (colorspace == null) {
|
124
|
+
writeString(colorspace = ColorFactory.getInternalColorspace());
|
125
|
+
} else {
|
126
|
+
writeString(colorspace);
|
127
|
+
}
|
128
|
+
if (ColorFactory.getRequiredDataValues(colorspace) == -1) {
|
129
|
+
writeInt(data.length);
|
130
|
+
}
|
131
|
+
int idx = 0;
|
132
|
+
int step = 9;
|
133
|
+
for (float f : data) {
|
134
|
+
if (data.length > step && idx % step == 0) {
|
135
|
+
writeNewline(1);
|
136
|
+
}
|
137
|
+
writeFloat(f);
|
138
|
+
idx++;
|
139
|
+
}
|
140
|
+
writeNewline(0);
|
141
|
+
}
|
142
|
+
|
143
|
+
@Override
|
144
|
+
public void parameter(String name, Point3 value) {
|
145
|
+
writeKeyword(Keyword.PARAMETER);
|
146
|
+
writeString(name);
|
147
|
+
writeKeyword(Keyword.POINT);
|
148
|
+
writeFloat(value.x);
|
149
|
+
writeFloat(value.y);
|
150
|
+
writeFloat(value.z);
|
151
|
+
writeNewline(0);
|
152
|
+
}
|
153
|
+
|
154
|
+
@Override
|
155
|
+
public void parameter(String name, Vector3 value) {
|
156
|
+
writeKeyword(Keyword.PARAMETER);
|
157
|
+
writeString(name);
|
158
|
+
writeKeyword(Keyword.VECTOR);
|
159
|
+
writeFloat(value.x);
|
160
|
+
writeFloat(value.y);
|
161
|
+
writeFloat(value.z);
|
162
|
+
writeNewline(0);
|
163
|
+
}
|
164
|
+
|
165
|
+
@Override
|
166
|
+
public void parameter(String name, Point2 value) {
|
167
|
+
writeKeyword(Keyword.PARAMETER);
|
168
|
+
writeString(name);
|
169
|
+
writeKeyword(Keyword.TEXCOORD);
|
170
|
+
writeFloat(value.x);
|
171
|
+
writeFloat(value.y);
|
172
|
+
writeNewline(0);
|
173
|
+
}
|
174
|
+
|
175
|
+
@Override
|
176
|
+
public void parameter(String name, Matrix4 value) {
|
177
|
+
writeKeyword(Keyword.PARAMETER);
|
178
|
+
writeString(name);
|
179
|
+
writeKeyword(Keyword.MATRIX);
|
180
|
+
writeMatrix(value);
|
181
|
+
writeNewline(0);
|
182
|
+
}
|
183
|
+
|
184
|
+
@Override
|
185
|
+
public void parameter(String name, int[] value) {
|
186
|
+
writeKeyword(Keyword.PARAMETER);
|
187
|
+
writeString(name);
|
188
|
+
writeKeyword(Keyword.INT_ARRAY);
|
189
|
+
writeInt(value.length);
|
190
|
+
int idx = 0;
|
191
|
+
int step = 9;
|
192
|
+
for (int v : value) {
|
193
|
+
if (idx % step == 0) {
|
194
|
+
writeNewline(1);
|
195
|
+
}
|
196
|
+
writeInt(v);
|
197
|
+
idx++;
|
198
|
+
}
|
199
|
+
writeNewline(0);
|
200
|
+
}
|
201
|
+
|
202
|
+
@Override
|
203
|
+
public void parameter(String name, String[] value) {
|
204
|
+
writeKeyword(Keyword.PARAMETER);
|
205
|
+
writeString(name);
|
206
|
+
writeKeyword(Keyword.STRING_ARRAY);
|
207
|
+
writeInt(value.length);
|
208
|
+
for (String v : value) {
|
209
|
+
writeNewline(1);
|
210
|
+
writeString(v);
|
211
|
+
}
|
212
|
+
writeNewline(0);
|
213
|
+
}
|
214
|
+
|
215
|
+
@Override
|
216
|
+
public void parameter(String name, String type, String interpolation, float[] data) {
|
217
|
+
InterpolationType interp;
|
218
|
+
try {
|
219
|
+
interp = InterpolationType.valueOf(interpolation.toUpperCase(Locale.ENGLISH));
|
220
|
+
} catch (IllegalArgumentException e) {
|
221
|
+
UI.printError(Module.API, "Unknown interpolation type: %s -- ignoring parameter \"%s\"", interpolation, name);
|
222
|
+
return;
|
223
|
+
}
|
224
|
+
Keyword typeKeyword;
|
225
|
+
int lengthFactor;
|
226
|
+
switch (type) {
|
227
|
+
case "float":
|
228
|
+
typeKeyword = Keyword.FLOAT_ARRAY;
|
229
|
+
lengthFactor = 1;
|
230
|
+
break;
|
231
|
+
case "point":
|
232
|
+
typeKeyword = Keyword.POINT_ARRAY;
|
233
|
+
lengthFactor = 3;
|
234
|
+
break;
|
235
|
+
case "vector":
|
236
|
+
typeKeyword = Keyword.VECTOR_ARRAY;
|
237
|
+
lengthFactor = 3;
|
238
|
+
break;
|
239
|
+
case "texcoord":
|
240
|
+
typeKeyword = Keyword.TEXCOORD_ARRAY;
|
241
|
+
lengthFactor = 2;
|
242
|
+
break;
|
243
|
+
case "matrix":
|
244
|
+
typeKeyword = Keyword.MATRIX_ARRAY;
|
245
|
+
lengthFactor = 16;
|
246
|
+
break;
|
247
|
+
default:
|
248
|
+
UI.printError(Module.API, "Unknown parameter type: %s -- ignoring parameter \"%s\"", type, name);
|
249
|
+
return;
|
250
|
+
}
|
251
|
+
writeKeyword(Keyword.PARAMETER);
|
252
|
+
|
253
|
+
writeString(name);
|
254
|
+
writeKeyword(typeKeyword);
|
255
|
+
writeInterpolationType(interp);
|
256
|
+
writeInt(data.length / lengthFactor);
|
257
|
+
int idx = 0;
|
258
|
+
if (data.length > 16) {
|
259
|
+
lengthFactor *= 8;
|
260
|
+
}
|
261
|
+
for (float v : data) {
|
262
|
+
if (lengthFactor > 1 && idx % lengthFactor == 0) {
|
263
|
+
writeNewline(1);
|
264
|
+
}
|
265
|
+
writeFloat(v);
|
266
|
+
idx++;
|
267
|
+
}
|
268
|
+
writeNewline(0);
|
269
|
+
}
|
270
|
+
|
271
|
+
@Override
|
272
|
+
public boolean include(String filename) {
|
273
|
+
writeKeyword(Keyword.INCLUDE);
|
274
|
+
writeString(filename);
|
275
|
+
writeNewline(0);
|
276
|
+
writeNewline(0);
|
277
|
+
return true;
|
278
|
+
}
|
279
|
+
|
280
|
+
@Override
|
281
|
+
public void plugin(String type, String name, String code) {
|
282
|
+
writeKeyword(Keyword.PLUGIN);
|
283
|
+
writeString(type);
|
284
|
+
writeString(name);
|
285
|
+
writeVerbatimString(code);
|
286
|
+
writeNewline(0);
|
287
|
+
writeNewline(0);
|
288
|
+
}
|
289
|
+
|
290
|
+
@Override
|
291
|
+
public void remove(String name) {
|
292
|
+
writeKeyword(Keyword.REMOVE);
|
293
|
+
writeString(name);
|
294
|
+
writeNewline(0);
|
295
|
+
writeNewline(0);
|
296
|
+
}
|
297
|
+
|
298
|
+
@Override
|
299
|
+
public void render(String optionsName, Display display) {
|
300
|
+
UI.printWarning(Module.API, "Unable to render file stream");
|
301
|
+
}
|
302
|
+
|
303
|
+
@Override
|
304
|
+
public final void reset() {
|
305
|
+
frame = 1;
|
306
|
+
}
|
307
|
+
|
308
|
+
@Override
|
309
|
+
public void searchpath(String type, String path) {
|
310
|
+
writeKeyword(Keyword.SEARCHPATH);
|
311
|
+
writeString(type);
|
312
|
+
writeString(path);
|
313
|
+
writeNewline(0);
|
314
|
+
writeNewline(0);
|
315
|
+
|
316
|
+
}
|
317
|
+
|
318
|
+
@Override
|
319
|
+
public void currentFrame(int currentFrame) {
|
320
|
+
writeKeyword(Keyword.FRAME);
|
321
|
+
writeInt(frame = currentFrame);
|
322
|
+
writeNewline(0);
|
323
|
+
writeNewline(0);
|
324
|
+
}
|
325
|
+
|
326
|
+
@Override
|
327
|
+
public void shader(String name, String shaderType) {
|
328
|
+
writeKeyword(Keyword.SHADER);
|
329
|
+
writeString(name);
|
330
|
+
writeString(shaderType);
|
331
|
+
writeNewline(0);
|
332
|
+
writeNewline(0);
|
333
|
+
}
|
334
|
+
|
335
|
+
protected abstract void writeKeyword(Keyword keyword);
|
336
|
+
|
337
|
+
protected abstract void writeInterpolationType(InterpolationType interp);
|
338
|
+
|
339
|
+
protected abstract void writeBoolean(boolean value);
|
340
|
+
|
341
|
+
protected abstract void writeInt(int value);
|
342
|
+
|
343
|
+
protected abstract void writeFloat(float value);
|
344
|
+
|
345
|
+
protected abstract void writeString(String string);
|
346
|
+
|
347
|
+
protected abstract void writeVerbatimString(String string);
|
348
|
+
|
349
|
+
protected abstract void writeMatrix(Matrix4 value);
|
350
|
+
|
351
|
+
protected abstract void writeNewline(int indentNext);
|
352
|
+
|
353
|
+
public abstract void close();
|
354
|
+
}
|
@@ -0,0 +1,322 @@
|
|
1
|
+
package org.sunflow;
|
2
|
+
|
3
|
+
import org.sunflow.core.AccelerationStructure;
|
4
|
+
import org.sunflow.core.BucketOrder;
|
5
|
+
import org.sunflow.core.CameraLens;
|
6
|
+
import org.sunflow.core.CausticPhotonMapInterface;
|
7
|
+
import org.sunflow.core.Filter;
|
8
|
+
import org.sunflow.core.GIEngine;
|
9
|
+
import org.sunflow.core.GlobalPhotonMapInterface;
|
10
|
+
import org.sunflow.core.ImageSampler;
|
11
|
+
import org.sunflow.core.LightSource;
|
12
|
+
import org.sunflow.core.Modifier;
|
13
|
+
import org.sunflow.core.PrimitiveList;
|
14
|
+
import org.sunflow.core.SceneParser;
|
15
|
+
import org.sunflow.core.Shader;
|
16
|
+
import org.sunflow.core.Tesselatable;
|
17
|
+
import org.sunflow.core.accel.BoundingIntervalHierarchy;
|
18
|
+
import org.sunflow.core.accel.KDTree;
|
19
|
+
import org.sunflow.core.accel.NullAccelerator;
|
20
|
+
import org.sunflow.core.accel.UniformGrid;
|
21
|
+
import org.sunflow.core.bucket.ColumnBucketOrder;
|
22
|
+
import org.sunflow.core.bucket.DiagonalBucketOrder;
|
23
|
+
import org.sunflow.core.bucket.HilbertBucketOrder;
|
24
|
+
import org.sunflow.core.bucket.RandomBucketOrder;
|
25
|
+
import org.sunflow.core.bucket.RowBucketOrder;
|
26
|
+
import org.sunflow.core.bucket.SpiralBucketOrder;
|
27
|
+
import org.sunflow.core.camera.FisheyeLens;
|
28
|
+
import org.sunflow.core.camera.PinholeLens;
|
29
|
+
import org.sunflow.core.camera.SphericalLens;
|
30
|
+
import org.sunflow.core.camera.ThinLens;
|
31
|
+
import org.sunflow.core.filter.BlackmanHarrisFilter;
|
32
|
+
import org.sunflow.core.filter.BoxFilter;
|
33
|
+
import org.sunflow.core.filter.CatmullRomFilter;
|
34
|
+
import org.sunflow.core.filter.CubicBSpline;
|
35
|
+
import org.sunflow.core.filter.GaussianFilter;
|
36
|
+
import org.sunflow.core.filter.LanczosFilter;
|
37
|
+
import org.sunflow.core.filter.MitchellFilter;
|
38
|
+
import org.sunflow.core.filter.SincFilter;
|
39
|
+
import org.sunflow.core.filter.TriangleFilter;
|
40
|
+
import org.sunflow.core.gi.AmbientOcclusionGIEngine;
|
41
|
+
import org.sunflow.core.gi.FakeGIEngine;
|
42
|
+
import org.sunflow.core.gi.InstantGI;
|
43
|
+
import org.sunflow.core.gi.IrradianceCacheGIEngine;
|
44
|
+
import org.sunflow.core.gi.PathTracingGIEngine;
|
45
|
+
import org.sunflow.core.light.DirectionalSpotlight;
|
46
|
+
import org.sunflow.core.light.ImageBasedLight;
|
47
|
+
import org.sunflow.core.light.PointLight;
|
48
|
+
import org.sunflow.core.light.SphereLight;
|
49
|
+
import org.sunflow.core.light.SunSkyLight;
|
50
|
+
import org.sunflow.core.light.TriangleMeshLight;
|
51
|
+
import org.sunflow.core.modifiers.BumpMappingModifier;
|
52
|
+
import org.sunflow.core.modifiers.NormalMapModifier;
|
53
|
+
import org.sunflow.core.modifiers.PerlinModifier;
|
54
|
+
import org.sunflow.core.parser.RA2Parser;
|
55
|
+
import org.sunflow.core.parser.RA3Parser;
|
56
|
+
import org.sunflow.core.parser.SCAsciiParser;
|
57
|
+
import org.sunflow.core.parser.SCBinaryParser;
|
58
|
+
import org.sunflow.core.parser.SCParser;
|
59
|
+
import org.sunflow.core.parser.ShaveRibParser;
|
60
|
+
import org.sunflow.core.photonmap.CausticPhotonMap;
|
61
|
+
import org.sunflow.core.photonmap.GlobalPhotonMap;
|
62
|
+
import org.sunflow.core.photonmap.GridPhotonMap;
|
63
|
+
import org.sunflow.core.primitive.Background;
|
64
|
+
import org.sunflow.core.primitive.BanchoffSurface;
|
65
|
+
import org.sunflow.core.primitive.Box;
|
66
|
+
import org.sunflow.core.primitive.CornellBox;
|
67
|
+
import org.sunflow.core.primitive.Cylinder;
|
68
|
+
import org.sunflow.core.primitive.Hair;
|
69
|
+
import org.sunflow.core.primitive.JuliaFractal;
|
70
|
+
import org.sunflow.core.primitive.ParticleSurface;
|
71
|
+
import org.sunflow.core.primitive.Plane;
|
72
|
+
import org.sunflow.core.primitive.QuadMesh;
|
73
|
+
import org.sunflow.core.primitive.Sphere;
|
74
|
+
import org.sunflow.core.primitive.SphereFlake;
|
75
|
+
import org.sunflow.core.primitive.Torus;
|
76
|
+
import org.sunflow.core.primitive.TriangleMesh;
|
77
|
+
import org.sunflow.core.renderer.BucketRenderer;
|
78
|
+
import org.sunflow.core.renderer.MultipassRenderer;
|
79
|
+
import org.sunflow.core.renderer.ProgressiveRenderer;
|
80
|
+
import org.sunflow.core.renderer.SimpleRenderer;
|
81
|
+
import org.sunflow.core.shader.AmbientOcclusionShader;
|
82
|
+
import org.sunflow.core.shader.AnisotropicWardShader;
|
83
|
+
import org.sunflow.core.shader.ConstantShader;
|
84
|
+
import org.sunflow.core.shader.DiffuseShader;
|
85
|
+
import org.sunflow.core.shader.GlassShader;
|
86
|
+
import org.sunflow.core.shader.IDShader;
|
87
|
+
import org.sunflow.core.shader.MirrorShader;
|
88
|
+
import org.sunflow.core.shader.NormalShader;
|
89
|
+
import org.sunflow.core.shader.PhongShader;
|
90
|
+
import org.sunflow.core.shader.PrimIDShader;
|
91
|
+
import org.sunflow.core.shader.QuickGrayShader;
|
92
|
+
import org.sunflow.core.shader.ShinyDiffuseShader;
|
93
|
+
import org.sunflow.core.shader.SimpleShader;
|
94
|
+
import org.sunflow.core.shader.TexturedAmbientOcclusionShader;
|
95
|
+
import org.sunflow.core.shader.TexturedDiffuseShader;
|
96
|
+
import org.sunflow.core.shader.TexturedPhongShader;
|
97
|
+
import org.sunflow.core.shader.TexturedShinyDiffuseShader;
|
98
|
+
import org.sunflow.core.shader.TexturedWardShader;
|
99
|
+
import org.sunflow.core.shader.UVShader;
|
100
|
+
import org.sunflow.core.shader.UberShader;
|
101
|
+
import org.sunflow.core.shader.ViewCausticsShader;
|
102
|
+
import org.sunflow.core.shader.ViewGlobalPhotonsShader;
|
103
|
+
import org.sunflow.core.shader.ViewIrradianceShader;
|
104
|
+
import org.sunflow.core.shader.WireframeShader;
|
105
|
+
import org.sunflow.core.tesselatable.BezierMesh;
|
106
|
+
import org.sunflow.core.tesselatable.FileMesh;
|
107
|
+
import org.sunflow.core.tesselatable.Gumbo;
|
108
|
+
import org.sunflow.core.tesselatable.Teapot;
|
109
|
+
import org.sunflow.image.BitmapReader;
|
110
|
+
import org.sunflow.image.BitmapWriter;
|
111
|
+
import org.sunflow.image.readers.BMPBitmapReader;
|
112
|
+
import org.sunflow.image.readers.HDRBitmapReader;
|
113
|
+
import org.sunflow.image.readers.IGIBitmapReader;
|
114
|
+
import org.sunflow.image.readers.JPGBitmapReader;
|
115
|
+
import org.sunflow.image.readers.PNGBitmapReader;
|
116
|
+
import org.sunflow.image.readers.TGABitmapReader;
|
117
|
+
import org.sunflow.image.writers.EXRBitmapWriter;
|
118
|
+
import org.sunflow.image.writers.HDRBitmapWriter;
|
119
|
+
import org.sunflow.image.writers.IGIBitmapWriter;
|
120
|
+
import org.sunflow.image.writers.PNGBitmapWriter;
|
121
|
+
import org.sunflow.image.writers.TGABitmapWriter;
|
122
|
+
import org.sunflow.system.Plugins;
|
123
|
+
|
124
|
+
/**
|
125
|
+
* This class acts as the central repository for all user extensible types in
|
126
|
+
* Sunflow, even built-in types are registered here. This class is static so
|
127
|
+
* that new plugins may be reused by an application across several render
|
128
|
+
* scenes.
|
129
|
+
*/
|
130
|
+
public final class PluginRegistry {
|
131
|
+
// base types - needed by SunflowAPI
|
132
|
+
|
133
|
+
public static final Plugins<PrimitiveList> PRIMITIVE_PLUGINS = new Plugins<PrimitiveList>(PrimitiveList.class);
|
134
|
+
public static final Plugins<Tesselatable> TESSELATABLE_PLUGINS = new Plugins<Tesselatable>(Tesselatable.class);
|
135
|
+
public static final Plugins<Shader> SHADER_PLUGINS = new Plugins<Shader>(Shader.class);
|
136
|
+
public static final Plugins<Modifier> MODIFIER_PLUGINS = new Plugins<Modifier>(Modifier.class);
|
137
|
+
public static final Plugins<LightSource> LIGHT_SOURCE_PLUGINS = new Plugins<LightSource>(LightSource.class);
|
138
|
+
public static final Plugins<CameraLens> CAMERA_LENS_PLUGINS = new Plugins<CameraLens>(CameraLens.class);
|
139
|
+
// advanced types - used inside the Sunflow core
|
140
|
+
public static final Plugins<AccelerationStructure> ACCEL_PLUGINS = new Plugins<AccelerationStructure>(AccelerationStructure.class);
|
141
|
+
public static final Plugins<BucketOrder> BUCKET_ORDER_PLUGINS = new Plugins<BucketOrder>(BucketOrder.class);
|
142
|
+
public static final Plugins<Filter> FILTER_PLUGINS = new Plugins<Filter>(Filter.class);
|
143
|
+
public static final Plugins<GIEngine> GI_ENGINE_PLUGINS = new Plugins<GIEngine>(GIEngine.class);
|
144
|
+
public static final Plugins<CausticPhotonMapInterface> CAUSTIC_PHOTON_MAP_PLUGINS = new Plugins<CausticPhotonMapInterface>(CausticPhotonMapInterface.class);
|
145
|
+
public static final Plugins<GlobalPhotonMapInterface> GLOBAL_PHOTON_MAP_PLUGINS = new Plugins<GlobalPhotonMapInterface>(GlobalPhotonMapInterface.class);
|
146
|
+
public static final Plugins<ImageSampler> IMAGE_SAMPLE_PLUGINS = new Plugins<ImageSampler>(ImageSampler.class);
|
147
|
+
public static final Plugins<SceneParser> PARSER_PLUGINS = new Plugins<SceneParser>(SceneParser.class);
|
148
|
+
public static final Plugins<BitmapReader> BITMAP_READER_PLUGINS = new Plugins<BitmapReader>(BitmapReader.class);
|
149
|
+
public static final Plugins<BitmapWriter> BITMAP_WRITER_PLUGINS = new Plugins<BitmapWriter>(BitmapWriter.class);
|
150
|
+
|
151
|
+
// Register all plugins on startup:
|
152
|
+
static {
|
153
|
+
// primitives
|
154
|
+
PRIMITIVE_PLUGINS.registerPlugin("triangle_mesh", TriangleMesh.class);
|
155
|
+
PRIMITIVE_PLUGINS.registerPlugin("sphere", Sphere.class);
|
156
|
+
PRIMITIVE_PLUGINS.registerPlugin("cylinder", Cylinder.class);
|
157
|
+
PRIMITIVE_PLUGINS.registerPlugin("box", Box.class);
|
158
|
+
PRIMITIVE_PLUGINS.registerPlugin("banchoff", BanchoffSurface.class);
|
159
|
+
PRIMITIVE_PLUGINS.registerPlugin("hair", Hair.class);
|
160
|
+
PRIMITIVE_PLUGINS.registerPlugin("julia", JuliaFractal.class);
|
161
|
+
PRIMITIVE_PLUGINS.registerPlugin("particles", ParticleSurface.class);
|
162
|
+
PRIMITIVE_PLUGINS.registerPlugin("plane", Plane.class);
|
163
|
+
PRIMITIVE_PLUGINS.registerPlugin("quad_mesh", QuadMesh.class);
|
164
|
+
PRIMITIVE_PLUGINS.registerPlugin("torus", Torus.class);
|
165
|
+
PRIMITIVE_PLUGINS.registerPlugin("background", Background.class);
|
166
|
+
PRIMITIVE_PLUGINS.registerPlugin("sphereflake", SphereFlake.class);
|
167
|
+
}
|
168
|
+
|
169
|
+
static {
|
170
|
+
// tesslatable
|
171
|
+
TESSELATABLE_PLUGINS.registerPlugin("bezier_mesh", BezierMesh.class);
|
172
|
+
TESSELATABLE_PLUGINS.registerPlugin("file_mesh", FileMesh.class);
|
173
|
+
TESSELATABLE_PLUGINS.registerPlugin("gumbo", Gumbo.class);
|
174
|
+
TESSELATABLE_PLUGINS.registerPlugin("teapot", Teapot.class);
|
175
|
+
}
|
176
|
+
|
177
|
+
static {
|
178
|
+
// shaders
|
179
|
+
SHADER_PLUGINS.registerPlugin("ambient_occlusion", AmbientOcclusionShader.class);
|
180
|
+
SHADER_PLUGINS.registerPlugin("constant", ConstantShader.class);
|
181
|
+
SHADER_PLUGINS.registerPlugin("diffuse", DiffuseShader.class);
|
182
|
+
SHADER_PLUGINS.registerPlugin("glass", GlassShader.class);
|
183
|
+
SHADER_PLUGINS.registerPlugin("mirror", MirrorShader.class);
|
184
|
+
SHADER_PLUGINS.registerPlugin("phong", PhongShader.class);
|
185
|
+
SHADER_PLUGINS.registerPlugin("shiny_diffuse", ShinyDiffuseShader.class);
|
186
|
+
SHADER_PLUGINS.registerPlugin("uber", UberShader.class);
|
187
|
+
SHADER_PLUGINS.registerPlugin("ward", AnisotropicWardShader.class);
|
188
|
+
SHADER_PLUGINS.registerPlugin("wireframe", WireframeShader.class);
|
189
|
+
|
190
|
+
// textured shaders
|
191
|
+
SHADER_PLUGINS.registerPlugin("textured_ambient_occlusion", TexturedAmbientOcclusionShader.class);
|
192
|
+
SHADER_PLUGINS.registerPlugin("textured_diffuse", TexturedDiffuseShader.class);
|
193
|
+
SHADER_PLUGINS.registerPlugin("textured_phong", TexturedPhongShader.class);
|
194
|
+
SHADER_PLUGINS.registerPlugin("textured_shiny_diffuse", TexturedShinyDiffuseShader.class);
|
195
|
+
SHADER_PLUGINS.registerPlugin("textured_ward", TexturedWardShader.class);
|
196
|
+
|
197
|
+
// preview shaders
|
198
|
+
SHADER_PLUGINS.registerPlugin("quick_gray", QuickGrayShader.class);
|
199
|
+
SHADER_PLUGINS.registerPlugin("simple", SimpleShader.class);
|
200
|
+
SHADER_PLUGINS.registerPlugin("show_normals", NormalShader.class);
|
201
|
+
SHADER_PLUGINS.registerPlugin("show_uvs", UVShader.class);
|
202
|
+
SHADER_PLUGINS.registerPlugin("show_instance_id", IDShader.class);
|
203
|
+
SHADER_PLUGINS.registerPlugin("show_primitive_id", PrimIDShader.class);
|
204
|
+
SHADER_PLUGINS.registerPlugin("view_caustics", ViewCausticsShader.class);
|
205
|
+
SHADER_PLUGINS.registerPlugin("view_global", ViewGlobalPhotonsShader.class);
|
206
|
+
SHADER_PLUGINS.registerPlugin("view_irradiance", ViewIrradianceShader.class);
|
207
|
+
}
|
208
|
+
|
209
|
+
static {
|
210
|
+
// modifiers
|
211
|
+
MODIFIER_PLUGINS.registerPlugin("bump_map", BumpMappingModifier.class);
|
212
|
+
MODIFIER_PLUGINS.registerPlugin("normal_map", NormalMapModifier.class);
|
213
|
+
MODIFIER_PLUGINS.registerPlugin("perlin", PerlinModifier.class);
|
214
|
+
}
|
215
|
+
|
216
|
+
static {
|
217
|
+
// light sources
|
218
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("directional", DirectionalSpotlight.class);
|
219
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("ibl", ImageBasedLight.class);
|
220
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("point", PointLight.class);
|
221
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("sphere", SphereLight.class);
|
222
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("sunsky", SunSkyLight.class);
|
223
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("triangle_mesh", TriangleMeshLight.class);
|
224
|
+
LIGHT_SOURCE_PLUGINS.registerPlugin("cornell_box", CornellBox.class);
|
225
|
+
}
|
226
|
+
|
227
|
+
static {
|
228
|
+
// camera lenses
|
229
|
+
CAMERA_LENS_PLUGINS.registerPlugin("pinhole", PinholeLens.class);
|
230
|
+
CAMERA_LENS_PLUGINS.registerPlugin("thinlens", ThinLens.class);
|
231
|
+
CAMERA_LENS_PLUGINS.registerPlugin("fisheye", FisheyeLens.class);
|
232
|
+
CAMERA_LENS_PLUGINS.registerPlugin("spherical", SphericalLens.class);
|
233
|
+
}
|
234
|
+
|
235
|
+
static {
|
236
|
+
// accels
|
237
|
+
ACCEL_PLUGINS.registerPlugin("bih", BoundingIntervalHierarchy.class);
|
238
|
+
ACCEL_PLUGINS.registerPlugin("kdtree", KDTree.class);
|
239
|
+
ACCEL_PLUGINS.registerPlugin("null", NullAccelerator.class);
|
240
|
+
ACCEL_PLUGINS.registerPlugin("uniformgrid", UniformGrid.class);
|
241
|
+
}
|
242
|
+
|
243
|
+
static {
|
244
|
+
// bucket orders
|
245
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("column", ColumnBucketOrder.class);
|
246
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("diagonal", DiagonalBucketOrder.class);
|
247
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("hilbert", HilbertBucketOrder.class);
|
248
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("random", RandomBucketOrder.class);
|
249
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("row", RowBucketOrder.class);
|
250
|
+
BUCKET_ORDER_PLUGINS.registerPlugin("spiral", SpiralBucketOrder.class);
|
251
|
+
}
|
252
|
+
|
253
|
+
static {
|
254
|
+
// filters
|
255
|
+
FILTER_PLUGINS.registerPlugin("blackman-harris", BlackmanHarrisFilter.class);
|
256
|
+
FILTER_PLUGINS.registerPlugin("box", BoxFilter.class);
|
257
|
+
FILTER_PLUGINS.registerPlugin("catmull-rom", CatmullRomFilter.class);
|
258
|
+
FILTER_PLUGINS.registerPlugin("gaussian", GaussianFilter.class);
|
259
|
+
FILTER_PLUGINS.registerPlugin("lanczos", LanczosFilter.class);
|
260
|
+
FILTER_PLUGINS.registerPlugin("mitchell", MitchellFilter.class);
|
261
|
+
FILTER_PLUGINS.registerPlugin("sinc", SincFilter.class);
|
262
|
+
FILTER_PLUGINS.registerPlugin("triangle", TriangleFilter.class);
|
263
|
+
FILTER_PLUGINS.registerPlugin("bspline", CubicBSpline.class);
|
264
|
+
}
|
265
|
+
|
266
|
+
static {
|
267
|
+
// gi engines
|
268
|
+
GI_ENGINE_PLUGINS.registerPlugin("ambocc", AmbientOcclusionGIEngine.class);
|
269
|
+
GI_ENGINE_PLUGINS.registerPlugin("fake", FakeGIEngine.class);
|
270
|
+
GI_ENGINE_PLUGINS.registerPlugin("igi", InstantGI.class);
|
271
|
+
GI_ENGINE_PLUGINS.registerPlugin("irr-cache", IrradianceCacheGIEngine.class);
|
272
|
+
GI_ENGINE_PLUGINS.registerPlugin("path", PathTracingGIEngine.class);
|
273
|
+
}
|
274
|
+
|
275
|
+
static {
|
276
|
+
// caustic photon maps
|
277
|
+
CAUSTIC_PHOTON_MAP_PLUGINS.registerPlugin("kd", CausticPhotonMap.class);
|
278
|
+
}
|
279
|
+
|
280
|
+
static {
|
281
|
+
// global photon maps
|
282
|
+
GLOBAL_PHOTON_MAP_PLUGINS.registerPlugin("grid", GridPhotonMap.class);
|
283
|
+
GLOBAL_PHOTON_MAP_PLUGINS.registerPlugin("kd", GlobalPhotonMap.class);
|
284
|
+
}
|
285
|
+
|
286
|
+
static {
|
287
|
+
// image samplers
|
288
|
+
IMAGE_SAMPLE_PLUGINS.registerPlugin("bucket", BucketRenderer.class);
|
289
|
+
IMAGE_SAMPLE_PLUGINS.registerPlugin("ipr", ProgressiveRenderer.class);
|
290
|
+
IMAGE_SAMPLE_PLUGINS.registerPlugin("fast", SimpleRenderer.class);
|
291
|
+
IMAGE_SAMPLE_PLUGINS.registerPlugin("multipass", MultipassRenderer.class);
|
292
|
+
}
|
293
|
+
|
294
|
+
static {
|
295
|
+
// parsers
|
296
|
+
PARSER_PLUGINS.registerPlugin("sc", SCParser.class);
|
297
|
+
PARSER_PLUGINS.registerPlugin("sca", SCAsciiParser.class);
|
298
|
+
PARSER_PLUGINS.registerPlugin("scb", SCBinaryParser.class);
|
299
|
+
PARSER_PLUGINS.registerPlugin("rib", ShaveRibParser.class);
|
300
|
+
PARSER_PLUGINS.registerPlugin("ra2", RA2Parser.class);
|
301
|
+
PARSER_PLUGINS.registerPlugin("ra3", RA3Parser.class);
|
302
|
+
}
|
303
|
+
|
304
|
+
static {
|
305
|
+
// bitmap readers
|
306
|
+
BITMAP_READER_PLUGINS.registerPlugin("hdr", HDRBitmapReader.class);
|
307
|
+
BITMAP_READER_PLUGINS.registerPlugin("tga", TGABitmapReader.class);
|
308
|
+
BITMAP_READER_PLUGINS.registerPlugin("png", PNGBitmapReader.class);
|
309
|
+
BITMAP_READER_PLUGINS.registerPlugin("jpg", JPGBitmapReader.class);
|
310
|
+
BITMAP_READER_PLUGINS.registerPlugin("bmp", BMPBitmapReader.class);
|
311
|
+
BITMAP_READER_PLUGINS.registerPlugin("igi", IGIBitmapReader.class);
|
312
|
+
}
|
313
|
+
|
314
|
+
static {
|
315
|
+
// bitmap writers
|
316
|
+
BITMAP_WRITER_PLUGINS.registerPlugin("png", PNGBitmapWriter.class);
|
317
|
+
BITMAP_WRITER_PLUGINS.registerPlugin("hdr", HDRBitmapWriter.class);
|
318
|
+
BITMAP_WRITER_PLUGINS.registerPlugin("tga", TGABitmapWriter.class);
|
319
|
+
BITMAP_WRITER_PLUGINS.registerPlugin("exr", EXRBitmapWriter.class);
|
320
|
+
BITMAP_WRITER_PLUGINS.registerPlugin("igi", IGIBitmapWriter.class);
|
321
|
+
}
|
322
|
+
}
|