The class rendering a PhyCylinder. More...

Inheritance diagram for RenderPhyCylinder:

Public Member Functions

 RenderPhyCylinder (WObject *wobj, RenderWObjectContainer *container)
 Constructor. More...
 
virtual ~RenderPhyCylinder ()
 Destructor. More...
 
virtual void calculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm)
 Computes and returns the AABB of the object. More...
 
virtual void calculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint)
 Computes and returns the OBB of the object. More...
 
virtual void render (QGLContext *gw)
 The function performing the actual rendering. More...
 
virtual void renderAABB (RenderWorld *gw)
 Renders only the AABB of the object. More...
 
- 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 More...
 
void drawLabel ()
 Draws the label of the object if it has to. More...
 
WObjectobject ()
 return the WObject that this RenderWObject display on OpenGL More...
 
virtual void objectAlreadyDestroyed ()
 This function is called before the destruction if the WObject we are supposed to draw has already been destroyed. More...
 

Protected Member Functions

void updateRepresentation ()
 Updates the representation of the cylinder. More...
 

Protected Attributes

PhyCylinder *const m_cylinder
 The cylinder we have to render. More...
 
QVector< GLfloat > m_cylinderColors
 The array of colors of vertexes of the cylinder. More...
 
QVector< GLfloat > m_cylinderNormals
 The array of normals to vertexes of the cylinder. More...
 
QVector< GLfloat > m_cylinderTextureCoords
 The arrayof texture coordinates for each vertex of the cylinder. More...
 
QVector< GLfloat > m_cylinderVertexes
 The array of vertexes of the cylinder. More...
 
const real m_height
 The height of the cylinder. More...
 
QVector< GLfloat > m_lowerBaseColors
 The array of colors of vertexes of the lower base. More...
 
QVector< GLfloat > m_lowerBaseNormals
 The array of normals to vertexes of the lower base. More...
 
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) More...
 
QVector< GLfloat > m_lowerBaseTextureCoords
 The arrayof texture coordinates for each vertex of the lower base. More...
 
QVector< GLfloat > m_lowerBaseVertexes
 The array of vertexes of the lower base. More...
 
const real m_radius
 The radius of the cylinder. More...
 
QVector< GLfloat > m_upperBaseColors
 The array of colors of vertexes of the upper base. More...
 
QVector< GLfloat > m_upperBaseNormals
 The array of normals to vertexes of the upper base. More...
 
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) More...
 
QVector< GLfloat > m_upperBaseTextureCoords
 The arrayof texture coordinates for each vertex of the upper base. More...
 
QVector< GLfloat > m_upperBaseVertexes
 The array of vertexes of the upper base. More...
 
- Protected Attributes inherited from RenderWObject
RenderWObjectContainercontain
 
WObjectobj
 

Detailed Description

The class rendering a PhyCylinder.

Definition at line 474 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 483 of file renderwobjecthierarchy.cpp.

virtual ~RenderPhyCylinder ( )
inlinevirtual

Destructor.

Definition at line 510 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 613 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 636 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 520 of file renderwobjecthierarchy.cpp.

References min().

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 594 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 657 of file renderwobjecthierarchy.cpp.

References WObject::color(), PhyCylinder::SegmentColor::color, Ownable::owner(), and WObject::useColorTextureOfOwner().

Member Data Documentation

PhyCylinder* const m_cylinder
protected

The cylinder we have to render.

Definition at line 1098 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 1130 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 1123 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 1138 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 1116 of file renderwobjecthierarchy.cpp.

const real m_height
protected

The height of the cylinder.

Definition at line 1103 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 1196 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 1189 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 1210 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 1204 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 1182 of file renderwobjecthierarchy.cpp.

const real m_radius
protected

The radius of the cylinder.

Definition at line 1108 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 1160 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 1153 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 1174 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 1168 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 1146 of file renderwobjecthierarchy.cpp.


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