Add kiva_shelf to prepare for picking/grasping task
Fix uninitialized variable jointDamping/jointFriction in SDF importer Add SDF <pose> parsing in visual, inertial, collision elements. Slight improvement in TinyRender loading performance of largish meshes (30k vertices) Reduce #define MAX_SDF_BODIES to 500, due to some issue in client code, todo: figure out what the issue is. b3RobotSimAPI support SDF file loading Tiny improvement in OpenGL hardware renderer lighting, to distinguish faces without textures
This commit is contained in:
@@ -138,6 +138,7 @@ void TinyRenderObjectData::registerMeshShape(const float* vertices, int numVerti
|
||||
*/
|
||||
}
|
||||
|
||||
m_model->reserveMemory(numVertices,numIndices);
|
||||
for (int i=0;i<numVertices;i++)
|
||||
{
|
||||
m_model->addVertex(vertices[i*9],
|
||||
|
||||
@@ -76,6 +76,14 @@ void Model::loadDiffuseTexture(const char* relativeFileName)
|
||||
diffusemap_.read_tga_file(relativeFileName);
|
||||
}
|
||||
|
||||
void Model::reserveMemory(int numVertices, int numIndices)
|
||||
{
|
||||
verts_.reserve(numVertices);
|
||||
norms_.reserve(numVertices);
|
||||
uv_.reserve(numVertices);
|
||||
faces_.reserve(numIndices);
|
||||
}
|
||||
|
||||
void Model::addVertex(float x,float y,float z, float normalX, float normalY, float normalZ, float u, float v)
|
||||
{
|
||||
verts_.push_back(Vec3f(x,y,z));
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
}
|
||||
void loadDiffuseTexture(const char* relativeFileName);
|
||||
void setDiffuseTextureFromData(unsigned char* textureImage,int textureWidth,int textureHeight);
|
||||
void reserveMemory(int numVertices, int numIndices);
|
||||
void addVertex(float x,float y,float z, float normalX, float normalY, float normalZ, float u, float v);
|
||||
void addTriangle(int vertexposIndex0, int normalIndex0, int uvIndex0,
|
||||
int vertexposIndex1, int normalIndex1, int uvIndex1,
|
||||
|
||||
Reference in New Issue
Block a user