mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
a7aed37632
pybullet/C-API, expose linear/angular damping fix some warnings (param name needs to be same in .h and .cpp) fix potential startup threading issue (args were deleted in main thread while still possibly use in child thread) fix for spinning/rolling friction in case of mixing maximal and reduced coordinate btMultiBody+btRigidBody
63 lines
2.2 KiB
C
63 lines
2.2 KiB
C
#ifndef TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
#define TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
|
|
|
|
#include "../Importers/ImportURDFDemo/LinkVisualShapesConverter.h"
|
|
|
|
|
|
|
|
|
|
struct TinyRendererVisualShapeConverter : public LinkVisualShapesConverter
|
|
{
|
|
|
|
struct TinyRendererVisualShapeConverterInternalData* m_data;
|
|
|
|
TinyRendererVisualShapeConverter();
|
|
|
|
virtual ~TinyRendererVisualShapeConverter();
|
|
|
|
virtual void convertVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfLink* linkPtr, const UrdfModel* model, class btCollisionObject* colShape, int objectIndex);
|
|
|
|
virtual int getNumVisualShapes(int bodyUniqueId);
|
|
|
|
virtual int getVisualShapesData(int bodyUniqueId, int shapeIndex, struct b3VisualShapeData* shapeData);
|
|
|
|
virtual void changeRGBAColor(int bodyUniqueId, int linkIndex, const double rgbaColor[4]);
|
|
|
|
virtual void removeVisualShape(class btCollisionObject* colObj);
|
|
|
|
void setUpAxis(int axis);
|
|
|
|
void resetCamera(float camDist, float yaw, float pitch, float camPosX,float camPosY, float camPosZ);
|
|
|
|
void clearBuffers(struct TGAColor& clearColor);
|
|
|
|
void resetAll();
|
|
|
|
void getWidthAndHeight(int& width, int& height);
|
|
void setWidthAndHeight(int width, int height);
|
|
void setLightDirection(float x, float y, float z);
|
|
void setLightColor(float x, float y, float z);
|
|
void setLightDistance(float dist);
|
|
void setLightAmbientCoeff(float ambientCoeff);
|
|
void setLightDiffuseCoeff(float diffuseCoeff);
|
|
void setLightSpecularCoeff(float specularCoeff);
|
|
void setShadow(bool hasShadow);
|
|
|
|
void copyCameraImageData(unsigned char* pixelsRGBA, int rgbaBufferSizeInPixels, float* depthBuffer, int depthBufferSizeInPixels,int* segmentationMaskBuffer, int segmentationMaskSizeInPixels, int startPixelIndex, int* widthPtr, int* heightPtr, int* numPixelsCopied);
|
|
|
|
void render();
|
|
void render(const float viewMat[16], const float projMat[16]);
|
|
|
|
int loadTextureFile(const char* filename);
|
|
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);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif //TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|