|
| | __init__ (self) |
| |
| | __init__ (self, float cellsize) |
| |
| | __init__ (self) |
| |
| | setUnit (self, float u) |
| | set the cell size, the cell space should be empty
|
| |
| | clear (self) |
| | remove all spheres
|
| |
| int | addSphere (self, vec3 p, float radius) |
| | add the sphere into the space
|
| |
| vec3 | collides (self, vec3 p, float radius) |
| | check if sphere intersects other spheres in the space
|
| |
| vec4 | sphere (self, int idx) |
| | get the sphere parameters by index
|
| |
◆ __init__() [1/3]
| coat.SphericalCollision.__init__ |
( |
| self | ) |
|
◆ __init__() [2/3]
| coat.SphericalCollision.__init__ |
( |
| self, |
|
|
float | cellsize ) |
◆ __init__() [3/3]
| coat.SphericalCollision.__init__ |
( |
| self | ) |
|
◆ addSphere()
| int coat.SphericalCollision.addSphere |
( |
| self, |
|
|
vec3 | p, |
|
|
float | radius ) |
add the sphere into the space
- Parameters
-
| p | the position |
| radius | the radius |
- Returns
- the sphere index, you may refer it later using the spher(index) function
◆ clear()
| coat.SphericalCollision.clear |
( |
| self | ) |
|
◆ collides()
| vec3 coat.SphericalCollision.collides |
( |
| self, |
|
|
vec3 | p, |
|
|
float | radius ) |
check if sphere intersects other spheres in the space
- Parameters
-
- Returns
- the repelling force, it is zero if no collision happened.
◆ setUnit()
| coat.SphericalCollision.setUnit |
( |
| self, |
|
|
float | u ) |
set the cell size, the cell space should be empty
- Parameters
-
| u | the cell size that should be approximately around the average sphere size |
◆ sphere()
| vec4 coat.SphericalCollision.sphere |
( |
| self, |
|
|
int | idx ) |
get the sphere parameters by index
- Parameters
-
| idx | the sphere index (previously returned by addSphere) |
- Returns
- the position (xyz) and radius (w) as vec4
The documentation for this class was generated from the following file: