Geom plugin API reference

All units, unless otherwise indicated, are specified in meters and radians. Note that mesh-, point cloud- and OC tree-handles mentioned in this reference have no direct relation with CoppeliaSim shape-, point cloud- and OC tree-handles: meshes, point cloud and octrees mentioned in this API reference are internal representations that are exclusively created, manipulated and destroyed with below API functions.
Below API functions are a sub-set of their C++ API counterpart.

simGeom.copyMesh
simGeom.copyOctree
simGeom.copyPtcloud
simGeom.createMesh
simGeom.createMeshFromSerializationData
simGeom.createOctreeFromColorPoints
simGeom.createOctreeFromMesh
simGeom.createOctreeFromOctree
simGeom.createOctreeFromPoints
simGeom.createOctreeFromSerializationData
simGeom.createPtcloudFromColorPoints
simGeom.createPtcloudFromPoints
simGeom.createPtcloudFromSerializationData
simGeom.destroyMesh
simGeom.destroyOctree
simGeom.destroyPtcloud
simGeom.getBoxBoxDistance
simGeom.getBoxPointDistance
simGeom.getBoxSegmentDistance
simGeom.getBoxTriangleDistance
simGeom.getMeshMeshCollision
simGeom.getMeshMeshDistance
simGeom.getMeshOctreeCollision
simGeom.getMeshOctreeDistance
simGeom.getMeshPointDistance
simGeom.getMeshPtcloudDistance
simGeom.getMeshSegmentCollision
simGeom.getMeshSegmentDistance
simGeom.getMeshSerializationData
simGeom.getMeshTriangleCollision
simGeom.getMeshTriangleDistance
simGeom.getOctreeOctreeCollision
simGeom.getOctreeOctreeDistance
simGeom.getOctreePointCollision
simGeom.getOctreePointDistance
simGeom.getOctreePtcloudCollision
simGeom.getOctreePtcloudDistance
simGeom.getOctreeSegmentCollision
simGeom.getOctreeSegmentDistance
simGeom.getOctreeSerializationData
simGeom.getOctreeTriangleCollision
simGeom.getOctreeTriangleDistance
simGeom.getOctreeVoxels
simGeom.getPtcloudPointDistance
simGeom.getPtcloudPoints
simGeom.getPtcloudPtcloudDistance
simGeom.getPtcloudSegmentDistance
simGeom.getPtcloudSerializationData
simGeom.getPtcloudTriangleDistance
simGeom.getSegmentPointDistance
simGeom.getSegmentSegmentDistance
simGeom.getTransformedPoints
simGeom.getTrianglePointDistance
simGeom.getTriangleSegmentDistance
simGeom.getTriangleTriangleDistance
simGeom.scaleMesh
simGeom.scaleOctree
simGeom.scalePtcloud

Mesh creation/destruction/manipulation/info

simGeom.createMesh
simGeom.destroyMesh
simGeom.copyMesh
simGeom.scaleMesh
simGeom.getMeshSerializationData
simGeom.createMeshFromSerializationData

OC-tree creation/destruction/manipulation/info

simGeom.createOctreeFromColorPoints
simGeom.createOctreeFromMesh
simGeom.createOctreeFromOctree
simGeom.createOctreeFromPoints
simGeom.destroyOctree
simGeom.copyOctree
simGeom.scaleOctree
simGeom.getOctreeSerializationData
simGeom.createOctreeFromSerializationData
simGeom.getOctreeVoxels

Point-cloud creation/destruction/manipulation/info

simGeom.createPtcloudFromColorPoints
simGeom.createPtcloudFromPoints
simGeom.destroyPtcloud
simGeom.copyPtcloud
simGeom.scalePtcloud
simGeom.getPtcloudSerializationData
simGeom.createPtcloudFromSerializationData
simGeom.getPtcloudPoints

Mesh collision detection

simGeom.getMeshMeshCollision
simGeom.getMeshOctreeCollision
simGeom.getMeshTriangleCollision
simGeom.getMeshSegmentCollision

OC-tree collision detection

simGeom.getMeshOctreeCollision
simGeom.getOctreeOctreeCollision
simGeom.getOctreePtcloudCollision
simGeom.getOctreeTriangleCollision
simGeom.getOctreeSegmentCollision
simGeom.getOctreePointCollision

Point-cloud collision detection

simGeom.getOctreePtcloudCollision

Mesh minimum distance calculation

simGeom.getMeshMeshDistance
simGeom.getMeshOctreeDistance
simGeom.getMeshPtcloudDistance
simGeom.getMeshTriangleDistance
simGeom.getMeshSegmentDistance
simGeom.getMeshPointDistance

OC-tree minimum distance calculation

simGeom.getMeshOctreeDistance
simGeom.getOctreeOctreeDistance
simGeom.getOctreePtcloudDistance
simGeom.getOctreeTriangleDistance
simGeom.getOctreeSegmentDistance
simGeom.getOctreePointDistance

Point-cloud minimum distance calculation

simGeom.getOctreePtcloudDistance
simGeom.getMeshPtcloudDistance
simGeom.getPtcloudPtcloudDistance
simGeom.getPtcloudTriangleDistance
simGeom.getPtcloudSegmentDistance
simGeom.getPtcloudPointDistance

Primitives minimum distance calculation

simGeom.getBoxBoxDistance
simGeom.getBoxTriangleDistance
simGeom.getBoxSegmentDistance
simGeom.getBoxPointDistance
simGeom.getTriangleTriangleDistance
simGeom.getTriangleSegmentDistance
simGeom.getTrianglePointDistance
simGeom.getSegmentSegmentDistance
simGeom.getSegmentPointDistance

Other API functions

simGeom.getTransformedPoints

simGeom.copyMesh

Description Duplicates a mesh object.
Lua synopsis int meshCopyHandle=simGeom.copyMesh(int meshHandle)
Lua arguments
meshHandle: the mesh object to duplicate.
Lua return value(s)
meshCopyHandle: the copy of the mesh object in case of success.
Python synopsis int meshCopyHandle=simGeom.copyMesh(int meshHandle)
See also simGeom.createMesh

simGeom.copyOctree

Description Duplicates an OC-tree object.
Lua synopsis int octreeCopyHandle=simGeom.copyOctree(int octreeHandle)
Lua arguments
octreeHandle: the OC-tree object to duplicate.
Lua return value(s)
octreeCopyHandle: the handle of the duplicated OC-tree object.
Python synopsis int octreeCopyHandle=simGeom.copyOctree(int octreeHandle)
See also

simGeom.copyPtcloud

Description Duplicates a point-cloud object.
Lua synopsis int ptcloudCopyHandle=simGeom.copyPtcloud(int ptcloudHandle)
Lua arguments
ptcloudHandle: the point-cloud object to duplicate.
Lua return value(s)
ptcloudCopyHandle: the handle of the duplicated point-cloud object.
Python synopsis int ptcloudCopyHandle=simGeom.copyPtcloud(int ptcloudHandle)
See also

simGeom.createMesh

Description Creates a mesh object.
Lua synopsis int meshHandle=simGeom.createMesh(float[] vertices,int[] indices,float[3] meshOriginPos=nil,float[4] meshOriginQuat=nil,float triangleEdgeMaxLength=0.3,int maxTrianglesInBoundingBox=8)
Lua arguments
vertices: a table with the vertices of the mesh, expressed relative to the world origin.
indices: a table with the indices of the mesh.
meshOriginPos: the transformation frame position of the mesh. Can be omitted, in which case the frame of the mesh is located at the world origin.
meshOriginQuat: the transformation frame quaternion of the mesh. Can be omitted, in which case the frame of the mesh is oriented as the world reference frame.
triangleEdgeMaxLength: the maximum triangle size used internally for efficient calculations. A smaller size usually results in faster calculations, but larger calculation structures. Can be omitted.
maxTrianglesInBoundingBox: the maximum number of triangles in leaf bounding boxes, used internally for efficient calculations. A smaller value usually results in faster calculations, but larger calculation structures. Can be omitted.
Lua return value(s)
meshHandle: the handle to the mesh object in case of success.
Python synopsis int meshHandle=simGeom.createMesh(list vertices,list indices,list meshOriginPos=None,list meshOriginQuat=None,float triangleEdgeMaxLength=0.3,int maxTrianglesInBoundingBox=8)
See also simGeom.destroyMesh, simGeom.copyMesh, simGeom.createMeshFromSerializationData

