mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-06 10:28:40 +00:00
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested) 2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples 3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH) 4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048 5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED) 6) fix GripperGraspExample, model not found 7) Fix deformable anchor not attaching to multibody with object unique id of 0 8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid) 9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce 10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes 11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh 12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables) 13) fix a few premake targets 14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
64 lines
2.8 KiB
C
64 lines
2.8 KiB
C
#ifndef TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
#define TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|
|
|
|
#include "../../../Importers/ImportURDFDemo/UrdfRenderingInterface.h"
|
|
|
|
struct TinyRendererVisualShapeConverter : public UrdfRenderingInterface
|
|
{
|
|
struct TinyRendererVisualShapeConverterInternalData* m_data;
|
|
|
|
TinyRendererVisualShapeConverter();
|
|
|
|
virtual ~TinyRendererVisualShapeConverter();
|
|
|
|
virtual int convertVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfLink* linkPtr, const UrdfModel* model, int orgGraphicsUniqueId, int bodyUniqueId, struct CommonFileIOInterface* fileIO);
|
|
|
|
virtual int addVisualShape(struct b3VisualShapeData* visualShape, struct CommonFileIOInterface* fileIO, int orgGraphicsUniqueId,
|
|
int bodyUniqueId, int linkIndex);
|
|
|
|
virtual void updateShape(int shapeUniqueId, const btVector3* vertices, int numVertices);
|
|
|
|
virtual int getNumVisualShapes(int bodyUniqueId);
|
|
|
|
virtual int getVisualShapesData(int bodyUniqueId, int shapeIndex, struct b3VisualShapeData* shapeData);
|
|
|
|
virtual void changeRGBAColor(int bodyUniqueId, int linkIndex, int shapeIndex, const double rgbaColor[4]);
|
|
|
|
virtual void changeInstanceFlags(int bodyUniqueId, int linkIndex, int shapeIndex, int flags);
|
|
|
|
virtual void changeShapeTexture(int objectUniqueId, int linkIndex, int shapeIndex, int textureUniqueId);
|
|
|
|
virtual void removeVisualShape(int shapeUid);
|
|
|
|
virtual void setUpAxis(int axis);
|
|
|
|
virtual void resetCamera(float camDist, float yaw, float pitch, float camPosX, float camPosY, float camPosZ);
|
|
|
|
virtual void clearBuffers(struct TGAColor& clearColor);
|
|
|
|
virtual void resetAll();
|
|
|
|
virtual void getWidthAndHeight(int& width, int& height);
|
|
virtual void setWidthAndHeight(int width, int height);
|
|
virtual void setLightDirection(float x, float y, float z);
|
|
virtual void setLightColor(float x, float y, float z);
|
|
virtual void setLightDistance(float dist);
|
|
virtual void setLightAmbientCoeff(float ambientCoeff);
|
|
virtual void setLightDiffuseCoeff(float diffuseCoeff);
|
|
virtual void setLightSpecularCoeff(float specularCoeff);
|
|
virtual void setShadow(bool hasShadow);
|
|
virtual void setFlags(int flags);
|
|
|
|
virtual void copyCameraImageData(unsigned char* pixelsRGBA, int rgbaBufferSizeInPixels, float* depthBuffer, int depthBufferSizeInPixels, int* segmentationMaskBuffer, int segmentationMaskSizeInPixels, int startPixelIndex, int* widthPtr, int* heightPtr, int* numPixelsCopied);
|
|
|
|
virtual void render();
|
|
virtual void render(const float viewMat[16], const float projMat[16]);
|
|
|
|
virtual int loadTextureFile(const char* filename, struct CommonFileIOInterface* fileIO);
|
|
virtual int registerTexture(unsigned char* texels, int width, int height);
|
|
|
|
virtual void syncTransform(int shapeUid, const class btTransform& worldTransform, const class btVector3& localScaling);
|
|
};
|
|
|
|
#endif //TINY_RENDERER_VISUAL_SHAPE_CONVERTER_H
|