STL_obj Class Reference

#include <stl.h>

Inheritance diagram for STL_obj:

Jointgl Linkgl List of all members.

Detailed Description

Creates an OpenGL object from a STL file.

One can export a 3D object from Autocad, Catia,... in the STL text file format. For the moment the binary format is not supported.

Definition at line 57 of file stl.h.

Public Member Functions

 STL_obj ()
 Default constructor.
 STL_obj (const string &filename_, const double translation_x=0, const double translation_y=0, const double translation_z=0, const double rotation_x=0, const double rotation_y=0, const double rotation_z=0, const double scalling_x=1, const double scalling_y=1, const double scalling_z=1, const GLfloat red=0.5, const GLfloat green=0, const GLfloat blue=0)
 Constructor.
 STL_obj (const STL_obj &x)
 Constructor.
 ~STL_obj ()
 Destructor.
STL_objoperator= (const STL_obj &x)
 Overload = operator.
GLuint load_STL_TextFile ()
 Reads STL text file.
void draw_stl () const
string get_stl_file () const
 Returns filename.
double get_stl_trans_x () const
 Returns trans_x.
double get_stl_trans_y () const
 Returns trans_y.
double get_stl_trans_z () const
 Returns trans_z.
double get_stl_rot_x () const
 Returns rot_x.
double get_stl_rot_y () const
 Returns rot_x.
double get_stl_rot_z () const
 Returns rot_x.
double get_stl_scal_x () const
 Returns scal_x.
double get_stl_scal_y () const
 Returns scal_y.
double get_stl_scal_z () const
 Returns scal_z.
float get_stl_rgb_red () const
 Returns red rgb color.
float get_stl_rgb_green () const
 Returns red rgb color.
float get_stl_rgb_blue () const
 Returns red rgb color.

Private Attributes

string filename
 STL data file.
double trans_x
 Linear x translation in meter.
double trans_y
 Linear x translation in meter.
double trans_z
 Linear x translation in meter.
double rot_x
 Rotation around x axis in radian (roll).
double rot_y
 Rotation around y axis in radian (pitch).
double rot_z
 Rotation around z axis in radian (yaw).
double scal_x
 Scalling factor along x axis.
double scal_y
 Scalling factor along y axis.
double scal_z
 Scalling factor along z axis.
GLfloat rgb [3]
 Red-Green-Blue object color.
GLuint stllistName
 OpenGL list name.


Member Function Documentation

GLuint STL_obj::load_STL_TextFile (  ) 

Reads STL text file.

Returns:
OpenGL list name if everything is ok, 0 otherwise.

Definition at line 117 of file stl.cpp.

References filename, rgb, rot_x, rot_y, rot_z, scal_x, scal_y, scal_z, stllistName, trans_x, trans_y, and trans_z.

Referenced by Jointgl::create_list(), and Linkgl::create_list().


Generated on Fri Feb 9 08:52:24 2007 for GLroboop An OpenGL Robotics Object Oriented Package in C++ by  doxygen 1.5.1