simGeom.createMeshFromSerializationData

Description Creates a mesh object based on serialization data.
Lua synopsis int meshHandle=simGeom.createMeshFromSerializationData(buffer serializationData)
Lua arguments
serializationData: the serialization data previously generated with simGeom.getMeshSerializationData.
Lua return value(s)
meshHandle: the handle of the created mesh.
Python synopsis int meshHandle=simGeom.createMeshFromSerializationData(bytes serializationData)
See also simGeom.getMeshSerializationData

simGeom.createOctreeFromColorPoints

Description Creates an OC-tree object from several points with individual colors and individual user data.
Lua synopsis int octreeHandle=simGeom.createOctreeFromColorPoints(float[] points,float[3] octreeOriginPos=nil,float[4] octreeOriginQuat=nil,float cellS=0.05,int[] rgbData=nil,int[] usrData=nil)
Lua arguments
points: a table with point data, expressed relative to the world origin.
octreeOriginPos: the transformation frame position of the OC-tree. Can be omitted, in which case the frame of the OC-tree is located at the world origin.
octreeOriginQuat: the transformation frame quaternion of the OC-tree. Can be omitted, in which case the frame orientation of the OC-tree is same as the world origin.
cellS: The desired OC-tree voxel size. Can be omitted.
rgbData: the RGB colors (0-255)of the various points (i.e. one color per point). Can be omitted.
usrData: the user data of the various points (i.e. one user data per point). Can be omitted.
Lua return value(s)
octreeHandle: the handle of the created OC-tree object.
Python synopsis int octreeHandle=simGeom.createOctreeFromColorPoints(list points,list octreeOriginPos=None,list octreeOriginQuat=None,float cellS=0.05,list rgbData=None,list usrData=None)
See also simGeom.createOctreeFromPoints, simGeom.createOctreeFromMesh, simGeom.createOctreeFromOctree, simGeom.destroyOctree, simGeom.copyOctree, simGeom.createOctreeFromSerializationData

simGeom.createOctreeFromMesh

Description Creates an OC-tree object from a mesh object.
Lua synopsis int octreeHandle=simGeom.createOctreeFromMesh(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] octreeOriginPos=nil,float[4] octreeOriginQuat=nil,float cellS=0.05,int[3] rgbData=nil,int usrData=0)
Lua arguments
meshHandle: the mesh object.
meshPos: the position of the mesh object.
meshQuat: the quaternion of the mesh object.
octreeOriginPos: the transformation frame position of the OC-tree. Can be omitted, in which case the frame of the OC-tree is located at the world origin.
octreeOriginQuat: the transformation frame quaternion of the OC-tree. Can be omitted, in which case the frame orientation of the OC-tree is same as the world origin.
cellS: The desired OC-tree voxel size. Can be omitted.
rgbData: the RGB color (0-255) of the generated voxels. Can be omitted.
usrData: the user data of the generated voxels. Can be omitted.
Lua return value(s)
octreeHandle: the handle of the created OC-tree object.
Python synopsis int octreeHandle=simGeom.createOctreeFromMesh(int meshHandle,list meshPos,list meshQuat,list octreeOriginPos=None,list octreeOriginQuat=None,float cellS=0.05,list rgbData=None,int usrData=0)
See also simGeom.createOctreeFromPoints,simGeom.createOctreeFromColorPoints, simGeom.createOctreeFromOctree, simGeom.destroyOctree, simGeom.copyOctree, simGeom.createOctreeFromSerializationData

simGeom.createOctreeFromOctree

Description Creates an OC-tree object from another OC-tree object.
Lua synopsis int newOctreeHandle=simGeom.createOctreeFromOctree(int octreeHandle,float[3] octreepos,float[4] octreeQuat,float[3] newOctreeOriginPos=nil,float[4] newOctreeOriginQuat=nil,float newOctreeCellS=0.05,int[3] rgbData=nil,int usrData=0)
Lua arguments
octreeHandle: the handle to the OC-tree object.
octreePos: the position of the OC-tree object.
octreeQuat: the quaternion of the OC-tree object.
newOctreeOriginPos: the transformation frame position of the new OC-tree. Can be omitted, in which case the frame of the new OC-tree is located at the world origin.
newOctreeOriginQuat: the transformation frame quaternion of the new OC-tree. Can be omitted, in which case the frame orientation of the new OC-tree is same as the world origin.
newOctreeCellS: The desired OC-tree voxel size. Can be omitted.
rgbData: the RGB color (0-255) of the generated voxels. Can be omitted.
usrData: the user data of the generated voxels. Can be omitted.
Lua return value(s)
newOctreeHandle: the handle of the new OC-tree object.
Python synopsis int newOctreeHandle=simGeom.createOctreeFromOctree(int octreeHandle,list octreepos,list octreeQuat,list newOctreeOriginPos=None,list newOctreeOriginQuat=None,float newOctreeCellS=0.05,list rgbData=None,int usrData=0)
See also simGeom.createOctreeFromPoints,simGeom.createOctreeFromColorPoints, simGeom.createOctreeFromMesh, simGeom.destroyOctree, simGeom.copyOctree, simGeom.createOctreeFromSerializationData

simGeom.createOctreeFromPoints

Description Creates an OC-tree object from several points.
Lua synopsis int octreeHandle=simGeom.createOctreeFromPoints(float[] points,float[3] octreeOriginPos=nil,float[4] octreeOriginQuat=nil,float cellS=0.05,int[] rgbData=nil,int usrData=0)
Lua arguments
points: an table with point data, expressed relative to the world origin.
octreeOriginPos: the transformation frame position of the OC-tree. Can be omitted, in which case the frame position of the OC-tree is located at the world origin.
octreeOriginQuat: the transformation frame quaternion of the OC-tree. Can be omitted, in which case the frame orientation of the OC-tree is same as the world origin.
cellS: The desired OC-tree voxel size. Can be omitted.
rgbData: the RGB color (0-255) of the generated voxels. Can be omitted.
usrData: the user data of the generated voxels. Can be omitted.
Lua return value(s)
octreeHandle: the handle of the created OC-tree object.
Python synopsis int octreeHandle=simGeom.createOctreeFromPoints(list points,list octreeOriginPos=None,list octreeOriginQuat=None,float cellS=0.05,list rgbData=None,int usrData=0)
See also simGeom.createOctreeFromColorPoints, simGeom.createOctreeFromMesh, simGeom.createOctreeFromOctree, simGeom.destroyOctree, simGeom.copyOctree, simGeom.createOctreeFromSerializationData

simGeom.createOctreeFromSerializationData

Description Creates an OC-tree object based on serialization data.
Lua synopsis int octreeHandle=simGeom.createOctreeFromSerializationData(buffer serializationData)
Lua arguments
serializationData: the serialization data previously generated with simGeom.getOctreeSerializationData.
Lua return value(s)
octreeHandle: the handle to the created OC-tree object.
Python synopsis int octreeHandle=simGeom.createOctreeFromSerializationData(bytes serializationData)
See also simGeom.getOctreeSerializationData

