clean doc

This commit is contained in:
Martin Pernollet 2021-06-27 01:22:11 +02:00
parent 3624ed16c5
commit ad309ccb76
7 changed files with 526 additions and 61 deletions

View File

@ -10,6 +10,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelListener;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferStrategy;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
@ -112,6 +113,14 @@ public class EmulGLCanvas extends GLCanvas implements IScreenCanvas, IMonitorabl
firePixelScaleChanged(pixelScaleX, pixelScaleY);
}
});
// Double buffering
//enable AWTDoubleBufferedPanel and GL.clearBackgroundWithG2d = false
//super.setDoubleBuffered(true);
//createBufferStrategy(2);
//final BufferStrategy strategy = getBufferStrategy();
//Graphics2D current = (Graphics2D) strategy.getDrawGraphics();
}
/* *********************************************************************** */

View File

@ -29,5 +29,22 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -22,7 +22,7 @@
<!-- The way to link on JOGL 2.3.2 -->
<!-- <dependency>
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
</dependency>
@ -30,7 +30,7 @@
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
</dependency>-->
</dependency>
<!-- The way to link on JOGL 2.4.0 once it is cleanly deployed -->
<!-- <dependency>
@ -54,7 +54,8 @@
-->
<!-- JOGL -->
<dependency>
<!-- JOGL<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>v2.4.0-rc-20210111</version>
@ -100,10 +101,11 @@
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-natives-windows-i586 </artifactId>
<version>v2.4.0-rc-20210111</version>
</dependency>
</dependency> -->
<!-- GLUEGEN -->
<!--
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt</artifactId>
@ -155,6 +157,6 @@
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-natives-windows-i586 </artifactId>
<version>v2.4.0-rc-20210111</version>
</dependency>
</dependency> -->
</dependencies>
</project>

View File

