Class GaiaPrimitive

All Implemented Interfaces:
Serializable

public class GaiaPrimitive extends PrimitiveStructure implements 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 Details

    • GaiaPrimitive

      public GaiaPrimitive()
  • Method Details

    • getBoundingBox

      public GaiaBoundingBox getBoundingBox(org.joml.Matrix4d transform)
    • getTexcoordBoundingRectangle

      public GaiaRectangle getTexcoordBoundingRectangle(GaiaRectangle texcoordBoundingRectangle)
    • calculateNormal

      public void calculateNormal()
    • calculateVertexNormals

      public void calculateVertexNormals()
    • getIndices

      public int[] getIndices()
    • doNormalLengthUnitary

      public void doNormalLengthUnitary()
    • toGaiaBufferSet

      public GaiaBufferDataSet toGaiaBufferSet(org.joml.Matrix4d transformMatrixOrigin)
    • translate

      public void translate(org.joml.Vector3d translation)
    • clear

      public void clear()
    • clone

      public GaiaPrimitive clone()
    • deleteNormals

      public void deleteNormals()
    • check

      public boolean check()
    • addPrimitive

      public void addPrimitive(GaiaPrimitive primitive)
    • getMapVertexToFaces

      public Map<GaiaVertex,List<GaiaFace>> getMapVertexToFaces()
    • extractGaiaFaces

      public List<GaiaFace> extractGaiaFaces(List<GaiaFace> resultFaces)
    • 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()