simGeom.createPtcloudFromColorPoints

Description Creates a point-cloud object from several points with individual colors.
Lua synopsis int ptcloudHandle=simGeom.createPtcloudFromColorPoints(float[] points,float[3] ptcloudOriginPos=nil,float[4] ptcloudOriginQuat=nil,float cellS=0.05,int maxPointCnt=20,int[] rgbData=nil,float proximityTol=0.005)
Lua arguments
points: a table with point data, expressed relative to the world origin.
ptcloudOriginPos: the transformation frame position of the point-cloud. Can be omitted, in which case the frame of the point-cloud is located at the world origin.
ptcloudOriginQuat: the transformation frame quaternion of the point-cloud. Can be omitted, in which case the frame orientation of the point-cloud is same as the world origin.
cellS: The desired voxel size of the underlying OC-tree. Can be omitted.
maxPointCnt: The maximum amount of points inside of a OC-tree voxel. Can be omitted.
rgbData: the RGB color (0-255) of the generated points. Specify one color per point. Can be omitted.
proximityTol: the distance tolerance to other points (i.e. point-point distances below the specified value are not permitted and points will be omitted). Can be omitted.
Lua return value(s)
ptcloudHandle: the handle to the created point-cloud object.
Python synopsis int ptcloudHandle=simGeom.createPtcloudFromColorPoints(list points,list ptcloudOriginPos=None,list ptcloudOriginQuat=None,float cellS=0.05,int maxPointCnt=20,list rgbData=None,float proximityTol=0.005)
See also simGeom.createPtcloudFromPoints, simGeom.destroyPtcloud, simGeom.copyPtcloud, simGeom.createPtcloudFromSerializationData

simGeom.createPtcloudFromPoints

Description Creates a point-cloud object from several points.
Lua synopsis int ptcloudHandle=simGeom.createPtcloudFromPoints(float[] points,float[3] ptcloudOriginPos=nil,float[4] ptcloudOriginQuat=nil,float cellS=0.05,int maxPointCnt=20,int[3] rgbData=nil,float proximityTol=0.005)
Lua arguments
points: a table with point data, expressed relative to the world origin.
ptcloudOriginPos: the transformation frame position of the point-cloud. Can be omitted, in which case the frame of the point-cloud is located at the world origin.
ptcloudOriginQuat: the transformation frame quaternion of the point-cloud. Can be omitted, in which case the frame orientation of the point-cloud is same as the world origin.
cellS: The desired voxel size of the underlying OC-tree. Can be omitted.
maxPointCnt: The maximum amount of points inside of a OC-tree voxel. Can be omitted.
rgbData: the RGB color (0-255) of the generated points. Can be omitted.
proximityTol: the distance tolerance to other points (i.e. point-point distances below the specified value are not permitted and points will be omitted). Can be omitted.
Lua return value(s)
ptcloudHandle: the handle to the created point-cloud object.
Python synopsis int ptcloudHandle=simGeom.createPtcloudFromPoints(list points,list ptcloudOriginPos=None,list ptcloudOriginQuat=None,float cellS=0.05,int maxPointCnt=20,list rgbData=None,float proximityTol=0.005)
See also simGeom.createPtcloudFromColorPoints, simGeom.destroyPtcloud, simGeom.copyPtcloud, simGeom.createPtcloudFromSerializationData

simGeom.createPtcloudFromSerializationData

Description Creates a point-cloud object based on serialization data.
Lua synopsis int ptcloudHandle=simGeom.createPtcloudFromSerializationData(buffer serializationData)
Lua arguments
serializationData: the serialization data previously generated with simGeom.getPtcloudSerializationData.
Lua return value(s)
ptcloudHandle: the handle of the created point-cloud.
Python synopsis int ptcloudHandle=simGeom.createPtcloudFromSerializationData(bytes serializationData)
See also simGeom.getPtcloudSerializationData

simGeom.destroyMesh

Description Destroys a mesh object.
Lua synopsis simGeom.destroyMesh(int meshHandle)
Lua arguments
meshHandle: the handle of the mesh object.
Lua return value(s)
Python synopsis simGeom.destroyMesh(int meshHandle)
See also simGeom.createMesh

simGeom.destroyOctree

Description Destroys an OC-tree object.
Lua synopsis simGeom.destroyOctree(int octreeHandle)
Lua arguments
octreeHandle: the handle of the OC-tree object.
Lua return value(s)
Python synopsis simGeom.destroyOctree(int octreeHandle)
See also simGeom.createOctreeFromPoints

simGeom.destroyPtcloud

Description Destroys a point-cloud object.
Lua synopsis simGeom.destroyPtcloud(int ptcloudHandle)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
Lua return value(s)
Python synopsis simGeom.destroyPtcloud(int ptcloudHandle)
See also simGeom.createPtcloudFromPoints

simGeom.getBoxBoxDistance

Description Computes the minimum distance between two cuboids.
Lua synopsis float distance,float[3] distSegPt1,float[3] distSegPt2=simGeom.getBoxBoxDistance(float[3] box1Pos,float[4] box1Quat,float[3] box1HalfSize,float[3] box2Pos,float[4] box2Quat,float[3] box2HalfSize,bool boxesAreSolid,bool altRoutine=false)
Lua arguments
box1Pos: the position of the first cuboid.
box1Quat: the quaternion of the first cuboid.
box1HalfSize: the half-size of the first cuboid.
box2Pos: the position of the second cuboid.
box2Quat: the quaternion of the second cuboid.
box2HalfSize: the half-size of the second cuboid.
boxesAreSolid: whether the two cuboids are solid. If true, then cuboid A being fully encompassed by cuboid B will always lead to a distance of zero between the two cuboids.
altRoutine: if true, an alternative calculation routine will be used. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities.
distSegPt1: the minimum distance point on the first cuboid.
distSegPt2: the minimum distance point on the second cuboid.
Python synopsis float distance,list distSegPt1,list distSegPt2=simGeom.getBoxBoxDistance(list box1Pos,list box1Quat,list box1HalfSize,list box2Pos,list box2Quat,list box2HalfSize,bool boxesAreSolid,bool altRoutine=False)
See also simGeom.getBoxTriangleDistance, simGeom.getBoxSegmentDistance, simGeom.getBoxPointDistance

simGeom.getBoxPointDistance

Description Computes the minimum distance between a cuboid and a point.
Lua synopsis float distance,float[3] boxDistSegPt=simGeom.getBoxPointDistance(float[3] boxPos,float[3] boxQuat,float[3] boxHalfSize,bool boxIsSolid,float[3] point)
Lua arguments
boxPos: the position of the cuboid.
boxQuat: the quaternion of the cuboid.
boxHalfSize: the half-size of the cuboid.
boxIsSolid: whether the cuboid is solid. If true, then the point being fully encompassed by the cuboid will always lead to a distance of zero.
point: position of the point.
Lua return value(s)
distance: the minimum distance between the two entities.
boxDistSegPt: the minimum distance point on the cuboid.
Python synopsis float distance,list boxDistSegPt=simGeom.getBoxPointDistance(list boxPos,list boxQuat,list boxHalfSize,bool boxIsSolid,list point)
See also simGeom.getMeshPointDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxBoxDistance, simGeom.getBoxTriangleDistance, simGeom.getBoxSegmentDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentPointDistance

simGeom.getBoxSegmentDistance

Description Computes the minimum distance between a cuboid and a segment.
Lua synopsis float distance,float[3] boxDistSegPt,float[3] segmentSegPt=simGeom.getBoxSegmentDistance(float[3] boxPos,float[3] boxQuat,float[3] boxHalfSize,bool boxIsSolid,float[3] segmentEndPoint,float[3] segmentVector,bool altRoutine=false)
Lua arguments
boxPos: the position of the cuboid.
boxQuat: the quaternion of the cuboid.
boxHalfSize: the half-size of the cuboid.
boxIsSolid: whether the cuboid is solid. If true, then the segment being fully encompassed by the cuboid will always lead to a distance of zero.
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
altRoutine: if true, an alternative calculation routine will be used. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities.
boxDistSegPt: the minimum distance point on the cuboid.
segmentSegPt: the minimum distance point on the segment.
Python synopsis float distance,list boxDistSegPt,list segmentSegPt=simGeom.getBoxSegmentDistance(list boxPos,list boxQuat,list boxHalfSize,bool boxIsSolid,list segmentEndPoint,list segmentVector,bool altRoutine=False)
See also simGeom.getMeshSegmentDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxBoxDistance, simGeom.getBoxTriangleDistance, simGeom.getBoxPointDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getBoxTriangleDistance

Description Computes the minimum distance between a cuboid and a triangle.
Lua synopsis float distance,float[3] boxDistSegPt,float[3] triangleDistSegPt=simGeom.getBoxTriangleDistance(float[3] boxPos,float[3] boxQuat,float[3] boxHalfSize,bool boxIsSolid,float[3] p,float[3] v,float[3] w,bool altRoutine=false)
Lua arguments
boxPos: the position of the cuboid.
boxQuat: the quaternion of the cuboid.
boxHalfSize: the half-size of the cuboid.
boxIsSolid: whether the cuboid is solid. If true, then the triangle being fully encompassed by the cuboid will always lead to a distance of zero.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
altRoutine: if true, an alternative calculation routine will be used. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities.
boxDistSegPt: the minimum distance point on the cuboid.
triangleDistSegPt: the minimum distance point on the triangle.
Python synopsis float distance,list boxDistSegPt,list triangleDistSegPt=simGeom.getBoxTriangleDistance(list boxPos,list boxQuat,list boxHalfSize,bool boxIsSolid,list p,list v,list w,bool altRoutine=False)
See also simGeom.getMeshTriangleDistance, simGeom.getOctreeTriangleDistance, simGeom.getPtcloudTriangleDistance, simGeom.getBoxBoxDistance, simGeom.getBoxSegmentDistance, simGeom.getBoxPointDistance, simGeom.getTriangleTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance

simGeom.getMeshMeshCollision

Description Checks for collision between two mesh objects.
Lua synopsis bool collisionResult,int[2] caching,float[] intersections=simGeom.getMeshMeshCollision(int mesh1Handle,float[3] mesh1Pos,float[4] mesh1Quat,int mesh2Handle,float[3] mesh2Pos,float[4] mesh2Quat,int[2] caching=nil,bool returnIntersections=false)
Lua arguments
mesh1Handle: the handle of the first mesh object.
mesh1Pos: the position of the first mesh object.
mesh1Quat: the quaternion of the first mesh object.
mesh2Handle: the handle of the second mesh object.
mesh2Pos: the position of the second mesh object.
mesh2Quat: the quaternion of the second mesh object.
caching: a table with two values from previous collision checking between the same two entities, to speed-up calculations.
returnIntersections: whether the interference segments should be computed and returned.
Lua return value(s)
collisionResult: the collision status
caching: a table with two values that can be used to speed-up next collision checking between the same two entities (memorizes the colliding triangle in the two meshes).
intersections: the interference segments.
Python synopsis bool collisionResult,list caching,list intersections=simGeom.getMeshMeshCollision(int mesh1Handle,list mesh1Pos,list mesh1Quat,int mesh2Handle,list mesh2Pos,list mesh2Quat,list caching=None,bool returnIntersections=False)
See also simGeom.getMeshOctreeCollision, simGeom.getMeshTriangleCollision, simGeom.getMeshSegmentCollision

simGeom.getMeshMeshDistance

Description Computes the minimum distance between two mesh objects.
Lua synopsis float distance,float[3] minDistSegPt1,float[3] minDistSegPt2,int[2] caching=simGeom.getMeshMeshDistance(int mesh1Handle,float[3] mesh1Pos,float[4] mesh1Quat,int mesh2Handle,float[3] mesh2Pos,float[4] mesh2Quat,float thresholdDist=nil,int[2] caching=nil)
Lua arguments
mesh1Handle: the handle of the first mesh object.
mesh1Pos: the position of the first mesh.
mesh1Quat: the quaternion of the first mesh.
mesh2Handle: the handle of the second mesh object.
mesh2Pos: the position of the second mesh.
mesh2Quat: the quaternion of the second mesh.
thresholdDist: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
minDistSegPt1: the minimum distance point on the first mesh. nil if the distance is not smaller than the threshold distance.
minDistSegPt2: the minimum distance point on the second mesh. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list minDistSegPt1,list minDistSegPt2,list caching=simGeom.getMeshMeshDistance(int mesh1Handle,list mesh1Pos,list mesh1Quat,int mesh2Handle,list mesh2Pos,list mesh2Quat,float thresholdDist=None,list caching=None)
See also simGeom.getMeshOctreeDistance, simGeom.getMeshPtcloudDistance, simGeom.getMeshTriangleDistance, simGeom.getMeshSegmentDistance, simGeom.getMeshPointDistance

simGeom.getMeshOctreeCollision

Description Checks for collision between a mesh object and an OC-tree object.
Lua synopsis bool collisionResult,int[2] caching=simGeom.getMeshOctreeCollision(int meshHandle,float[3] meshPos,float[4] meshQuat,int octreeHandle,float[3] octreePos,float[4] octreeQuat,int[2] caching=nil)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
caching: a table with two values from previous collision checking between the same two entities, to speed-up calculations.
Lua return value(s)
collisionResult: the collision status.
caching: a table with two values that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,list caching=simGeom.getMeshOctreeCollision(int meshHandle,list meshPos,list meshQuat,int octreeHandle,list octreePos,list octreeQuat,list caching=None)
See also simGeom.getMeshMeshCollision, simGeom.getMeshTriangleCollision, simGeom.getMeshSegmentCollision, simGeom.getOctreeOctreeCollision, simGeom.getOctreePtcloudCollision, simGeom.getOctreeTriangleCollision, simGeom.getOctreeSegmentCollision, simGeom.getOctreePointCollision

simGeom.getMeshOctreeDistance

Description Computes the minimum distance between a mesh object and an OC-tree object.
Lua synopsis float distance,float[3] meshMinDistPt,float[3] ocMinDistPt,int[2] caching=simGeom.getMeshOctreeDistance(int meshHandle,float[3] meshPos,float[4] meshQuat,int octreeHandle,float[3] octreePos,float[4] octreeQuat,float thresholdDist=nil,int[2] caching=nil)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
thresholdDist: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
meshMinDistPt: the minimum distance point on the mesh. nil if the distance is not smaller than the threshold distance.
ocMinDistPt: the minimum distance point on the OC-tree. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list meshMinDistPt,list ocMinDistPt,list caching=simGeom.getMeshOctreeDistance(int meshHandle,list meshPos,list meshQuat,int octreeHandle,list octreePos,list octreeQuat,float thresholdDist=None,list caching=None)
See also simGeom.getMeshMeshDistance, simGeom.getMeshPtcloudDistance, simGeom.getMeshTriangleDistance, simGeom.getMeshSegmentDistance, simGeom.getMeshPointDistance, simGeom.getOctreeOctreeDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreeSegmentDistance, simGeom.getOctreePointDistance

simGeom.getMeshPointDistance

