Gazebo logo

Geom Class Reference

Base class for GL-renderable geoms. More...

#include <Geom.hh>

Inheritance diagram for Geom:

BaseGeom BoxGeom CylinderGeom DomeGeom FrustrumGeom LightGeom PlaneGeom PrismGeom RayGeom RoadGeom SphereGeom TerrainGeom WheelGeom List of all members.

Public Member Functions

 Geom (dSpaceID spaceId)
virtual ~Geom ()
void SetColor (const GzColor &color)
void SetAmbientColor (const GzColor &color)
void SetDiffuseColor (const GzColor &color)
void SetSpecularColor (const GzColor &color)
void SetEmissionColor (const GzColor &color)
void SetShadeModel (const char *mode)
void SetPolygonMode (const char *mode)
void SetTransparency (bool enable)
void SetShininess (float num)
void SetLaser (float num)
void SetRetro (float num)
void SetFiducial (int id)
void SetPickId (GLuint id)
int SetTexture2D (int width, int height, const uint8_t *data)
 Set the 2D texture.
int SetTexture2DFile (const char *filename)
 Set the 2D texture from a file.
void SetTexture2DSize (GzVector size)
 Set size of the texture image when mapped on a geom.
int SetSkinFile (const char *filename)
 Set the visual skin.
void SetSkinNull (bool enable)
 Set the visual skin to null.
void SetSkinPose (GzPose pose)
 Set the skin pose.
void SetSkinScale (GzVector scale)
 Set the skin scale.
bool HasSkin ()
 Do we have a skin?
bool HasSkinNull ()
 Do we have null a skin?
GzColor GetAmbientColor () const
GzColor GetDiffuseColor () const
GzColor GetSpecularColor () const
float GetTransparency () const
float GetShininess () const
float GetLaser () const
float GetRetro () const
int GetFiducial () const
GLuint GetPickId () const
virtual void PreRender (RenderOptions *opt)
virtual void Render (RenderOptions *opt)
virtual void PostRender (RenderOptions *opt)
void RenderSkin (RenderOptions *opt)
 Render the skin (should be called at rendering stage).

Public Attributes

int renderOrder

Protected Member Functions

void SetList (int camera, GLuint listId, RenderOptions opt)
 Set stored list options for a particular camera.
void GetList (int camera, GLuint *listId, RenderOptions *opt)
 Get stored list options for a particular camera.

Protected Attributes

bool transparency
float laser
float retro
int fiducial
GLfloat colorDiffuse [4]
GLfloat colorAmbient [4]
GLfloat colorSpecular [4]
GLfloat colorEmission [4]
GLfloat shininess
GzImagetextureImage
 Texture image (for 2D textures).
GzVector textureSize
 Texture scale (image will map onto a road patch with the given dimensions).
int pick
bool dirty
 Rengerate display list (true/false).

Detailed Description

Base class for GL-renderable geoms.

BaseGeom and Geom are the base classes for all physical geometric objects; BaseGeom encapsulates the mass and collision characteritics, while Geom encapsulated the visual appearance.


Constructor & Destructor Documentation

Geom::Geom dSpaceID  spaceId  ) 
 

Geom::~Geom  )  [virtual]
 


Member Function Documentation

void Geom::SetColor const GzColor color  ) 
 

void Geom::SetAmbientColor const GzColor color  ) 
 

void Geom::SetDiffuseColor const GzColor color  ) 
 

void Geom::SetSpecularColor const GzColor color  ) 
 

void Geom::SetEmissionColor const GzColor color  ) 
 

void Geom::SetShadeModel const char *  mode  ) 
 

void Geom::SetPolygonMode const char *  mode  ) 
 

void Geom::SetTransparency bool  enable  ) 
 

void Geom::SetShininess float  num  ) 
 

void Geom::SetLaser float  num  ) 
 

void Geom::SetRetro float  num  ) 
 

void Geom::SetFiducial int  id  ) 
 

void Geom::SetPickId GLuint  id  ) 
 

int Geom::SetTexture2D int  width,
int  height,
const uint8_t *  data
 

Set the 2D texture.

Parameters:
width,height Image dimensions (pixels).
data Image data (packed RGB888).
Returns:
Returns 0 on success.

int Geom::SetTexture2DFile const char *  filename  ) 
 

Set the 2D texture from a file.

Parameters:
filename Texture file name (NULL for no texture).
Returns:
Returns 0 on success.

void Geom::SetTexture2DSize GzVector  size  ) 
 

Set size of the texture image when mapped on a geom.

Parameters:
size Size (x and y, in meters).

int Geom::SetSkinFile const char *  filename  ) 
 

Set the visual skin.

Parameters:
filename 3DS file containing skin

void Geom::SetSkinNull bool  enable  )  [inline]
 

Set the visual skin to null.

This method is useful for suppressing rendering of a geom when skins are available, such as when this geom is part of a model in which the principle skin is attached to a different geom.

void Geom::SetSkinPose GzPose  pose  ) 
 

Set the skin pose.

Parameters:
pose Skin pose relative to geom

void Geom::SetSkinScale GzVector  scale  ) 
 

Set the skin scale.

Parameters:
scale Scale vector

bool Geom::HasSkin  )  [inline]
 

Do we have a skin?

bool Geom::HasSkinNull  )  [inline]
 

Do we have null a skin?

GzColor Geom::GetAmbientColor  )  const
 

GzColor Geom::GetDiffuseColor  )  const
 

GzColor Geom::GetSpecularColor  )  const
 

float Geom::GetTransparency  )  const
 

float Geom::GetShininess  )  const
 

float Geom::GetLaser  )  const
 

float Geom::GetRetro  )  const
 

int Geom::GetFiducial  )  const
 

GLuint Geom::GetPickId  )  const
 

void Geom::SetList int  camera,
GLuint  listId,
RenderOptions  opt
[protected]
 

Set stored list options for a particular camera.

void Geom::GetList int  camera,
GLuint *  listId,
RenderOptions opt
[protected]
 

Get stored list options for a particular camera.

void Geom::PreRender RenderOptions opt  )  [virtual]
 

Reimplemented in LightGeom.

void Geom::Render RenderOptions opt  )  [virtual]
 

Reimplemented in BoxGeom, CylinderGeom, DomeGeom, FrustrumGeom, PlaneGeom, PrismGeom, RayGeom, RoadGeom, SphereGeom, TerrainGeom, and WheelGeom.

void Geom::PostRender RenderOptions opt  )  [virtual]
 

Reimplemented in LightGeom.

void Geom::RenderSkin RenderOptions opt  ) 
 

Render the skin (should be called at rendering stage).


Member Data Documentation

int Geom::renderOrder
 

bool Geom::transparency [protected]
 

float Geom::laser [protected]
 

float Geom::retro [protected]
 

int Geom::fiducial [protected]
 

GLfloat Geom::colorDiffuse[4] [protected]
 

GLfloat Geom::colorAmbient[4] [protected]
 

GLfloat Geom::colorSpecular[4] [protected]
 

GLfloat Geom::colorEmission[4] [protected]
 

GLfloat Geom::shininess [protected]
 

GzImage* Geom::textureImage [protected]
 

Texture image (for 2D textures).

GzVector Geom::textureSize [protected]
 

Texture scale (image will map onto a road patch with the given dimensions).

int Geom::pick [protected]
 

bool Geom::dirty [protected]
 

Rengerate display list (true/false).


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

Last updated 12 September 2005 21:38:45