class MClothParticle

Jump to documentation

Interface for cloth particle.

public members:

MClothParticle ()
virtual ~MClothParticle ()
virtual MPoint getPosition ( MStatus * ReturnStatus = NULL ) const
virtual void setPosition ( const MPoint &position, MStatus * ReturnStatus = NULL )
virtual MVector getVelocity ( MStatus * ReturnStatus = NULL ) const
virtual void setVelocity ( const MVector &velocity, MStatus * ReturnStatus = NULL )
virtual MVector getAccelaration ( MStatus * ReturnStatus = NULL ) const
virtual void setAccelaration ( const MVector &acc, MStatus * ReturnStatus = NULL )
virtual MClothEdge * getEdge ( unsigned int index, MStatus * ReturnStatus = NULL ) const
virtual unsigned int numEdges ( MStatus * ReturnStatus = NULL ) const
virtual bool ignoreSolid ( MStatus * ReturnStatus = NULL ) const
virtual void ignoreSolid ( bool isIgnored, MStatus * ReturnStatus = NULL )
virtual bool ignoreClothCollision ( MStatus * ReturnStatus = NULL ) const
virtual void ignoreClothCollision ( bool isIgnored, MStatus * ReturnStatus = NULL )
virtual double getMass ( MStatus * ReturnStatus = NULL ) const
virtual double getOriginalMass ( MStatus * ReturnStatus = NULL ) const
virtual void setMass ( const double mass, MStatus * ReturnStatus = NULL )
virtual void setForceMultiplier ( const double forceMultiplier, MStatus * ReturnStatus = NULL )
virtual MClothMaterial * getMaterial ( MStatus * ReturnStatus = NULL ) const
virtual unsigned getIndex () const
virtual bool equals ( MClothParticle *other) const
bool collideWithPolyhedron ( MClothPolyhedron *poly = NULL )

Documentation

Interface for cloth particle.
Description

This class provides interface for cloth particle system. Cloth solver writers should derive their particle class from this class. Common convenience methods are available.

Functions

MClothParticle:: MClothParticle ()

Description

Class constructor.

MClothParticle:: ~MClothParticle ()

Description

Class destructor.

bool MClothParticle:: equals ( MClothParticle *particle) const

Description

Compares the two cloth particle objects.

Arguments

  • other The particle to compare.

Return Value

  • A boolean true or false.

MPoint MClothParticle:: getPosition ( MStatus * ReturnStatus ) const

Description

This method returns vertex position of this particle.

Arguments

  • ReturnStatus Status code.

Return Value

  • A MPoint instance.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: setPosition ( const MPoint &position, MStatus * ReturnStatus )

Description

This method sets vertex position of this particle.

Arguments

  • position The position to set.
  • ReturnStatus Status code.

Return Value

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MVector MClothParticle:: getVelocity ( MStatus * ReturnStatus ) const

Description

This method returns vertex velocity of this particle.

Arguments

  • ReturnStatus Status code.

Return Value

  • A MVector instance.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: setVelocity ( const MVector &velocity, MStatus * ReturnStatus )

Description

This method sets vertex velocity of this particle.

Arguments

  • velocity The velocity to set.
  • ReturnStatus Status code.

Return Value

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MVector MClothParticle:: getAccelaration ( MStatus * ReturnStatus ) const

Description

This method returns vertex acceleration of this particle.

Arguments

  • ReturnStatus Status code.

Return Value

  • A MVector instance.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: setAccelaration ( const MVector &accelaration, MStatus * ReturnStatus )

Description

This method sets vertex acceleration of this particle.

Arguments

  • acceleration The acceleration to set.
  • ReturnStatus Status code.

Return Value

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MClothEdge * MClothParticle:: getEdge ( unsigned int index, MStatus * ReturnStatus ) const

Description

This method returns edge associated with this particle for a given index.

Arguments

  • index The edge index.
  • ReturnStatus Status code.

Return Value

  • Cloth Edge.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

unsigned int MClothParticle:: numEdges ( MStatus * ReturnStatus ) const

Description

This method returns number of edges this particle is associated with.

Arguments

  • ReturnStatus Status code.

Return Value

  • The number of edges associated with this particle.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

bool MClothParticle:: ignoreSolid ( MStatus * ReturnStatus ) const

Description

Determines whether the Cloth to MClothPolyhedron collision can be ignored for this particle.

Arguments

  • ReturnStatus Status code

Return Value

  • true The cloth collision objects can be ignored for this particle
  • false The cloth collision objects can not be ignored for this particle

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: ignoreSolid ( bool isIgnored, MStatus * ReturnStatus )

Description

This method sets whether the Cloth to MClothPolyhedron collision can be ignored for this particle.

Arguments

  • isIgnored If true then then collision must be ignored for this particle.
  • ReturnStatus Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

bool MClothParticle:: ignoreClothCollision ( MStatus * ReturnStatus ) const

Description

Determines whether the Cloth to Cloth collision can be ignored for this particle.

Arguments

  • ReturnStatus Status code

Return Value

  • true The cloth to cloth collision can be ignored for this particle
  • false The cloth to cloth collision can not be ignored for this particle

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: ignoreClothCollision ( bool isIgnored, MStatus * ReturnStatus )

Description

This method sets whether the Cloth to Cloth collision can be ignored for this particle.

Arguments

  • isIgnored If true then then cloth to cloth collision must be ignored for this particle.
  • ReturnStatus Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

double MClothParticle:: getMass ( MStatus * ReturnStatus ) const

Description

This method returns vertex mass of this particle, which can changed during recoil.

Arguments

  • ReturnStatus Status code.

Return Value

  • A mass of this particle.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

double MClothParticle:: getOriginalMass ( MStatus * ReturnStatus ) const

Description

This method returns vertex constant mass of this particle.

Arguments

  • ReturnStatus Status code.

Return Value

  • A mass of this particle.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: setMass ( const double mass, MStatus * ReturnStatus )

Description

This method sets vertex mass of this particle.

Arguments

  • mass The mass to set.
  • ReturnStatus Status code.

Return Value

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

void MClothParticle:: setForceMultiplier ( const double forceMultiplier, MStatus * ReturnStatus )

Description

This method sets force multiplier of this particle.

Arguments

  • mass The force multiplier to set.
  • ReturnStatus Status code.

Return Value

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MClothMaterial * MClothParticle:: getMaterial ( MStatus * ReturnStatus ) const

Description

This method returns the cloth material associated with this particle.

Arguments

  • ReturnStatus Status code.

Return Value

  • Cloth Material.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

unsigned MClothParticle:: getIndex () const

Description

This method returns index of this particle per cloth system basis. Cloth System can have multiple cloth objects and this method should return the index of particle considering all the cloth objects.

Arguments

Return Value

  • An index of this particle in cloth system.

bool MClothParticle:: collideWithPolyhedron ( MClothPolyhedron *poly )

Description

Particles can be excluded from collisions with other cloth triangles or rigid bodies. You should call this method to find out if this particle has been excluded from the solve.

Arguments

    poly - pointer to MClothPolyhedron. Allows exclusion of individual solid contacts.

Return Value

    true - if the particle should collide with the specified polyhedron (or all polyhedrons if poly == NULL).

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright