VIZ++ Class: OpenGLDisk

 VIZ++ Class Library  VIZ++ Samples  VIZ++ ClassTree 

Source code

/*
 * OpenGLDisk.h 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


#pragma once

#include <viz++/Exception.h>
#include <viz++/opengl/OpenGLObject.h>
#include <viz++/opengl/OpenGLQuadric.h>
#include <math.h>

namespace VIZ {

class OpenGLDisk :public OpenGLObject {
private:
  OpenGLQuadric* quadric; 
  
public:
  OpenGLDisk(OpenGLQuadric* q)
  :OpenGLObject(),
   quadric(q)
  {
    if (q == NULL) {
      throw IException("Invalid argument");
    } 
  } 

  ~OpenGLDisk()
  {
  }
 
  void draw(GLdouble inner,
            GLdouble outer,
            GLint slices,
            GLint stacks)
  {
    gluDisk(quadric->getQuadric(),  
         inner,  
         outer,  
         slices,  
         stacks); 

  }
};
}


Last modified: 10 Feb 2017

Copyright (c) 2009-2017 Antillia.com ALL RIGHTS RESERVED.