The class rendering a PhyCylinder. More...
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) | |
RenderWObjectContainer * | container () |
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... | |
WObject * | object () |
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 | |
RenderWObjectContainer * | contain |
WObject * | obj |
Detailed Description
The class rendering a PhyCylinder.
Definition at line 474 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 483 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
Destructor.
Definition at line 510 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 613 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 636 of file renderwobjecthierarchy.cpp.
|
inlinevirtual |
The function performing the actual rendering.
- Parameters
-
gw the openGL context
Implements RenderWObject.
Definition at line 520 of file renderwobjecthierarchy.cpp.
References min().
|
inlinevirtual |
Renders only the AABB of the object.
- Parameters
-
gw the RenderWorld object in which we are rendered
Reimplemented from RenderWObject.
Definition at line 594 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 657 of file renderwobjecthierarchy.cpp.
References WObject::color(), PhyCylinder::SegmentColor::color, Ownable::owner(), and WObject::useColorTextureOfOwner().
Member Data Documentation
|
protected |
The cylinder we have to render.
Definition at line 1098 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 1130 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 1123 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 1138 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 1116 of file renderwobjecthierarchy.cpp.
|
protected |
The height of the cylinder.
Definition at line 1103 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 1196 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 1189 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 1210 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 1204 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 1182 of file renderwobjecthierarchy.cpp.
|
protected |
The radius of the cylinder.
Definition at line 1108 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 1160 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 1153 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 1174 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 1168 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 1146 of file renderwobjecthierarchy.cpp.
The documentation for this class was generated from the following file:
- worldsim/src/renderwobjecthierarchy.cpp