mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
QuadricObject Class Reference

An extension of GraphicsObject that can draw using OpenGL quadrics (GLU) More...

#include <QuadricObject.h>

Inheritance diagram for QuadricObject:
GraphicsObject GameObject Planet Star

Public Member Functions

 QuadricObject (GLuint textureName)
 
 QuadricObject (float r, GLuint textureName)
 
 QuadricObject (Vector3 position, float r, GLuint textureName)
 
 QuadricObject (float x, float y, float z, float r, GLuint textureName)
 
 ~QuadricObject (void)
 
Point4 getColor (void)
 
GLuint getTexture (void)
 
void setColor (Vector3 color)
 Sets the color used for drawing.
 
void setColor (float r, float g, float b)
 Sets the color used for drawing.
 
void setColor (float r, float g, float b, float a)
 Sets the color used for drawing, allows setting of alpha channel.
 
void setTexture (GLuint texture)
 Sets the texture used for drawing, if texturing is on.
 
- Public Member Functions inherited from GraphicsObject
 GraphicsObject (void)
 The constructor creates the object.
 
 GraphicsObject (GLfloat r)
 The constructor creates the object.
 
 GraphicsObject (Vector3 position, float r)
 Creates an graphical object.
 
 GraphicsObject (float x, float y, float z, float r)
 Creates a graphical object.
 
 ~GraphicsObject (void)
 Destructor.
 
virtual void draw (void)=0
 
float getRadius (void)
 Returns the radius of the object, usable for view frustum culling.
 
float getCollisionRadius (void)
 Returns the radius of the object, usable for collision detection.
 
- Public Member Functions inherited from GameObject
 GameObject (void)
 The constructor creates the object. The position is set to zero by default.
 
 GameObject (Vector3 position)
 The constructor creates the object and gives it a position in the scene.
 
 GameObject (float x, float y, float z)
 The constructor creates the object and gives it a position in the scene.
 
 ~GameObject (void)
 Destructor. Does nothing.
 
virtual Vector3 getPos (void)
 Returns the current position as Vector3 triple.
 
void setPos (float x, float y, float z)
 Sets the current position.
 
void setPos (Vector3 position)
 Sets the current position.
 

Public Attributes

GLuint m_texture
 
Point4 m_color
 

Detailed Description

An extension of GraphicsObject that can draw using OpenGL quadrics (GLU)

Definition at line 12 of file QuadricObject.h.

Constructor & Destructor Documentation

QuadricObject::QuadricObject ( GLuint  textureName)

Definition at line 10 of file QuadricObject.cpp.

QuadricObject::QuadricObject ( float  r,
GLuint  textureName 
)

Definition at line 14 of file QuadricObject.cpp.

QuadricObject::QuadricObject ( Vector3  position,
float  r,
GLuint  textureName 
)

Definition at line 18 of file QuadricObject.cpp.

QuadricObject::QuadricObject ( float  x,
float  y,
float  z,
float  r,
GLuint  textureName 
)

Definition at line 22 of file QuadricObject.cpp.

QuadricObject::~QuadricObject ( void  )

Definition at line 27 of file QuadricObject.cpp.

Member Function Documentation

Point4 QuadricObject::getColor ( void  )

Definition at line 30 of file QuadricObject.cpp.

GLuint QuadricObject::getTexture ( void  )

Definition at line 34 of file QuadricObject.cpp.

GLvoid QuadricObject::setColor ( Vector3  color)

Sets the color used for drawing.

Parameters
colora vector with the rgb color-information

Definition at line 42 of file QuadricObject.cpp.

GLvoid QuadricObject::setColor ( float  r,
float  g,
float  b 
)

Sets the color used for drawing.

Parameters
rthe red component
gthe green component
bthe blue component

Definition at line 54 of file QuadricObject.cpp.

GLvoid QuadricObject::setColor ( float  r,
float  g,
float  b,
float  a 
)

Sets the color used for drawing, allows setting of alpha channel.

Parameters
rthe red component
gthe green component
bthe blue component
athe alpha channel

Definition at line 67 of file QuadricObject.cpp.

GLvoid QuadricObject::setTexture ( GLuint  texture)

Sets the texture used for drawing, if texturing is on.

Definition at line 77 of file QuadricObject.cpp.

Member Data Documentation

Point4 QuadricObject::m_color

Definition at line 34 of file QuadricObject.h.

GLuint QuadricObject::m_texture

Definition at line 33 of file QuadricObject.h.


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