The class rendering a PhyCylinder. More...

Inheritance diagram for RenderPhyCylinder:

Public Member Functions

 RenderPhyCylinder (WObject *wobj, RenderWObjectContainer *container)
 Constructor.
 
virtual ~RenderPhyCylinder ()
 Destructor.
 
virtual void calculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm)
 Computes and returns the AABB of the object.
 
virtual void calculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint)
 Computes and returns the OBB of the object.
 
virtual void render (QGLContext *gw)
 The function performing the actual rendering.
 
virtual void renderAABB (RenderWorld *gw)
 Renders only the AABB of the object.
 
- Public Member Functions inherited from RenderWObject
 RenderWObject (WObject *o, RenderWObjectContainer *container)
 
RenderWObjectContainercontainer ()
 return the Container on which this object is, or the OpenGL windows where it is displayed
 
WObjectobject ()
 return the WObject that this RenderWObject display on OpenGL
 
virtual void objectAlreadyDestroyed ()
 This function is called before the destruction if the WObject we are supposed to draw has already been destroyed.
 

Protected Member Functions

void updateRepresentation ()
 Updates the representation of the cylinder.
 

Protected Attributes

PhyCylinder *const m_cylinder
 The cylinder we have to render.
 
QVector< GLfloat > m_cylinderColors
 The array of colors of vertexes of the cylinder.
 
QVector< GLfloat > m_cylinderNormals
 The array of normals to vertexes of the cylinder.
 
QVector< GLfloat > m_cylinderTextureCoords
 The arrayof texture coordinates for each vertex of the cylinder.
 
QVector< GLfloat > m_cylinderVertexes
 The array of vertexes of the cylinder.
 
const real m_height
 The height of the cylinder.
 
QVector< GLfloat > m_lowerBaseColors
 The array of colors of vertexes of the lower base.
 
QVector< GLfloat > m_lowerBaseNormals
 The array of normals to vertexes of the lower base.
 
QVector< unsigned int > m_lowerBaseSegmentsLength
 The array with the number of vertexes for each segment of the lower base (each segment has a different color)
 
QVector< GLfloat > m_lowerBaseTextureCoords
 The arrayof texture coordinates for each vertex of the lower base.
 
QVector< GLfloat > m_lowerBaseVertexes
 The array of vertexes of the lower base.
 
const real m_radius
 The radius of the cylinder.
 
QVector< GLfloat > m_upperBaseColors
 The array of colors of vertexes of the upper base.
 
QVector< GLfloat > m_upperBaseNormals
 The array of normals to vertexes of the upper base.
 
QVector< unsigned int > m_upperBaseSegmentsLength
 The array with the number of vertexes for each segment of the upper base (each segment has a different color)
 
QVector< GLfloat > m_upperBaseTextureCoords
 The arrayof texture coordinates for each vertex of the upper base.
 
QVector< GLfloat > m_upperBaseVertexes
 The array of vertexes of the upper base.
 
- Protected Attributes inherited from RenderWObject
RenderWObjectContainercontain
 
WObjectobj
 

Detailed Description

The class rendering a PhyCylinder.

Definition at line 365 of file renderwobjecthierarchy.cpp.

Constructor & Destructor Documentation

RenderPhyCylinder ( WObject wobj,
RenderWObjectContainer container 
)
inline

Constructor.

Parameters
wobjthe object to render. Bad crashes will happend if wobj is not a PhyCylinder
containerthe container of renderers

Definition at line 374 of file renderwobjecthierarchy.cpp.

virtual ~RenderPhyCylinder ( )
inlinevirtual

Destructor.

Definition at line 400 of file renderwobjecthierarchy.cpp.

Member Function Documentation

virtual void calculateAABB ( wVector minPoint,
wVector maxPoint,
const wMatrix  tm 
)
inlinevirtual

Computes and returns the AABB of the object.

Parameters
minPointmodified to store the minimum point of the AABB
maxPointmodified to store the maximum point of the AABB
tmthe transformation matrix of the object

Reimplemented from RenderWObject.

Definition at line 491 of file renderwobjecthierarchy.cpp.

