Robotran C Documentation
Public Member Functions | Private Member Functions | List of all members
MbsInline Class Reference

#include <MbsInline.hh>

Inheritance diagram for MbsInline:
MbsShape3D

Public Member Functions

 MbsInline (std::string cad_file, glm::vec3 const &color, MbsWorld3D *world_3d, float transparency=1.0, glm::vec3 const &trans_pos=glm::vec3(0.0f), glm::vec3 const &trans_scale=glm::vec3(1.0, 1.0, 1.0), glm::vec3 const &trans_rot=glm::vec3(0.0f), float shiny_mat=250.f, glm::vec3 const &specular_mat=glm::vec3(1.0f, 1.0f, 1.0f), const char *name="none")
 constructor More...
 
virtual ~MbsInline ()
 destructor More...
 

Private Member Functions

bool LoadSTL (std::string cad_file, glm::vec3 color)
 load a .stl file (interface) More...
 
bool LoadOBJ (std::string cad_file, std::string dir_file)
 load a .obj file (interface) More...
 

Constructor & Destructor Documentation

◆ MbsInline()

MbsInline ( std::string  cad_file,
glm::vec3 const &  color,
MbsWorld3D *  world_3d,
float  transparency = 1.0,
glm::vec3 const &  trans_pos = glm::vec3(0.0f),
glm::vec3 const &  trans_scale = glm::vec3(1.0, 1.0, 1.0),
glm::vec3 const &  trans_rot = glm::vec3(0.0f),
float  shiny_mat = 250.f,
glm::vec3 const &  specular_mat = glm::vec3(1.0f, 1.0f, 1.0f),
const char *  name = "none" 
)

constructor

Parameters
[in]cad_fileCAD file to read (with path)
[in]colorcolor of the shape (used for STL file only)
[in]world_3d3D world
[in]transparencytransparency value
[in]trans_posposition transformation to apply
[in]trans_scalescaling transformation to apply
[in]trans_rotrotation transformation to apply
[in]shiny_matshininess of the material
[in]specular_matspecular reflection of the material
[in]namename of the shape

◆ ~MbsInline()

~MbsInline ( )
virtual

destructor

Member Function Documentation

◆ LoadOBJ()

bool LoadOBJ ( std::string  cad_file,
std::string  dir_cad 
)
private

load a .obj file (interface)

Parameters
[in]cad_fileCAD file to read (with path)
[in]dir_caddirectory (for .obj and .mtl)
Returns
true if success, false otherwise

◆ LoadSTL()

bool LoadSTL ( std::string  cad_file,
glm::vec3  color 
)
private

load a .stl file (interface)

Load a STL file using the pars_stl 3rd party library and add it to this world

Parameters
[in]cad_fileCAD file to read (with path)
[in]colorthe color to give to the shape
Returns
true if success, false otherwise

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