const Math::vec3 &size - Area for pinning vertices of cloth or rope body to another body.

Ptr<JointParticles>cast(const Ptr<Joint> &joint)

Casts a JointCylindrical out of the Joint instance.

Arguments

const Ptr<Joint> &joint - Joint instance.

Return value

JointParticles.

intgetNumParticles()

Returns the total number of pinned particles of the cloth or rope body.

Return value

The number of pinned particles.

floatgetParticleMass(intnum)

Returns the mass of the pinned particle of the cloth or rope body.

Arguments

intnum - Particle number.

Return value

Particle mass.

Math::vec3getParticlePosition(intnum)

Returns the position of the pinned particle of the cloth or rope body.

Arguments

intnum - Particle number.

Return value

Particle position.

voidsetSize(const Math::vec3 &size)

Updates a size of the area for pinning vertices of cloth or rope body to another body.

Arguments

const Math::vec3 &size - Size of the area to be pinned.

Math::vec3getSize()

Returns the current size of the area of pinned vertices of cloth or rope body to another body.

Return value

Size of the pinned area.

voidsetThreshold(floatthreshold)

Updates a threshold that determines the distance for pinning vertices of cloth or rope body to another body. If vertices are closer than the threshold, they are pinned together; otherwise, particles stay loose.

Arguments

floatthreshold - Threshold of pinning distance.

floatgetThreshold()

Returns the current threshold that determines the distance for pinning vertices of cloth or rope body to another body. If vertices are closer than the threshold, they are pinned together; otherwise, particles stay loose.

Return value

Threshold of pinning distance.

voidclearParticles()

Unpins the cloth or rope body completely.

Last update: 2018-08-10

We use cookies to ensure that we give you the best experience on our website. Click here for more information.