Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

gl_cylinder< T, S > Class Template Reference

A class to keep track of cylinders ready for display using OpenGL. More...

#include <cylinder.h>

List of all members.

Public Member Functions

 gl_cylinder (cylinder< T, S > *c)
 Constructor which converts a cylinder into a gl_cylinder.

 gl_cylinder ()
 Default constructor.


Static Public Member Functions

ap_array< gl_cylinder< T,
S > > * 
convert (ap_array< cylinder< T, S > > *c)
 Function to convert an array of cylinders to an array of gl_cylinders.

void convert (ap_array< cylinder< T, S > > *c, ap_array< gl_cylinder< T, S > > *g)
 Function to convert an array of cylinders to an array of gl_cylinders.


Public Attributes

double x
 x coordinate for the cylinder base

double y
 y coordinate for the cylinder base

double z
 z coordinate for the cylinder base

double height
 height of the cylinder

double axis [3]
 Axis of rotation from (0,0,1).

double angle
 Degrees to rotate from (0,0,1).

double radius
 Radius of the cylinder.

int color
 Color index for the cylinder.


Detailed Description

template<class T, class S>
class gl_cylinder< T, S >

A class to keep track of cylinders ready for display using OpenGL.

This file defines a gl_cylinder class designed to hold values computed from cylinders which are convenient for display with OpenGL. It is defined as a template class where the type T is for coordinates and the type S is for sizes. These types are actually used only for specifying types of cylinders. The coordinates within gl_cylinder are all doubles. This means that it might be more reasonable to make gl_cylinder be a non-template class and provide some template functions to convert between cylinder and gl_cylinder.

Todo:
Convert gl_cylinder to a non-template class.
Author:
Ray Seyfarth


Constructor & Destructor Documentation

template<class T, class S>
gl_cylinder< T, S >::gl_cylinder< T, S > cylinder< T, S > *  c  ) 
 

Constructor which converts a cylinder into a gl_cylinder.

template<class T, class S>
gl_cylinder< T, S >::gl_cylinder< T, S >  ) 
 

Default constructor.


Member Function Documentation

template<class T, class S>
ap_array< gl_cylinder< T, S > > * gl_cylinder< T, S >::convert ap_array< cylinder< T, S > > *  c  )  [static]
 

Function to convert an array of cylinders to an array of gl_cylinders.

Parameters:
c Pointer to an array of cylinders
Returns:
Pointer to an array of gl_cylinders

template<class T, class S>
void gl_cylinder< T, S >::convert ap_array< cylinder< T, S > > *  c,
ap_array< gl_cylinder< T, S > > *  g
[static]
 

Function to convert an array of cylinders to an array of gl_cylinders.

Parameters:
c Pointer to an array of cylinders
g Pointer to an array of gl_cylinders


Member Data Documentation

template<class T, class S>
double gl_cylinder< T, S >::x
 

x coordinate for the cylinder base

template<class T, class S>
double gl_cylinder< T, S >::y
 

y coordinate for the cylinder base

template<class T, class S>
double gl_cylinder< T, S >::z
 

z coordinate for the cylinder base

template<class T, class S>
double gl_cylinder< T, S >::height
 

height of the cylinder

template<class T, class S>
double gl_cylinder< T, S >::axis[3]
 

Axis of rotation from (0,0,1).

template<class T, class S>
double gl_cylinder< T, S >::angle
 

Degrees to rotate from (0,0,1).

template<class T, class S>
double gl_cylinder< T, S >::radius
 

Radius of the cylinder.

template<class T, class S>
int gl_cylinder< T, S >::color
 

Color index for the cylinder.


The documentation for this class was generated from the following files:
Generated on Thu Nov 27 08:17:11 2003 for Animp - Animated Particles by doxygen 1.3.2