Maven module :un.engine : engine-opengl :
Class : un.engine.opengl.mesh.Shell
Extends/Implements : un.engine.opengl.mesh.AbstractShape
Subclasses : -

Defines the boundary of the mesh.
Vertices, normals and indices.
author  Johann Sorel


Variables : vertices, normals, tangents, uvs, indexes, ranges, morphs
Functions : setBBox, getBBox, calculateBBox, calculateNormals, calculateTangents, setVertices, getVertices, setNormals, getNormals, setTangents, getTangents, setUVs, getUVs, setIndexes, setIndexes, getIndexes, getModes, getMorphs, setMorphs, copy, isDirty, dispose


protected VBO vertices

protected VBO normals

protected VBO tangents

protected VBO uvs

protected IBO indexes

protected IndexRange[] ranges

protected MorphSet morphs


public void setBBox (BBox bbox)

public BBox getBBox ()


Calculate shell bounding box from vertices array.
public void calculateBBox ()


Calculate normals from vertices and indices.
TODO : this handle only triangle and normals are not smooth using adjacent
triangles.
public void calculateNormals ()


Calculate tangents from shell vertices and uvs.
Resources :
http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/
public void calculateTangents ()

public void setVertices (VBO vertexVBO)

public VBO getVertices ()

public void setNormals (VBO normalVBO)

public VBO getNormals ()


Expects orthogonalised and normalised tangents.
x,Y,Z = tangent
W = handedness
param  tangents VBO element of size 4
public void setTangents (VBO tangents)

public VBO getTangents ()


Texture UVS.
param  uvs VBO element of size 2
public void setUVs (VBO uvs)

public VBO getUVs ()

public void setIndexes (IBO indexVBO, IndexRange range)

public void setIndexes (IBO indexVBO, IndexRange[] ranges)


Shell index buffer.
return  IBO
public IBO getIndexes ()


Definition of the data types in the index.
return  IBO.Range array
public IndexRange[] getModes ()

public MorphSet getMorphs ()

public void setMorphs (MorphSet morphs)


Create a copy using the same resources.
return  copy
public Shell copy ()

public boolean isDirty ()

public void dispose (GLProcessContext context)