-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
Because actually this is not possible in the 3D to display just Point or Line.
The class javafx.scene.shape.Line is only for 2D (X,Y).
Shape3D actually can not display Texture.
The TexCoords of TriangleMesh seems to be not used.
The DrawMode has only: FILL, LINE.
If we choose LINE, the material do not give us control
of the line aspect.
I suggest to replace material attribute of Shape3D
by Appearance (like Java3D).
When DrawMode is LINE if Appearance has LineAttributes
(antialiasing, width, pattern, patternMask, patternScaleFactor, ...)+color
I can control the line aspect.
When DrawMode is FILL we can use the material (or Texture?)
We can had a new DrawMode: POINT
PointAttribute(size,antialiasing, ...)+color, like Java3D.
Why not combinaison:
(NONE, POINT, LINE, FILL, POINT_LINE, POINT_FILL, LINE_FILL, POINT_LINE_FILL).
The class Appearance can be:
drawMode
pointAttributes (+ his ColorAttributes)
lineAttributes (+ his ColorAttributes)
fillAttributes:
cullFace
material
texture (???)
WE must determine when we use material or Texture !!!!
(A check inside javax.media.j3d.Appearance can help us).
Actually we have this Mesh hierarchy:
Mesh()
TriangleMesh()
For example, the faces that represent a single textured rectangle,
using 2 triangles, has the following data order: [
p0, t0, p1, t1, p3, t3, // First triangle of a textured rectangle
p1, t1, p2, t2, p3, t3 // Second triangle of a textured rectangle
]
and:
p is (x,y,z)
t is (u,v)
I suggest this new class:
Mesh()
MeshData()
This class only contains the Mesh information on:
coordinates: coordStruct (via CoordStruct)
textures: texCoordStruct (via TexCoordStruct) (Optional is texture not used).
The class CoordStruct contains:
coordMode (POINT, LINE, LINE_STRIP, LINE_LOOP, TRIANGLE, TRIANGLE_STRIP, TRIANGLE_FAN)
coords (Array of coordinates)
coordIndexes (Array of coordinates indexes) ->if null then we do not use index.
The class TexCoordStruct contains:
texCoords (Array of texCoordinates)
texCoordIndexes (Array of texCoordinates indexes) >if null then we do not use index.
+More explanations on CoordMode:
POINT: is for list of single point in space.
(Index and TexCoords are not necessary).
===>Needs PointAttributes like Java3D.
LINE: is for list of line segment in space.
(TexCoords is not necessary).
Index can be used.
===>Needs LineAttributes like Java3D.
Base: Every two vertices specify a single line.
Strip: The first two vertices specify a single line,
while subsequent vertices are combined with the
previous vertex to make a line.
Loop: Identical to Strip except that at the end the last
vertex is connected with the first to form a line.
TRIANGLE: is a for list of triangle in space.
TexCoords can be used.
Index can be used.
===>Needs FillAttributes .
Base: Each 3 vertices specify a single triangle.
Strip: the first 3 vertices specify a triangle,
while subsequent vertices are combined with the previous
two to form a triangle.
Fan: Similar to Base, the first 3 vertices specify a triangle,
each 2 subsequent vertices are combined with the very first
vertex to make a triangle.
QUAD: Not supported...
This can be surely more improved.
Thank you...
The class javafx.scene.shape.Line is only for 2D (X,Y).
Shape3D actually can not display Texture.
The TexCoords of TriangleMesh seems to be not used.
The DrawMode has only: FILL, LINE.
If we choose LINE, the material do not give us control
of the line aspect.
I suggest to replace material attribute of Shape3D
by Appearance (like Java3D).
When DrawMode is LINE if Appearance has LineAttributes
(antialiasing, width, pattern, patternMask, patternScaleFactor, ...)+color
I can control the line aspect.
When DrawMode is FILL we can use the material (or Texture?)
We can had a new DrawMode: POINT
PointAttribute(size,antialiasing, ...)+color, like Java3D.
Why not combinaison:
(NONE, POINT, LINE, FILL, POINT_LINE, POINT_FILL, LINE_FILL, POINT_LINE_FILL).
The class Appearance can be:
drawMode
pointAttributes (+ his ColorAttributes)
lineAttributes (+ his ColorAttributes)
fillAttributes:
cullFace
material
texture (???)
WE must determine when we use material or Texture !!!!
(A check inside javax.media.j3d.Appearance can help us).
Actually we have this Mesh hierarchy:
Mesh()
TriangleMesh()
For example, the faces that represent a single textured rectangle,
using 2 triangles, has the following data order: [
p0, t0, p1, t1, p3, t3, // First triangle of a textured rectangle
p1, t1, p2, t2, p3, t3 // Second triangle of a textured rectangle
]
and:
p is (x,y,z)
t is (u,v)
I suggest this new class:
Mesh()
MeshData()
This class only contains the Mesh information on:
coordinates: coordStruct (via CoordStruct)
textures: texCoordStruct (via TexCoordStruct) (Optional is texture not used).
The class CoordStruct contains:
coordMode (POINT, LINE, LINE_STRIP, LINE_LOOP, TRIANGLE, TRIANGLE_STRIP, TRIANGLE_FAN)
coords (Array of coordinates)
coordIndexes (Array of coordinates indexes) ->if null then we do not use index.
The class TexCoordStruct contains:
texCoords (Array of texCoordinates)
texCoordIndexes (Array of texCoordinates indexes) >if null then we do not use index.
+More explanations on CoordMode:
POINT: is for list of single point in space.
(Index and TexCoords are not necessary).
===>Needs PointAttributes like Java3D.
LINE: is for list of line segment in space.
(TexCoords is not necessary).
Index can be used.
===>Needs LineAttributes like Java3D.
Base: Every two vertices specify a single line.
Strip: The first two vertices specify a single line,
while subsequent vertices are combined with the
previous vertex to make a line.
Loop: Identical to Strip except that at the end the last
vertex is connected with the first to form a line.
TRIANGLE: is a for list of triangle in space.
TexCoords can be used.
Index can be used.
===>Needs FillAttributes .
Base: Each 3 vertices specify a single triangle.
Strip: the first 3 vertices specify a triangle,
while subsequent vertices are combined with the previous
two to form a triangle.
Fan: Similar to Base, the first 3 vertices specify a triangle,
each 2 subsequent vertices are combined with the very first
vertex to make a triangle.
QUAD: Not supported...
This can be surely more improved.
Thank you...
- relates to
-
JDK-8316398 Consider adding more 3D primitives
-
- Open
-