|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.contact.Contact
Provides information about an individual point of contact between two rigid bodies.
Field Summary | |
int |
bodyIndex1
Index identifier for first rigid body. |
int |
bodyIndex2
Index identifier for second rigid body. |
double |
dist
Contact distance. |
double |
mu
Friction coefficient. |
Vector3d |
nrml
Contact normal, in the coordinate frame of the first rigid body. |
Point3d |
pnt1
Contact point, in the coordinate frame of the first rigid body. |
double |
restitution
Restitution coeffcient. |
Constructor Summary | |
Contact()
Creates a new contact object. |
|
Contact(Contact c)
Creates a new contact object that is a copy of an existing one. |
|
Contact(int body1,
int body2,
Point3d pnt1,
Vector3d nrml,
double mu,
double res)
Creates a new contact object with specific values. |
Method Summary | |
void |
set(Contact c)
Sets this contact to be a copy of an existing contact. |
void |
set(int body1,
int body2,
Point3d pnt1,
Vector3d nrml,
double mu,
double res)
Sets this contact to have specific values. |
java.lang.String |
toString()
Returns a String representation of this contact, using the default format "%g" (see toString(String) ). |
java.lang.String |
toString(NumberFormat fmt)
Returns a String representation of this contact, in which each floating point element is formated using a C printf
style as decribed by the parameter NumberFormat . |
java.lang.String |
toString(java.lang.String fmtStr)
Returns a String representation of this contact, in which each floating point element is formated using a C printf
style format string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int bodyIndex1
public int bodyIndex2
public Point3d pnt1
public Vector3d nrml
public double dist
public double mu
public double restitution
Constructor Detail |
public Contact()
public Contact(int body1, int body2, Point3d pnt1, Vector3d nrml, double mu, double res)
body1
- index number for first contacting bodybody2
- index number for second contacting bodypnt1
- contact point, in the coordinate frame of first bodynrml
- contact normal, in the coordinate frame of first body
(this quantity will be normalized).mu
- friction coefficientres
- restitution coefficientpublic Contact(Contact c)
c
- contact to be copiedMethod Detail |
public void set(int body1, int body2, Point3d pnt1, Vector3d nrml, double mu, double res)
body1
- index number for first contacting bodybody2
- index number for second contacting bodypnt1
- contact point, in the coordinate frame of first bodynrml
- contact normal, in the coordinate frame of first body
(this quantity will be normalized).mu
- friction coefficientres
- restitution coefficientpublic void set(Contact c)
c
- contact to be copiedpublic java.lang.String toString()
"%g"
(see toString(String)
).
public java.lang.String toString(java.lang.String fmtStr)
printf
style format string. For a description of the format string syntax,
see NumberFormat
.
fmtStr
- numeric format specification
public java.lang.String toString(NumberFormat fmt)
printf
style as decribed by the parameter NumberFormat
. When
called numerous times, this routine can be more efficient than
toString(String)
, because the NumberFormat
does not need to be
recreated each time from a specification string.
fmt
- numeric format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |