Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GLshape Class Reference

#include <GLshape.h>

Inheritance diagram for GLshape:
Inheritance graph
[legend]

Public Member Functions

void compile ()
 
void computeAABB (const hrp::Vector3 &i_p, const hrp::Matrix33 &i_R, hrp::Vector3 &o_min, hrp::Vector3 &o_max)
 
void divideLargeTriangles (double maxEdgeLen)
 
size_t draw (int i_mode)
 
 GLshape ()
 
void highlight (bool flag)
 
void normalPerVertex (bool flag)
 
void setColors (unsigned int ncolors, const float *colors)
 
void setDiffuseColor (float r, float g, float b, float a)
 
void setNormalIndices (unsigned int len, const int *normalIndices)
 
void setNormals (unsigned int nnormal, const float *normals)
 
void setShininess (float s)
 
void setSpecularColor (float r, float g, float b)
 
void setTexture (GLtexture *texture)
 
void setTextureCoordinates (unsigned int len, const float *coordinates)
 
void setTextureCoordIndices (unsigned int len, const int *coordinates)
 
void setTriangles (unsigned int ntriangles, const int *vertexIndices)
 
void setVertices (unsigned int nvertices, const float *vertices)
 
void solid (bool flag)
 
 ~GLshape ()
 
- Public Member Functions inherited from GLcoordinates
hrp::Vector3 getPosition ()
 
void getPosition (double &x, double &y, double &z)
 
hrp::Matrix33 getRotation ()
 
void getRotation (hrp::Matrix33 &R)
 
double * getTransform ()
 
 GLcoordinates ()
 
void setPosition (double x, double y, double z)
 
template<class T >
void setPosition (const T &p)
 
void setRotation (double r, double p, double y)
 
void setRotation (double ax, double ay, double az, double th)
 
void setRotation (const hrp::Matrix33 &R)
 
void setRotation (const double *R)
 
void setTransform (const double i_trans[12])
 

Protected Member Functions

int doCompile (bool isWireFrameMode)
 

Protected Attributes

std::vector< Eigen::Vector3f > m_colors
 
float m_diffuse [4]
 
bool m_highlight
 
std::vector< intm_normalIndices
 
bool m_normalPerVertex
 
std::vector< Eigen::Vector3f > m_normals
 
bool m_requestCompile
 
int m_shadingList
 
float m_shininess
 
bool m_solid
 
float m_specular [4]
 
GLtexturem_texture
 
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > > m_textureCoordinates
 
std::vector< intm_textureCoordIndices
 
GLuint m_textureId
 
std::vector< Eigen::Vector3i > m_triangles
 
std::vector< Eigen::Vector3f > m_vertices
 
int m_wireFrameList
 
- Protected Attributes inherited from GLcoordinates
double m_trans [16]
 

Detailed Description

Definition at line 17 of file GLshape.h.

Constructor & Destructor Documentation

GLshape::GLshape ( )

Definition at line 13 of file GLshape.cpp.

GLshape::~GLshape ( )

Definition at line 20 of file GLshape.cpp.

Member Function Documentation

void GLshape::compile ( )

Definition at line 129 of file GLshape.cpp.

void GLshape::computeAABB ( const hrp::Vector3 i_p,
const hrp::Matrix33 i_R,
hrp::Vector3 o_min,
hrp::Vector3 o_max 
)

Definition at line 391 of file GLshape.cpp.

void GLshape::divideLargeTriangles ( double  maxEdgeLen)

Definition at line 281 of file GLshape.cpp.

int GLshape::doCompile ( bool  isWireFrameMode)
protected

Definition at line 134 of file GLshape.cpp.

size_t GLshape::draw ( int  i_mode)

Definition at line 30 of file GLshape.cpp.

void GLshape::highlight ( bool  flag)

Definition at line 275 of file GLshape.cpp.

void GLshape::normalPerVertex ( bool  flag)

Definition at line 89 of file GLshape.cpp.

void GLshape::setColors ( unsigned int  ncolors,
const float *  colors 
)

Definition at line 79 of file GLshape.cpp.

void GLshape::setDiffuseColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 74 of file GLshape.cpp.

void GLshape::setNormalIndices ( unsigned int  len,
const int normalIndices 
)

Definition at line 99 of file GLshape.cpp.

void GLshape::setNormals ( unsigned int  nnormal,
const float *  normals 
)

Definition at line 64 of file GLshape.cpp.

void GLshape::setShininess ( float  s)

Definition at line 264 of file GLshape.cpp.

void GLshape::setSpecularColor ( float  r,
float  g,
float  b 
)

Definition at line 269 of file GLshape.cpp.

void GLshape::setTexture ( GLtexture texture)

Definition at line 124 of file GLshape.cpp.

void GLshape::setTextureCoordinates ( unsigned int  len,
const float *  coordinates 
)

Definition at line 107 of file GLshape.cpp.

void GLshape::setTextureCoordIndices ( unsigned int  len,
const int coordinates 
)

Definition at line 116 of file GLshape.cpp.

void GLshape::setTriangles ( unsigned int  ntriangles,
const int vertexIndices 
)

Definition at line 54 of file GLshape.cpp.

void GLshape::setVertices ( unsigned int  nvertices,
const float *  vertices 
)

Definition at line 44 of file GLshape.cpp.

void GLshape::solid ( bool  flag)

Definition at line 94 of file GLshape.cpp.

Member Data Documentation

std::vector<Eigen::Vector3f> GLshape::m_colors
protected

Definition at line 44 of file GLshape.h.

float GLshape::m_diffuse[4]
protected

Definition at line 48 of file GLshape.h.

bool GLshape::m_highlight
protected

Definition at line 55 of file GLshape.h.

std::vector<int> GLshape::m_normalIndices
protected

Definition at line 47 of file GLshape.h.

bool GLshape::m_normalPerVertex
protected

Definition at line 49 of file GLshape.h.

std::vector<Eigen::Vector3f> GLshape::m_normals
protected

Definition at line 44 of file GLshape.h.

bool GLshape::m_requestCompile
protected

Definition at line 52 of file GLshape.h.

int GLshape::m_shadingList
protected

Definition at line 53 of file GLshape.h.

float GLshape::m_shininess
protected

Definition at line 48 of file GLshape.h.

bool GLshape::m_solid
protected

Definition at line 50 of file GLshape.h.

float GLshape::m_specular[4]
protected

Definition at line 48 of file GLshape.h.

GLtexture* GLshape::m_texture
protected

Definition at line 51 of file GLshape.h.

std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > GLshape::m_textureCoordinates
protected

Definition at line 45 of file GLshape.h.

std::vector<int> GLshape::m_textureCoordIndices
protected

Definition at line 47 of file GLshape.h.

GLuint GLshape::m_textureId
protected

Definition at line 54 of file GLshape.h.

std::vector<Eigen::Vector3i> GLshape::m_triangles
protected

Definition at line 46 of file GLshape.h.

std::vector<Eigen::Vector3f> GLshape::m_vertices
protected

Definition at line 44 of file GLshape.h.

int GLshape::m_wireFrameList
protected

Definition at line 53 of file GLshape.h.


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


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:52