Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Tube Class Reference

#include <Tube.h>

Inherits OpenGLObject.

Inheritance diagram for Tube:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Tube (int resolution, float radius, float height, float innerRadius=0.0f)
virtual ~Tube ()

Private Member Functions

bool createFlatTube (int resolution, float radius, float height)
void setVertData (int index, float tu, float tv, float nx, float ny, float nz, float vx, float vy, float vz)

Private Attributes

Vertexm_pTubeVertices

Detailed Description

Tube.h

Author: Petter Alstermark, petter@alstermark.com

Definition at line 14 of file Tube.h.


Constructor & Destructor Documentation

Tube::Tube int  resolution,
float  radius,
float  height,
float  innerRadius = 0.0f
 

Tube.cpp

Author: Petter Alstermark, petter@alstermark.com

Definition at line 9 of file Tube.cpp.

References createFlatTube(), LOG_ERROR, LOG_SUCCESS, and m_pTubeVertices.

Here is the call graph for this function:

Tube::~Tube  )  [virtual]
 

Definition at line 85 of file Tube.cpp.

References m_pTubeVertices.


Member Function Documentation

bool Tube::createFlatTube int  resolution,
float  radius,
float  height
[private]
 

Vertex v = m_pTubeVertices[0]; setVertData(index++, v.tu, v.tv, v.nx, v.ny, v.nz, v.vx, v.vy, v.vz); v = m_pTubeVertices[1]; setVertData(index++, v.tu, v.tv, v.nx, v.ny, v.nz, v.vx, v.vy, v.vz);

Definition at line 25 of file Tube.cpp.

References Object::addFormat(), ATT_FLOAT, ATT_NORMAL, ATT_TEX, ATT_VERTEX, m_pTubeVertices, PRIM_TRIANGLE_STRIP, Object::setPrimitive(), setVertData(), Object::setVertices(), and TWOPI.

Referenced by Tube().

Here is the call graph for this function:

void Tube::setVertData int  index,
float  tu,
float  tv,
float  nx,
float  ny,
float  nz,
float  vx,
float  vy,
float  vz
[private]
 

Definition at line 71 of file Tube.cpp.

References m_pTubeVertices.

Referenced by createFlatTube().


Member Data Documentation

Vertex* Tube::m_pTubeVertices [private]
 

Definition at line 26 of file Tube.h.

Referenced by createFlatTube(), setVertData(), Tube(), and ~Tube().


Generated on Sun Jun 5 15:51:07 2005 for Defacto by  doxygen 1.4.3