The class rendering a PhyCylinder. More...
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) | |
RenderWObjectContainer * | container () |
return the Container on which this object is, or the OpenGL windows where it is displayed | |
WObject * | object () |
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 | |
RenderWObjectContainer * | contain |
WObject * | obj |
Detailed Description
The class rendering a PhyCylinder.
Definition at line 365 of file renderwobjecthierarchy.cpp.
Constructor & Destructor Documentation
|
inline |
Constructor.
- Parameters
-
wobj the object to render. Bad crashes will happend if wobj is not a PhyCylinder container the container of renderers
Definition at line 374 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
Destructor.
Definition at line 400 of file renderwobjecthierarchy.cpp.
Member Function Documentation
|
inlinevirtual |
Computes and returns the AABB of the object.
- Parameters
-
minPoint modified to store the minimum point of the AABB maxPoint modified to store the maximum point of the AABB tm the transformation matrix of the object
Reimplemented from RenderWObject.
Definition at line 491 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
Computes and returns the OBB of the object.
- Parameters
-
dimension modified to store the dimensions of the OBB minPoint modified to store the minimum point of the OBB maxPoint modified to store the maximum point of the OBB
Reimplemented from RenderWObject.
Definition at line 514 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
The function performing the actual rendering.
- Parameters
-
gw the openGL context
Implements RenderWObject.
Definition at line 410 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
Renders only the AABB of the object.
- Parameters
-
gw the RenderWorld object in which we are rendered
Reimplemented from RenderWObject.
Definition at line 472 of file renderwobjecthierarchy.cpp.
References RenderWObjectContainer::drawWireBox().
|
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
|
protected |
The cylinder we have to render.
Definition at line 892 of file renderwobjecthierarchy.cpp.
|
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.
|
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.
|
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.
|
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.
|
protected |
The height of the cylinder.
Definition at line 897 of file renderwobjecthierarchy.cpp.
|
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.
|
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.
|
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.
|
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.
|
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.
|
protected |
The radius of the cylinder.
Definition at line 902 of file renderwobjecthierarchy.cpp.
|
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.
|
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.
|
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.
|
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.
|
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:
- worldsim/src/renderwobjecthierarchy.cpp