VIZ++ Class: OpenGLPartialDisk

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

Source code

/*
 * OpenGLPartialDisk.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 OpenGLPartialDisk :public OpenGLObject {
private:
  OpenGLQuadric* quadric; 
public:
  OpenGLPartialDisk(OpenGLQuadric* q)
  :OpenGLObject(),
   quadric(q)
  {
    if (q == NULL) {
      throw IException("Invalid argument");
    } 
  } 

  ~OpenGLPartialDisk()
  {
  }
 
  void draw(GLdouble   inner,  
            GLdouble   outer,  
            GLint   slices,  
            GLint   loops,  
            GLdouble   start,  
            GLdouble   sweep) 

  {
    gluPartialDisk(quadric->getQuadric(),  
        inner,  
        outer,  
        slices,  
        loops,  
        start,  
        sweep); 
  }
};

}


Last modified: 10 Feb 2017

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