virtual void calculateOBB ( wVector dimension,
wVector minPoint,
wVector maxPoint 
)
inlinevirtual

Computes and returns the OBB of the object.

Parameters
dimensionmodified to store the dimensions of the OBB
minPointmodified to store the minimum point of the OBB
maxPointmodified to store the maximum point of the OBB

Reimplemented from RenderWObject.

Definition at line 514 of file renderwobjecthierarchy.cpp.

virtual void render ( QGLContext *  gw)
inlinevirtual

The function performing the actual rendering.

Parameters
gwthe openGL context

Implements RenderWObject.

Definition at line 410 of file renderwobjecthierarchy.cpp.

virtual void renderAABB ( RenderWorld gw)
inlinevirtual

Renders only the AABB of the object.

Parameters
gwthe RenderWorld object in which we are rendered

Reimplemented from RenderWObject.

Definition at line 472 of file renderwobjecthierarchy.cpp.

References RenderWObjectContainer::drawWireBox().

void updateRepresentation ( )
inlineprotected

Updates the representation of the cylinder.

This regenerates the list of vertexes used to render the cylinder

Definition at line 535 of file renderwobjecthierarchy.cpp.

Member Data Documentation

PhyCylinder* const m_cylinder
protected

The cylinder we have to render.

Definition at line 892 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_cylinderColors
protected

The array of colors of vertexes of the cylinder.

This is a plain array, each block of 3 values is a color

Definition at line 924 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_cylinderNormals
protected

The array of normals to vertexes of the cylinder.

This is a plain array, each block of 3 values is a normal

Definition at line 917 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_cylinderTextureCoords
protected

The arrayof texture coordinates for each vertex of the cylinder.

This is a plain array, each block of 2 values is a texture coordinate

Definition at line 932 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_cylinderVertexes
protected

The array of vertexes of the cylinder.

Vertexes are meant to be drawn as TRIANGLE_STRIP. This is a plain array, each block of 3 values is a vertex

Definition at line 910 of file renderwobjecthierarchy.cpp.

const real m_height
protected

The height of the cylinder.

Definition at line 897 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_lowerBaseColors
protected

The array of colors of vertexes of the lower base.

This is a plain array, each block of 3 values is a color

Definition at line 990 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_lowerBaseNormals
protected

The array of normals to vertexes of the lower base.

This is a plain array, each block of 3 values is a normal

Definition at line 983 of file renderwobjecthierarchy.cpp.

QVector<unsigned int> m_lowerBaseSegmentsLength
protected

The array with the number of vertexes for each segment of the lower base (each segment has a different color)

Definition at line 1004 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_lowerBaseTextureCoords
protected

The arrayof texture coordinates for each vertex of the lower base.

This is a plain array, each block of 2 values is a texture coordinate

Definition at line 998 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_lowerBaseVertexes
protected

The array of vertexes of the lower base.

Vertexes are meant to be drawn as TRIANGLE_FAN. This is a plain array, each block of 3 values is a vertex

Definition at line 976 of file renderwobjecthierarchy.cpp.

const real m_radius
protected

The radius of the cylinder.

Definition at line 902 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_upperBaseColors
protected

The array of colors of vertexes of the upper base.

This is a plain array, each block of 3 values is a color

Definition at line 954 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_upperBaseNormals
protected

The array of normals to vertexes of the upper base.

This is a plain array, each block of 3 values is a normal

Definition at line 947 of file renderwobjecthierarchy.cpp.

QVector<unsigned int> m_upperBaseSegmentsLength
protected

The array with the number of vertexes for each segment of the upper base (each segment has a different color)

Definition at line 968 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_upperBaseTextureCoords
protected

The arrayof texture coordinates for each vertex of the upper base.

This is a plain array, each block of 2 values is a texture coordinate

Definition at line 962 of file renderwobjecthierarchy.cpp.

QVector<GLfloat> m_upperBaseVertexes
protected

The array of vertexes of the upper base.

Vertexes are meant to be drawn as TRIANGLE_FAN. This is a plain array, each block of 3 values is a vertex

Definition at line 940 of file renderwobjecthierarchy.cpp.


The documentation for this class was generated from the following file: