|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.beans.utils.HWMVector
public class HWMVector
Title: HWMVector
Description: This is a utility class that will perform Vector functions. A vector is the math entity denoted as ai + bj +ck , where a, b and c are the i,j and k components of the vector
Company: Altair Engineering, Inc.
Constructor Summary | |
---|---|
HWMVector()
Constructor |
|
HWMVector(double dIComp,
double dJComp,
double dKComp)
Constructor -- creates a vector with the specified coefficients for the i,j and k components |
|
HWMVector(HWMPoint hwmPoint)
Constructor -- creates the position vector for the specifeid point in space |
|
HWMVector(HWMPoint hwmPoint1,
HWMPoint hwmPoint2)
Constructor -- creates the vector between the specifeid two points in space |
Method Summary | |
---|---|
HWMVector |
Add(HWMVector hwmVector)
Add this vector to another vector |
double[] |
GetComponents()
Get the components of the vector |
HWMVector |
GetCrossProduct(HWMVector hwmVector)
Get the cross product between this vector and another vector |
double |
GetDotProduct(HWMVector hwmVector)
Get the dot product between this vector and another vector |
double |
GetMagnitude()
Get the magnitude of the vector |
HWMVector |
GetUnitVector()
Create a unit vector along the same direction represented by this vector. |
void |
Normalize()
Normalize this vector, so that the magnitude of the vector becomes unit In other words, this vector gets converted into a unit vector |
void |
readExternal(java.io.ObjectInput objInput)
Loads the version and then calls the appropriate read function for the version |
HWMVector |
Scale(double dFactor)
Scale the vector by a scalar quantity |
void |
SetComponents(double[] arrdComponents)
Set the components of the vector |
HWMVector |
Subtract(HWMVector hwmVector)
Subtract a second vector from this vector |
void |
writeExternal(java.io.ObjectOutput objOutput)
Save the persistent properties |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HWMVector()
public HWMVector(double dIComp, double dJComp, double dKComp)
dIComp
- The i-component of the vectordJComp
- The j-component of the vectordKComp
- The k-component of the vectorpublic HWMVector(HWMPoint hwmPoint)
hwmPoint
- The point whose position vector will be createdpublic HWMVector(HWMPoint hwmPoint1, HWMPoint hwmPoint2)
The
- two points used in creating the vectorMethod Detail |
---|
public void SetComponents(double[] arrdComponents) throws java.lang.ArrayIndexOutOfBoundsException
arrdComponents
- The i,j,k components of the vector
java.lang.ArrayIndexOutOfBoundsException
public double[] GetComponents()
public double GetMagnitude()
public void Normalize()
public HWMVector GetUnitVector()
public double GetDotProduct(HWMVector hwmVector)
hwmVector
- The vector with which to evaluate the dot product
public HWMVector GetCrossProduct(HWMVector hwmVector)
hwmVector
- The vector with which to evaluate the cross product
public HWMVector Add(HWMVector hwmVector)
hwmVector
- The vector with which to add
public HWMVector Subtract(HWMVector hwmVector)
hwmVector
- The vector to subtract
public HWMVector Scale(double dFactor)
dFactor
- The factor to scale the vector by
public void writeExternal(java.io.ObjectOutput objOutput) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
objOutput
- The stream to which data will be written
java.io.IOException
public void readExternal(java.io.ObjectInput objInput) throws java.lang.ClassNotFoundException, java.io.IOException
readExternal
in interface java.io.Externalizable
objInput
- The stream from which data will be read
IOException,
- ClassNotFoundException
java.lang.ClassNotFoundException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |