2016-06-01 05:55:13 +00:00
|
|
|
#ifndef TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
|
|
#define TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "../Importers/ImportURDFDemo/LinkVisualShapesConverter.h"
|
|
|
|
|
2016-10-19 05:05:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 05:55:13 +00:00
|
|
|
struct TinyRendererVisualShapeConverter : public LinkVisualShapesConverter
|
|
|
|
{
|
|
|
|
|
|
|
|
struct TinyRendererVisualShapeConverterInternalData* m_data;
|
|
|
|
|
|
|
|
TinyRendererVisualShapeConverter();
|
|
|
|
|
|
|
|
virtual ~TinyRendererVisualShapeConverter();
|
|
|
|
|
2016-08-11 21:55:30 +00:00
|
|
|
virtual void convertVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfModel& model, class btCollisionObject* colShape, int objectIndex);
|
2016-06-01 05:55:13 +00:00
|
|
|
|
2016-10-19 05:05:28 +00:00
|
|
|
virtual int getNumVisualShapes(int bodyUniqueId);
|
|
|
|
|
|
|
|
virtual int getVisualShapesData(int bodyUniqueId, int shapeIndex, struct b3VisualShapeData* shapeData);
|
|
|
|
|
2016-06-01 05:55:13 +00:00
|
|
|
void setUpAxis(int axis);
|
|
|
|
|
|
|
|
void resetCamera(float camDist, float pitch, float yaw, float camPosX,float camPosY, float camPosZ);
|
|
|
|
|
|
|
|
void clearBuffers(struct TGAColor& clearColor);
|
|
|
|
|
|
|
|
void resetAll();
|
|
|
|
|
2016-06-02 00:47:41 +00:00
|
|
|
void getWidthAndHeight(int& width, int& height);
|
2016-06-07 23:11:58 +00:00
|
|
|
void setWidthAndHeight(int width, int height);
|
2016-11-17 23:15:52 +00:00
|
|
|
void setLightDirection(float x, float y, float z);
|
|
|
|
|
2016-08-11 21:55:30 +00:00
|
|
|
void copyCameraImageData(unsigned char* pixelsRGBA, int rgbaBufferSizeInPixels, float* depthBuffer, int depthBufferSizeInPixels,int* segmentationMaskBuffer, int segmentationMaskSizeInPixels, int startPixelIndex, int* widthPtr, int* heightPtr, int* numPixelsCopied);
|
2016-06-02 00:47:41 +00:00
|
|
|
|
2016-06-01 05:55:13 +00:00
|
|
|
void render();
|
2016-06-01 18:04:10 +00:00
|
|
|
void render(const float viewMat[16], const float projMat[16]);
|
2016-10-20 17:56:44 +00:00
|
|
|
|
2016-11-14 15:39:34 +00:00
|
|
|
int loadTextureFile(const char* filename);
|
2016-10-20 17:56:44 +00:00
|
|
|
int registerTexture(unsigned char* texels, int width, int height);
|
|
|
|
void activateShapeTexture(int shapeUniqueId, int textureUniqueId);
|
|
|
|
void activateShapeTexture(int objectUniqueId, int jointIndex, int shapeIndex, int textureUniqueId);
|
2016-06-01 05:55:13 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|