Toplevel holder of the assets meshes, materials, textures and shaders.
SLLens creates a lens mesh based on SLRevolver.
void initLens(SLfloat diopterBot, SLfloat diopterTop, SLfloat diameter, SLfloat thickness, SLuint stacks, SLuint slices, SLMaterial *mat)
Initialize the lens.
SLfloat _radiusTop
The radius of the top (back) side of the lens.
SLfloat calcSagitta(SLfloat radius)
Calculate the sagitta (s) for a given radius (r) and diameter (l+l) where l is half of the lens diame...
SLLens(SLAssetManager *assetMgr, double sphere, double cylinder, SLfloat diameter, SLfloat thickness, SLuint stacks=32, SLuint slices=32, SLstring name="lens mesh", SLMaterial *mat=nullptr)
Create a lens with given sphere, cylinder, diameter and thickness.
SLfloat generateLensTop(SLfloat radius)
Generate the top (back) part of the lens.
void generateLens(SLfloat radiusBot, SLfloat radiusTop, SLMaterial *mat)
Generate the lens with given front and back radius.
SLbool _pointOutput
debug helper
SLfloat _thickness
The space between the primary planes of lens sides.
SLfloat _diameter
The diameter of the lens.
SLfloat generateLensBot(SLfloat radius)
Generate the bottom (front) part of the lens.
SLfloat _radiusBot
The radius of the bot (front) side of the lens.
Defines a standard CG material with textures and a shader program.
const SLstring & name() const
SLRevolver is an SLMesh object built out of revolving points.