Package com.gaia3d.basic.model
Class GaiaPrimitive
java.lang.Object
com.gaia3d.basic.model.structure.PrimitiveStructure
com.gaia3d.basic.model.GaiaPrimitive
- All Implemented Interfaces:
Serializable
A class that represents a primitive of a Gaia object.
It contains the vertices and surfaces.
The vertices are used for rendering.
The surfaces are used for calculating normals.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPrimitive
(GaiaPrimitive primitive) void
void
boolean
check()
void
clear()
clone()
void
void
boolean
void
void
extractGaiaFaces
(List<GaiaFace> resultFaces) getBoundingBox
(org.joml.Matrix4d transform) int
int[]
getTexcoordBoundingRectangle
(GaiaRectangle texcoordBoundingRectangle) void
void
toGaiaBufferSet
(org.joml.Matrix4d transformMatrixOrigin) void
transformPoints
(org.joml.Matrix4d finalMatrix) void
translate
(org.joml.Vector3d translation) void
void
weldVertices
(double error, boolean checkTexCoord, boolean checkNormal, boolean checkColor, boolean checkBatchId)
-
Constructor Details
-
GaiaPrimitive
public GaiaPrimitive()
-
-
Method Details
-
getBoundingBox
-
getTexcoordBoundingRectangle
-
calculateNormal
public void calculateNormal() -
calculateVertexNormals
public void calculateVertexNormals() -
getIndices
public int[] getIndices() -
doNormalLengthUnitary
public void doNormalLengthUnitary() -
toGaiaBufferSet
-
translate
public void translate(org.joml.Vector3d translation) -
clear
public void clear() -
clone
-
deleteNormals
public void deleteNormals() -
check
public boolean check() -
addPrimitive
-
getMapVertexToFaces
-
extractGaiaFaces
-
unWeldVertices
public void unWeldVertices() -
weldVertices
public void weldVertices(double error, boolean checkTexCoord, boolean checkNormal, boolean checkColor, boolean checkBatchId) -
deleteNoUsedVertices
public boolean deleteNoUsedVertices() -
deleteObjects
public void deleteObjects() -
deleteDegeneratedFaces
public void deleteDegeneratedFaces() -
makeTriangleFaces
public void makeTriangleFaces() -
transformPoints
public void transformPoints(org.joml.Matrix4d finalMatrix) -
makeTriangularFaces
public void makeTriangularFaces() -
getFacesCount
public int getFacesCount()
-