Description Computes the minimum distance between a mesh object and a point.
Lua synopsis float distance,float[3] meshMinDistPt,int caching=simGeom.getMeshPointDistance(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] point,float thresholdDist=nil,int caching=-1)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
point: the position of the point.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
meshMinDistPt: the minimum distance point on the mesh. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list meshMinDistPt,int caching=simGeom.getMeshPointDistance(int meshHandle,list meshPos,list meshQuat,list point,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshMeshDistance, simGeom.getMeshOctreeDistance, simGeom.getMeshPtcloudDistance, simGeom.getMeshTriangleDistance, simGeom.getMeshSegmentDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxPointDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentPointDistance

simGeom.getMeshPtcloudDistance

Description Computes the minimum distance between a mesh object and a point-cloud object.
Lua synopsis float distance,float[3] meshMinDistPt,float[3] pcMinDistPt,int[2] caching=simGeom.getMeshPtcloudDistance(int meshHandle,float[3] meshPos,float[4] meshQuat,int ptcloudHandle,float[3] pcPos,float[4] pcQuat,float thresholdDist=nil,int[2] caching=nil)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
ptcloudHandle: the handle of the point-cloud object.
pcPos: the position of the point-cloud.
pcQuat: the quaternion of the point-cloud.
thresholdDist: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
meshMinDistPt: the minimum distance point on the mesh. nil if the distance is not smaller than the threshold distance.
pcMinDistPt: the minimum distance point on the point-cloud. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list meshMinDistPt,list pcMinDistPt,list caching=simGeom.getMeshPtcloudDistance(int meshHandle,list meshPos,list meshQuat,int ptcloudHandle,list pcPos,list pcQuat,float thresholdDist=None,list caching=None)
See also simGeom.getMeshMeshDistance, simGeom.getMeshOctreeDistance, simGeom.getMeshTriangleDistance, simGeom.getMeshSegmentDistance, simGeom.getMeshPointDistance, simGeom.getOctreePtcloudDistance, simGeom.getPtcloudPtcloudDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudSegmentDistance, simGeom.getPtcloudPointDistance

simGeom.getMeshSegmentCollision

Description Checks for collision between a mesh object and a segment.
Lua synopsis bool collisionResult,int caching,float[] intersections=simGeom.getMeshSegmentCollision(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] segmentExtremity,float[3] segmentVector,int caching=-1,bool returnIntersections)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
segmentExtremity: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
caching: a values from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted or set to -1.
returnIntersections: whether the interference segments should be returned. Can be omitted.
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
intersections: the interference segments which actually represent one or more segments with zero length.
Python synopsis bool collisionResult,int caching,list intersections=simGeom.getMeshSegmentCollision(int meshHandle,list meshPos,list meshQuat,list segmentExtremity,list segmentVector,int caching=-1,bool returnIntersections)
See also simGeom.getMeshMeshCollision, simGeom.getMeshOctreeCollision, simGeom.getMeshTriangleCollision, simGeom.getOctreeSegmentCollision

simGeom.getMeshSegmentDistance

Description Computes the minimum distance between a mesh object and a segment.
Lua synopsis float distance,float[3] meshMinDistPt,float[3] segmentDistSegPt,int caching=simGeom.getMeshSegmentDistance(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] segmentEndPoint,float[3] segmentVector,float thresholdDist=nil,int caching=-1)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
meshMinDistPt: the minimum distance point on the mesh. nil if the distance is not smaller than the threshold distance.
segmentDistSegPt: the minimum distance point on the segment. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list meshMinDistPt,list segmentDistSegPt,int caching=simGeom.getMeshSegmentDistance(int meshHandle,list meshPos,list meshQuat,list segmentEndPoint,list segmentVector,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshMeshDistance, simGeom.getMeshOctreeDistance, simGeom.getMeshPtcloudDistance, simGeom.getMeshTriangleDistance, simGeom.getMeshPointDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxSegmentDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getMeshSerializationData

Description Retrieves the serialization data from a mesh object.
Lua synopsis buffer serializationData=simGeom.getMeshSerializationData(int meshHandle)
Lua arguments
meshHandle: the handle of the mesh object.
Lua return value(s)
serializationData: the serialization data.
Python synopsis bytes serializationData=simGeom.getMeshSerializationData(int meshHandle)
See also simGeom.createMeshFromSerializationData

simGeom.getMeshTriangleCollision

Description Checks for collision between a mesh object and a triangle.
Lua synopsis bool collisionResult,int caching,float[] intersections=simGeom.getMeshTriangleCollision(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] p,float[3] v,float[3] w,int caching=-1,bool returnIntersections)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
caching: a values from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted or set to -1.
returnIntersections: whether the interference segments should be returned. Can be omitted.
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
intersections: the interference segments.
Python synopsis bool collisionResult,int caching,list intersections=simGeom.getMeshTriangleCollision(int meshHandle,list meshPos,list meshQuat,list p,list v,list w,int caching=-1,bool returnIntersections)
See also simGeom.getMeshMeshCollision, simGeom.getMeshOctreeCollision, simGeom.getMeshSegmentCollision, simGeom.getOctreeTriangleCollision

simGeom.getMeshTriangleDistance

Description Computes the minimum distance between a mesh object and a triangle.
Lua synopsis float distance,float[3] meshMinDistPt,float[3] triangleMinDistPt,int caching=simGeom.getMeshTriangleDistance(int meshHandle,float[3] meshPos,float[4] meshQuat,float[3] p,float[3] v,float[3] w,float thresholdDist=nil,int caching=-1)
Lua arguments
meshHandle: the handle of the mesh object.
meshPos: the position of the mesh.
meshQuat: the quaternion of the mesh.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
meshMinDistPt: the minimum distance point on the mesh. nil if the distance is not smaller than the threshold distance.
triangleMinDistPt: the minimum distance point on the triangle. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list meshMinDistPt,list triangleMinDistPt,int caching=simGeom.getMeshTriangleDistance(int meshHandle,list meshPos,list meshQuat,list p,list v,list w,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshMeshDistance, simGeom.getMeshOctreeDistance, simGeom.getMeshPtcloudDistance, simGeom.getMeshSegmentDistance, simGeom.getMeshPointDistance, simGeom.getOctreeTriangleDistance, simGeom.getPtcloudTriangleDistance, simGeom.getBoxTriangleDistance, simGeom.getTriangleTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance

simGeom.getOctreeOctreeCollision

Description Checks for collision between two OC-tree objects.
Lua synopsis bool collisionResult,int caching=simGeom.getOctreeOctreeCollision(int oc1Handle,float[3] octree1Pos,float[4] octree1Quat,int oc2Handle,float[3] octree2Pos,float[4] octree2Quat,int[2] caching=nil)
Lua arguments
oc1Handle: handle of the first OC-tree object.
octree1Pos: the position of the first OC-tree.
octree1Pos: the quaternion of the first OC-tree.
oc2Handle: handle of the second OC-tree object.
octree2Pos: the position of the second OC-tree.
octree2Pos: the quaternion of the second OC-tree.
caching: a table with two values from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted.
Lua return value(s)
collisionResult: the collision status.
caching: a table with two values that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,int caching=simGeom.getOctreeOctreeCollision(int oc1Handle,list octree1Pos,list octree1Quat,int oc2Handle,list octree2Pos,list octree2Quat,list caching=None)
See also simGeom.getMeshOctreeCollision, simGeom.getOctreePtcloudCollision, simGeom.getOctreeTriangleCollision, simGeom.getOctreeSegmentCollision, simGeom.getOctreePointCollision

simGeom.getOctreeOctreeDistance

Description Computes the minimum distance between two OC-tree objects.
Lua synopsis float distance,float[3] oc1MinDistPt,float[3] oc2MinDistPt,int[2] caching=simGeom.getOctreeOctreeDistance(int oc1Handle,float[3] octree1Pos,float[4] octree1Quat,int oc2Handle,float[3] octree2Pos,float[4] octree2Quat,float thresholdDist=nil,int[2] caching=nil)
Lua arguments
oc1Handle: the handle of the first OC-tree object.
octree1Pos: the position of the first OC-tree.
octree1Pos: the quaternion of the first OC-tree.
oc2Handle: the handle of the second OC-tree object.
octree2Pos: the position of the second OC-tree.
octree2Pos: the quaternion of the second OC-tree.
thresholdDist: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
oc1MinDistPt: the minimum distance point on the first OC-tree. nil if the distance is not smaller than the threshold distance.
oc2MinDistPt: the minimum distance point on the second OC-tree. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list oc1MinDistPt,list oc2MinDistPt,list caching=simGeom.getOctreeOctreeDistance(int oc1Handle,list octree1Pos,list octree1Quat,int oc2Handle,list octree2Pos,list octree2Quat,float thresholdDist=None,list caching=None)
See also simGeom.getMeshOctreeDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreeSegmentDistance, simGeom.getOctreePointDistance

simGeom.getOctreePointCollision

Description Checks for collision between an OC-tree object and a point.
Lua synopsis bool collisionResult,int caching=simGeom.getOctreePointCollision(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] point,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
point: a point expressed relative to the world reference frame.
caching: a value from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted or -1.
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,int caching=simGeom.getOctreePointCollision(int octreeHandle,list octreePos,list octreeQuat,list point,int caching=-1)
See also simGeom.getMeshOctreeCollision, simGeom.getOctreeOctreeCollision, simGeom.getOctreePtcloudCollision, simGeom.getOctreeTriangleCollision, simGeom.getOctreeSegmentCollision

simGeom.getOctreePointDistance

Description Computes the minimum distance between an OC-tree object and a point.
Lua synopsis float distance,float[3] ocMinDistPt,int caching=simGeom.getOctreePointDistance(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] point,float thresholdDist=nil,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
point: the position of the point.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
ocMinDistPt: the minimum distance point on the OC-tree. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list ocMinDistPt,int caching=simGeom.getOctreePointDistance(int octreeHandle,list octreePos,list octreeQuat,list point,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshOctreeDistance, simGeom.getMeshPointDistance, simGeom.getOctreeOctreeDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxPointDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentPointDistance

simGeom.getOctreePtcloudCollision

Description Checks for collision between am OC-tree object and a point-cloud object.
Lua synopsis bool collisionResult,int caching=simGeom.getOctreePtcloudCollision(int octreeHandle,float[3] octreePos,float[4] octreeQuat,int ptcloudHandle,float[3] ptcloudPos,float[4] ptcloudQuat,int[2] caching=nil)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
ptcloudHandle: the handle of the point-cloud object.
ptcloudPos: the position of the point-cloud.
ptcloudQuat: the quaternion of the point-cloud.
caching: a table with two values from previous collision checking between the same two entities, to speed-up collision checking..
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,int caching=simGeom.getOctreePtcloudCollision(int octreeHandle,list octreePos,list octreeQuat,int ptcloudHandle,list ptcloudPos,list ptcloudQuat,list caching=None)
See also simGeom.getMeshOctreeCollision, simGeom.getOctreeOctreeCollision, simGeom.getOctreeTriangleCollision, simGeom.getOctreeSegmentCollision, simGeom.getOctreePointCollision

simGeom.getOctreePtcloudDistance

Description Computes the minimum distance between an OC-tree object and a point-cloud object.
Lua synopsis float distance,float[3] ocMinDistPt,float[3] pcMinDistPt,int[2] caching=simGeom.getOctreePtcloudDistance(int octreeHandle,float[3] octreePos,float[4] octreeQuat,int ptcloudHandle,float[3] pcPos,float[4] pcQuat,float thresholdDist=nil,int[2] caching=nil)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
ptcloudHandle: the handle of the point-cloud object.
pcPos: the position of the point-cloud.
pcQuat: the quaternion of the point-cloud.
thresholdDist: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
ocMinDistPt: the minimum distance point on the OC-tree. nil if the distance is not smaller than the threshold distance.
pcMinDistPt: the minimum distance point on the point-cloud. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list ocMinDistPt,list pcMinDistPt,list caching=simGeom.getOctreePtcloudDistance(int octreeHandle,list octreePos,list octreeQuat,int ptcloudHandle,list pcPos,list pcQuat,float thresholdDist=None,list caching=None)
See also simGeom.getMeshPtcloudDistance, simGeom.getOctreeOctreeDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreeSegmentDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudPtcloudDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudSegmentDistance, simGeom.getPtcloudPointDistance

simGeom.getOctreeSegmentCollision

Description Checks for collision between an OC-tree object and a segment.
Lua synopsis bool collisionResult,int caching=simGeom.getOctreeSegmentCollision(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] segmentExtremity,float[3] segmentVector,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
segmentExtremity: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
caching: a value from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted or -1.
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,int caching=simGeom.getOctreeSegmentCollision(int octreeHandle,list octreePos,list octreeQuat,list segmentExtremity,list segmentVector,int caching=-1)
See also simGeom.getMeshOctreeCollision, simGeom.getMeshSegmentCollision, simGeom.getOctreeOctreeCollision, simGeom.getOctreePtcloudCollision, simGeom.getOctreeTriangleCollision, simGeom.getOctreePointCollision

simGeom.getOctreeSegmentDistance

Description Computes the minimum distance between an OC-tree object and a segment.
Lua synopsis float distance,float[3] ocMinDistPt,float[3] segmentDistSegPt,int caching=simGeom.getOctreeSegmentDistance(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] segmentEndPoint,float[3] segmentVector,float thresholdDist=nil,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
ocMinDistPt: the minimum distance point on the OC-tree. nil if the distance is not smaller than the threshold distance.
segmentDistSegPt: the minimum distance point on the segment. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list ocMinDistPt,list segmentDistSegPt,int caching=simGeom.getOctreeSegmentDistance(int octreeHandle,list octreePos,list octreeQuat,list segmentEndPoint,list segmentVector,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshOctreeDistance, simGeom.getMeshSegmentDistance, simGeom.getOctreeOctreeDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxSegmentDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getOctreeSerializationData

Description Retrieves the serialization data from an OC-tree object.
Lua synopsis buffer serializationData=simGeom.getOctreeSerializationData(int octreeHandle)
Lua arguments
octreeHandle: the handle of the OC-tree object.
Lua return value(s)
serializationData: the serialization data.
Python synopsis bytes serializationData=simGeom.getOctreeSerializationData(int octreeHandle)
See also simGeom.createOctreeFromSerializationData

simGeom.getOctreeTriangleCollision

Description Checks for collision between an OC-tree object and a triangle.
Lua synopsis bool collisionResult,int caching=simGeom.getOctreeTriangleCollision(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] p,float[3] v,float[3] w,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
caching: a value from previous collision checking between the same two entities, to speed-up collision checking. Can be omitted or -1.
Lua return value(s)
collisionResult: the collision status.
caching: a value that can be used to speed-up next collision checking between the same two entities.
Python synopsis bool collisionResult,int caching=simGeom.getOctreeTriangleCollision(int octreeHandle,list octreePos,list octreeQuat,list p,list v,list w,int caching=-1)
See also simGeom.getMeshOctreeCollision, simGeom.getMeshTriangleCollision, simGeom.getOctreeOctreeCollision, simGeom.getOctreePtcloudCollision, simGeom.getOctreeSegmentCollision, simGeom.getOctreePointCollision

simGeom.getOctreeTriangleDistance

Description Computes the minimum distance between an OC-tree object and a triangle.
Lua synopsis float distance,float[3] ocMinDistPt,float[3] triangleMinDistPt,int caching=simGeom.getOctreeTriangleDistance(int octreeHandle,float[3] octreePos,float[4] octreeQuat,float[3] p,float[3] v,float[3] w,float thresholdDist=nil,int caching=-1)
Lua arguments
octreeHandle: the handle of the OC-tree object.
octreePos: the position of the OC-tree.
octreeQuat: the quaternion of the OC-tree.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted or -1.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
ocMinDistPt: the minimum distance point on the OC-tree. nil if the distance is not smaller than the threshold distance.
triangleMinDistPt: the minimum distance point on the triangle. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list ocMinDistPt,list triangleMinDistPt,int caching=simGeom.getOctreeTriangleDistance(int octreeHandle,list octreePos,list octreeQuat,list p,list v,list w,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshOctreeDistance, simGeom.getMeshTriangleDistance, simGeom.getOctreeOctreeDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeSegmentDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudTriangleDistance, simGeom.getBoxTriangleDistance, simGeom.getTriangleTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance

simGeom.getOctreeVoxels

Description Retrieves voxel data from an OC-tree.
Lua synopsis float[] posData,int[] colorData,int[] userData=simGeom.getOctreeVoxels(int octreeHandle)
Lua arguments
octreeHandle: the handle of the OC-tree object.
Lua return value(s)
posData: position data: for each voxel, there are 3 position values (XYZ).
colorData: color data: for each voxel, there are 3 color values (RGB, 0-1).
userData: user data: for each voxel, there is one user data value.
Python synopsis list posData,list colorData,list userData=simGeom.getOctreeVoxels(int octreeHandle)
See also

simGeom.getPtcloudPointDistance

Description Computes the minimum distance between a point-cloud object and a point.
Lua synopsis float distance,float[3] pcMinDistPt,int caching=simGeom.getPtcloudPointDistance(int ptcloudHandle,float[3] pcPos,float[4] pcQuat,float[3] point,float thresholdDist=nil,int caching=-1)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
pcPos: the position of the point-cloud.
pcQuat: the quaternion of the point-cloud.
point: the position of the point.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
pcMinDistPt: the minimum distance point on the point-cloud. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list pcMinDistPt,int caching=simGeom.getPtcloudPointDistance(int ptcloudHandle,list pcPos,list pcQuat,list point,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshPtcloudDistance, simGeom.getMeshPointDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudPtcloudDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxPointDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentPointDistance

simGeom.getPtcloudPoints

Description Retrieves point data from a point-cloud.
Lua synopsis float[] posData,int[] colorData=simGeom.getPtcloudPoints(int ptcloudHandle,float prop=1)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
prop: the proportion of data to retrieve, on a voxel-basis. 1 retrieves all data, 0.25 retrieves 25% of the data.
Lua return value(s)
posData: the position data: for each point, there are 3 position values (XYZ).
colorData: the color data: for each point, there are 3 color values (RGB, 0-1).
Python synopsis list posData,list colorData=simGeom.getPtcloudPoints(int ptcloudHandle,float prop=1)
See also

simGeom.getPtcloudPtcloudDistance

Description Computes the minimum distance between two point-cloud objects.
Lua synopsis float distance,float[3] pc1MinDistPt,float[3] pc2MinDistPt,int[2] caching=simGeom.getPtcloudPtcloudDistance(int pc1Handle,float[3] pc1pos,float[4] pc1Quat,int pc2Handle,float[3] pc2Pos,float[4] pc2Quat,float distanceThreshold=nil,int[2] caching)
Lua arguments
pc1Handle: the handle of the first point-cloud object.
pc1Pos: the position of the first point-cloud.
pc1Quat: the quaternion of the first point-cloud.
pc2Handle: the handle of the second point-cloud object.
pc2Pos: the position of the second point-cloud.
pc2Quat: the quaternion of the second point-cloud.
distanceThreshold: the distance threshold. Can be omitted.
caching: a table with two values from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
pc1MinDistPt: the minimum distance point on the first point-cloud. nil if the distance is not smaller than the threshold distance.
pc2MinDistPt: the minimum distance point on the second point-cloud. nil if the distance is not smaller than the threshold distance.
caching: a table with two values that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list pc1MinDistPt,list pc2MinDistPt,list caching=simGeom.getPtcloudPtcloudDistance(int pc1Handle,list pc1pos,list pc1Quat,int pc2Handle,list pc2Pos,list pc2Quat,float distanceThreshold=None,list caching)
See also simGeom.getMeshPtcloudDistance, simGeom.getOctreePtcloudDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudSegmentDistance, simGeom.getPtcloudPointDistance

simGeom.getPtcloudSegmentDistance

Description Computes the minimum distance between a point-cloud and a segment.
Lua synopsis float distance,float[3] pcMinDistPt,float[3] segmentDistSegPt,int caching=simGeom.getPtcloudSegmentDistance(int ptcloudHandle,float[3] pcPos,float[4] pcQuat,float[3] segmentEndPoint,float[3] segmentVector,float thresholdDist=nil,int caching=-1)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
pcPos: the position of the point-cloud.
pcQuat: the quaternion of the point-cloud.
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
pcMinDistPt: the minimum distance point on the point-cloud. nil if the distance is not smaller than the threshold distance.
segmentDistSegPt: the minimum distance point on the segment. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list pcMinDistPt,list segmentDistSegPt,int caching=simGeom.getPtcloudSegmentDistance(int ptcloudHandle,list pcPos,list pcQuat,list segmentEndPoint,list segmentVector,float thresholdDist=None,int caching=-1)
See also simGeom.getMeshPtcloudDistance, simGeom.getMeshSegmentDistance, simGeom.getOctreePtcloudDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudPtcloudDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxSegmentDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getPtcloudSerializationData

Description Retrieves the serialization data from a point-cloud object.
Lua synopsis buffer serializationData=simGeom.getPtcloudSerializationData(int ptcloudHandle)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
Lua return value(s)
serializationData: the serialization data.
Python synopsis bytes serializationData=simGeom.getPtcloudSerializationData(int ptcloudHandle)
See also simGeom.createPtcloudFromSerializationData

simGeom.getPtcloudTriangleDistance

Description Computes the minimum distance between a point-cloud object and a triangle.
Lua synopsis float distance,float[3] pcMinDistPt,float[3] triangleMinDistPt,int caching=simGeom.getPtcloudTriangleDistance(int ptcloudHandle,float[3] pcPos,float[4] pcQuat,float[3] p,float[3] v,float[3] w,float thresholdDist=nil,int caching=nil)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
pcPos: the position of the point-cloud.
pcQuat: the quaternion of the point-cloud.
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
thresholdDist: the distance threshold. Can be omitted.
caching: a value from previous distance calculation between the same two entities, to speed-up calculations. Can be omitted.
Lua return value(s)
distance: the minimum distance between the two entities, or if it is not smaller than the threshold distance, the threshold distance.
pcMinDistPt: the minimum distance point on the point-cloud. nil if the distance is not smaller than the threshold distance.
triangleMinDistPt: the minimum distance point on the triangle. nil if the distance is not smaller than the threshold distance.
caching: a value that can be used to speed-up next distance calculation between the same two entities. nil if the distance is not smaller than the threshold distance.
Python synopsis float distance,list pcMinDistPt,list triangleMinDistPt,int caching=simGeom.getPtcloudTriangleDistance(int ptcloudHandle,list pcPos,list pcQuat,list p,list v,list w,float thresholdDist=None,int caching=None)
See also simGeom.getMeshPtcloudDistance, simGeom.getOctreePtcloudDistance, simGeom.getPtcloudPtcloudDistance, simGeom.getPtcloudSegmentDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxTriangleDistance, simGeom.getTriangleTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance

simGeom.getSegmentPointDistance

Description Computes the minimum distance between a segment and a point.
Lua synopsis float distance,float[3] segmentDistSegPt=simGeom.getSegmentPointDistance(float[3] segmentEndPoint,float[3] segmentVector,float[3] point)
Lua arguments
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
point: position of the point
Lua return value(s)
distance: the minimum distance between the two entities.
segmentDistSegPt: the minimum distance point on the segment.
Python synopsis float distance,list segmentDistSegPt=simGeom.getSegmentPointDistance(list segmentEndPoint,list segmentVector,list point)
See also simGeom.getMeshSegmentDistance, simGeom.getMeshPointDistance, simGeom.getOctreeSegmentDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudSegmentDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxSegmentDistance, simGeom.getBoxPointDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentSegmentDistance

simGeom.getSegmentSegmentDistance

Description Computes the minimum distance between two segments.
Lua synopsis float distance,float[3] segment1DistSegPt,float[3] segment2DistSegPt=simGeom.getSegmentSegmentDistance(float[3] segment1EndPoint,float[3] segment1Vector,float[3] segment2EndPoint,float[3] segment2Vector)
Lua arguments
segment1EndPoint: position of point A on the first segment
segment1Vector: vector stretching from point A to point B on the first segment.
segment2EndPoint: position of point A on the second segment
segment2Vector: vector stretching from point A to point B on the second segment.
Lua return value(s)
distance: the minimum distance between the two entities.
segment1DistSegPt: the minimum distance point on the first segment.
segment2DistSegPt: the minimum distance point on the second segment.
Python synopsis float distance,list segment1DistSegPt,list segment2DistSegPt=simGeom.getSegmentSegmentDistance(list segment1EndPoint,list segment1Vector,list segment2EndPoint,list segment2Vector)
See also simGeom.getMeshSegmentDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxSegmentDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getTransformedPoints

Description Transforms points via a transformation matrix, or via a position and a quaternion or Euler angles.
Lua synopsis
1) float[] transformedPoints=simGeom.getTransformedPoints(float[] points,float[12] transformationMatrix)
2) float[] transformedPoints=simGeom.getTransformedPoints(float[] points,float[3] pos,float[4] quaternion)
2) float[] transformedPoints=simGeom.getTransformedPoints(float[] points,float[3] pos,float[3] eulerAngles)
Lua arguments
points: the points to transform.
transformationMatrix: a transformation matrix: 12 values (the last row of the 4x4 matrix (0,0,0,1) is not needed). The x-axis of the orientation component is (matrix[1],matrix[5],matrix[9]), the y-axis of the orientation component is (matrix[2],matrix[6],matrix[10]), the z-axis of the orientation component is (matrix[3],matrix[7],matrix[11]), and the translation component is (matrix[4],matrix[8],matrix[12]).
pos: a position.
quaternion: a quaternion.
eulerAngles: Euler angles.
Lua return value(s)
transformedPoints: the transformed points.
Python synopsis
1) list transformedPoints=simGeom.getTransformedPoints(list points,list transformationMatrix)
2) list transformedPoints=simGeom.getTransformedPoints(list points,list pos,list quaternion)
2) list transformedPoints=simGeom.getTransformedPoints(list points,list pos,list eulerAngles)
See also

