src/Geometry.cpp
Glyphs::Glyphs(Session& session) : Geometry(session)
{
  //Create sub-renderers
  //All renderers are switchable and user defined based on "glyphrenderlist" global property
  std::string renderlist = session.global("subrenderers");
  std::istringstream iss(renderlist);
  std::string s;
  while (getline(iss, s, ' '))
  {
    //Only support line/triangle/point primitive renderers)
    //(NOTE: Attempting to create a Glyphs renderer as sub-renderer will cause an infinite loop)
    //std::cout << "CREATING: " << s << std::endl;
    lucGeometryType prim = session.typeMap[s];
    if (prim == lucTriangleType)
      tris = (Triangles*)createRenderer(session, s);
    else if (prim == lucLineType)
      lines = (Lines*)createRenderer(session, s);
    else if (prim == lucPointType)
      points = (Points*)createRenderer(session, s);
  }

  //Placeholder null renderers
  if (!lines) lines = (Lines*)(new Geometry(session));
  if (!tris) tris = (Triangles*)(new Geometry(session));
  if (!points) points = (Points*)(new Geometry(session));

  tris->internal = lines->internal = points->internal = true;
}
//Class to handle geometry types with sub-geometry glyphs drawn
//at vertices consisting of lines and/or triangles
Class to handle geometry types with sub-geometry glyphs drawn
at vertices consisting of lines and/or triangles
Class to handle geometry types with sub - geometry glyphs drawn at vertices consisting of lines and / or triangles
Glyphs::Glyphs(Session& session) : Geometry(session)
{
  std::string renderlist = session.global("subrenderers");
  std::istringstream iss(renderlist);
  std::string s;
  while (getline(iss, s, ' '))
  {
    lucGeometryType prim = session.typeMap[s];
    if (prim == lucTriangleType)
      tris = (Triangles*)createRenderer(session, s);
    else if (prim == lucLineType)
      lines = (Lines*)createRenderer(session, s);
    else if (prim == lucPointType)
      points = (Points*)createRenderer(session, s);
  }
  if (!lines) lines = (Lines*)(new Geometry(session));
  if (!tris) tris = (Triangles*)(new Geometry(session));
  if (!points) points = (Points*)(new Geometry(session));
  tris->internal = lines->internal = points->internal = true;
}
Glyphs :: Glyphs ( Session & session ) : Geometry ( session ) { std :: string renderlist = session . global ( " " ) ; std :: istringstream iss ( renderlist ) ; std :: string s ; while ( getline ( iss , s , ' ' ) ) { lucGeometryType prim = session . typeMap [ s ] ; if ( prim == lucTriangleType ) tris = ( Triangles * ) createRenderer ( session , s ) ; else if ( prim == lucLineType ) lines = ( Lines * ) createRenderer ( session , s ) ; else if ( prim == lucPointType ) points = ( Points * ) createRenderer ( session , s ) ; } if ( ! lines ) lines = ( Lines * ) ( new Geometry ( session ) ) ; if ( ! tris ) tris = ( Triangles * ) ( new Geometry ( session ) ) ; if ( ! points ) points = ( Points * ) ( new Geometry ( session ) ) ; tris -> internal = lines -> internal = points -> internal = true ; }
Class to handle geometry types with sub-geometry glyphs drawn
at vertices consisting of lines and/or triangles
Class to handle geometry types with sub - geometry glyphs drawn at vertices consisting of lines and / or triangles
//Create sub-renderers //All renderers are switchable and user defined based on "glyphrenderlist" global property //Only support line/triangle/point primitive renderers) //(NOTE: Attempting to create a Glyphs renderer as sub-renderer will cause an infinite loop) //std::cout << "CREATING: " << s << std::endl; //Placeholder null renderers