@ -19,6 +19,7 @@ import org.jzy3d.painters.IPainter;
import org.jzy3d.painters.NativeDesktopPainter;
import org.jzy3d.plot3d.primitives.IGLBindedResource;
import org.jzy3d.plot3d.primitives.Wireframeable;
import org.jzy3d.plot3d.rendering.lights.Light;
import org.jzy3d.plot3d.rendering.scene.Graph;
import org.jzy3d.plot3d.transform.Transform;
import com.google.common.collect.ArrayListMultimap;
@ -31,24 +32,64 @@ import com.jogamp.opengl.fixedfunc.GLPointerFunc;
/**
* A {@link DrawableVBO2} is able to efficiently draw a large collection of geometries.
*
* @see constructor documentation for details.
*
* TODO
* <ul>
* <li>Delete / destroy data
* <li>Integrate to framework
* <li>Allow computing normals
* <li>Improve shared normal processing by removing distance
* </ul>
* <p>
* <b>Effect of repeated vertices</b><br>
*
* Repeated vertices make all vertice normal being processed with the only three vertices of a
* triangle. A collection of neighbour triangles hence have normals producing sharp light reaction
* as bellow.
*
* <img src="doc-files/REPEATED_VERTEX_AND_NORMALS.png"/>
*
* </p>
*
* <p>
* <b>Shared vertices between triangles based on element index</b><br>
*
* Sharing vertices among triangles avoid repeating data, and also allows knowing all surrounding
* triangles to a point, hence allowing to compute a normal based on the mean of all triangles
* normal. This produce a smooth light reaction at the triangle edges.
*
* <img src="doc-files/SHARED_VERTEX_AVERAGED_NORMALS.png"/>
* </p>
*
* <p>
* <b>Not processing normals in java</b><br>
*
* Is faster and yield to this light reaction.
*
* <img src="doc-files/SHARED_VERTEX_NO_NORMAL.png"/>
* </p>
*
* <p>
* <b>Using a colormap</b><br>
*
* <img src="doc-files/COLORMAP.png"/>
* </p>
*
* <p>
* <b>Initializing DrawableVBO2</b></br>
*
* <pre>
* <code>
* AWTChartFactory f = new AWTChartFactory();
* Chart chart = f.newChart(Quality.Intermediate());
*
* int dimensions = TestMesh.DIMENSIONS;
* double[] vertices = TestMesh.makeArray4();
* int[] elements = TestMesh.makeElementArray4();
* int nVertices = TestMesh.nVertices(vertices);
*
* DrawableVBO2 vbo = new DrawableVBO2(vertices, dimensions, elements, null);
* chart.add(vbo);
* chart.open();
* </code>
* </pre>
* </p>
*
* @see {@link DrawableVBO2} constructor documentation for details.
*
* TODO TEST U
* <ul>
* <li>normal averaging is computed if geometry list given.
* <li>simple normal is computed if geometry list is null.
* <li>auto normal is used if parameterized that way
* <li>color buffer is computed if colormap is given
* <li>
* </ul>
*
*/
public class DrawableVBO2 extends Wireframeable implements IGLBindedResource {
@ -91,40 +132,6 @@ public class DrawableVBO2 extends Wireframeable implements IGLBindedResource {
/**
* Initialize a VBO object with arrays with the following content.
*
* <p>
* <b>Effect of repeated vertices</b><br>
*
* Repeated vertices make all vertice normal being processed with the only three vertices of a
* triangle. A collection of neighbour triangles hence have normals producing sharp light reaction
* as bellow :
*
* <img src="doc-files/REPEATED_VERTEX_AND_NORMALS.png"/>
*
* </p>
*
* <p>
* <b>Shared vertices between triangles based on element index</b><br>
*
* Sharing vertices among triangles avoid repeating data, and also allows knowing all surrounding
* triangles to a point, hence allowing to compute a normal based on the mean of all triangles
* normal. This produce a smooth light reaction at the triangle edges.
*
* <img src="doc-files/SHARED_VERTEX_AVERAGED_NORMALS.png"/>
* </p>
*
* <p>
* <b>Not processing normals in java</b><br>
*
* Is faster and yield to this light reaction
*
* <img src="doc-files/SHARED_VERTEX_NO_NORMAL.png"/>
* </p>
*
* <p>
* <b>Using a colorbar</b><br>
*
* <img src="doc-files/COLORMAP.png"/>
* </p>
*
* @param points contains an array of vertices
* <code>[x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, ..]</code>
@ -139,10 +146,7 @@ public class DrawableVBO2 extends Wireframeable implements IGLBindedResource {
* drawn as a sequence of vertices defining elements, without sharing vertices between
* elements.
* @param colormap defines how to color vertices. It may be null, in that case the object is
* colored by {@link #setColor(Color)}
*
*
*
* colored by {@link #setColor(Color)} adn shaded by {@link Light}
*/
public DrawableVBO2(double[] points, int pointDimensions, int[] elements, IColorMap colormap) {
this(makeLoader(points, pointDimensions, elements, GEOMETRY_SIZE, colormap));

View File

@ -15368,4 +15368,409 @@ public class GL2Mock implements GL2 {
}
@Override
public void glPrimitiveBoundingBox(float minX, float minY, float minZ, float minW, float maxX,
float maxY, float maxZ, float maxW) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1i64ARB(int location, long x) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2i64ARB(int location, long x, long y) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3i64ARB(int location, long x, long y, long z) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4i64ARB(int location, long x, long y, long z, long w) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1i64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1i64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2i64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2i64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3i64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3i64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4i64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4i64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1ui64ARB(int location, long x) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2ui64ARB(int location, long x, long y) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3ui64ARB(int location, long x, long y, long z) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4ui64ARB(int location, long x, long y, long z, long w) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1ui64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform1ui64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2ui64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform2ui64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3ui64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform3ui64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4ui64vARB(int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glUniform4ui64vARB(int location, int count, long[] value, int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glGetUniformi64vARB(int program, int location, LongBuffer params) {
// TODO Auto-generated method stub
}
@Override
public void glGetUniformi64vARB(int program, int location, long[] params, int params_offset) {
// TODO Auto-generated method stub
}
@Override
public void glGetUniformui64vARB(int program, int location, LongBuffer params) {
// TODO Auto-generated method stub
}
@Override
public void glGetUniformui64vARB(int program, int location, long[] params, int params_offset) {
// TODO Auto-generated method stub
}
@Override
public void glGetnUniformi64vARB(int program, int location, int bufSize, LongBuffer params) {
// TODO Auto-generated method stub
}
@Override
public void glGetnUniformi64vARB(int program, int location, int bufSize, long[] params,
int params_offset) {
// TODO Auto-generated method stub
}
@Override
public void glGetnUniformui64vARB(int program, int location, int bufSize, LongBuffer params) {
// TODO Auto-generated method stub
}
@Override
public void glGetnUniformui64vARB(int program, int location, int bufSize, long[] params,
int params_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1i64ARB(int program, int location, long x) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2i64ARB(int program, int location, long x, long y) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3i64ARB(int program, int location, long x, long y, long z) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4i64ARB(int program, int location, long x, long y, long z, long w) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1i64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1i64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2i64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2i64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3i64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3i64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4i64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4i64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1ui64ARB(int program, int location, long x) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2ui64ARB(int program, int location, long x, long y) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3ui64ARB(int program, int location, long x, long y, long z) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4ui64ARB(int program, int location, long x, long y, long z, long w) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1ui64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform1ui64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2ui64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform2ui64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3ui64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform3ui64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4ui64vARB(int program, int location, int count, LongBuffer value) {
// TODO Auto-generated method stub
}
@Override
public void glProgramUniform4ui64vARB(int program, int location, int count, long[] value,
int value_offset) {
// TODO Auto-generated method stub
}
@Override
public void glMaxShaderCompilerThreadsARB(int count) {
// TODO Auto-generated method stub
}
@Override
public void glFramebufferSampleLocationsfvARB(int target, int start, int count, FloatBuffer v) {
// TODO Auto-generated method stub
}
@Override
public void glFramebufferSampleLocationsfvARB(int target, int start, int count, float[] v,
int v_offset) {
// TODO Auto-generated method stub
}
@Override
public void glNamedFramebufferSampleLocationsfvARB(int framebuffer, int start, int count,
FloatBuffer v) {
// TODO Auto-generated method stub
}
@Override
public void glNamedFramebufferSampleLocationsfvARB(int framebuffer, int start, int count,
float[] v, int v_offset) {
// TODO Auto-generated method stub
}
@Override
public void glEvaluateDepthValuesARB() {
// TODO Auto-generated method stub
}
@Override
public void glBlendFuncSeparateINGR(int sfactorRGB, int dfactorRGB, int sfactorAlpha,
int dfactorAlpha) {
// TODO Auto-generated method stub
}
@Override
public void glHintPGI(int target, int mode) {
// TODO Auto-generated method stub
}
}

View File

@ -24,11 +24,27 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

12
pom.xml
View File

@ -222,6 +222,18 @@
<!-- <dependency> <groupId>org.jogamp.gluegen</groupId> <artifactId>gluegen-rt</artifactId>
<version>2.4.0-rc-20210111</version> </dependency> <dependency> <groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId> <version>2.4.0-rc-20210111</version> </dependency> -->
<dependency>
<groupId>org.jogamp.gluegen</groupId>
<artifactId>gluegen-rt-main</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>