simGeom.getTrianglePointDistance

Description Computes the minimum distance between a triangle and a point.
Lua synopsis float distance,float[3] triangleDistSegPt=simGeom.getTrianglePointDistance(float[3] p,float[3] v,float[3] w,float[3] point)
Lua arguments
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
point: position of the point
Lua return value(s)
distance: the minimum distance between the two entities.
triangleDistSegPt: the minimum distance point on the triangle.
Python synopsis float distance,list triangleDistSegPt=simGeom.getTrianglePointDistance(list p,list v,list w,list point)
See also simGeom.getMeshTriangleDistance, simGeom.getMeshPointDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreePointDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudPointDistance, simGeom.getBoxTriangleDistance, simGeom.getBoxPointDistance, simGeom.getTriangleTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getTriangleSegmentDistance

Description Computes the minimum distance between a triangle and a segment.
Lua synopsis float distance,float[3] triangleDistSegPt,float[3] segmentDistSegPt=simGeom.getTriangleSegmentDistance(float[3] p,float[3] v,float[3] w,float[3] segmentEndPoint,float[3] segmentVector)
Lua arguments
p: position of vertex A on the triangle.
v: vector stretching from vertex A to vertex B on the triangle.
w: vector stretching from vertex A to vertex C on the triangle.
segmentEndPoint: position of vertex A on the segment.
segmentVector: vector stretching from vertex A to vertex B on the segment.
Lua return value(s)
distance: the minimum distance between the two entities.
triangleDistSegPt: the minimum distance point on the triangle.
segmentDistSegPt: the minimum distance point on the segment.
Python synopsis float distance,list triangleDistSegPt,list segmentDistSegPt=simGeom.getTriangleSegmentDistance(list p,list v,list w,list segmentEndPoint,list segmentVector)
See also simGeom.getMeshTriangleDistance, simGeom.getMeshSegmentDistance, simGeom.getOctreeTriangleDistance, simGeom.getOctreeSegmentDistance, simGeom.getPtcloudTriangleDistance, simGeom.getPtcloudSegmentDistance, simGeom.getBoxTriangleDistance, simGeom.getBoxSegmentDistance, simGeom.getTriangleTriangleDistance, simGeom.getTrianglePointDistance, simGeom.getSegmentSegmentDistance, simGeom.getSegmentPointDistance

simGeom.getTriangleTriangleDistance

Description Computes the minimum distance between two triangles.
Lua synopsis float distance,float[3] distSegPt1,float[3] distSegPt2=simGeom.getTriangleTriangleDistance(float[3] p1,float[3] v1,float[3] w1,float[3] p2,float[3] v2,float[3] w2)
Lua arguments
p1: position of point A on triangle 1.
v1: vector stretching from point A to point B on triangle 1.
w1: vector stretching from point A to point C on triangle 1.
p2: position of point A on triangle 2.
v2: vector stretching from point A to point B on triangle 2.
w2: vector stretching from point A to point C on triangle 2.
Lua return value(s)
distance: the minimum distance between the two entities.
triangle1DistSegPt: the minimum distance point on the first triangle.
triangle2DistSegPt: the minimum distance point on the second triangle.
Python synopsis float distance,list distSegPt1,list distSegPt2=simGeom.getTriangleTriangleDistance(list p1,list v1,list w1,list p2,list v2,list w2)
See also simGeom.getMeshTriangleDistance, simGeom.getOctreeTriangleDistance, simGeom.getPtcloudTriangleDistance, simGeom.getBoxTriangleDistance, simGeom.getTriangleSegmentDistance, simGeom.getTrianglePointDistance

simGeom.scaleMesh

Description Scales a mesh object.
Lua synopsis simGeom.scaleMesh(int meshHandle,float scalingFactor)
Lua arguments
meshHandle: the handle of the mesh object.
scalingFactor: the scaling factor.
Lua return value(s)
Python synopsis simGeom.scaleMesh(int meshHandle,float scalingFactor)
See also

simGeom.scaleOctree

Description Scales an OC-tree object.
Lua synopsis simGeom.scaleOctree(int octreeHandle,float scalingFactor)
Lua arguments
octreeHandle: the handle of the OC-tree object.
scalingFactor: the scaling factor.
Lua return value(s)
Python synopsis simGeom.scaleOctree(int octreeHandle,float scalingFactor)
See also

simGeom.scalePtcloud

Description Scales a point-cloud object.
Lua synopsis simGeom.scalePtcloud(int ptcloudHandle,float scalingFactor)
Lua arguments
ptcloudHandle: the handle of the point-cloud object.
scalingFactor: the scaling factor.
Lua return value(s)
Python synopsis simGeom.scalePtcloud(int ptcloudHandle,float scalingFactor)
See also