jv.vecmath
Class P_Vector
- java.lang.Object
-
- jv.vecmath.P_Vector
-
- All Implemented Interfaces:
- java.io.Serializable
public abstract class P_Vector extends java.lang.Object implements java.io.SerializableAbstract base class for linear algebra vectors allowing to tag individual vectors.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 16.07.12, 2.10 revised (fk) Memory efficiency: Moved names/bits to attribute class to save 1 pointer
when names/bits are unused (such as tex coords, vector field, other big arrays...).
05.10.05, 2.00 revised (kp) Handling of bits changed from arbitrary length array to single int.
03.07.04, 1.20 revised (kp) New methods to handle detail text.
18.04.03, 1.15 revised (kp) Unused instance variable m_constraint removed.
21.06.00, 1.10 revised (kp) Optional array with constraint indices added.
00.00.97, 1.00 created (kp)
-
-
Constructor Summary
Constructors Constructor and Description P_Vector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclearTag(int aBit)Clears a single bit.java.lang.Objectclone()Clone object and all instance variables.static P_Vector[]clone(P_Vector[] src)Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners.static P_Vector[][]clone(P_Vector[][] src)Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners.voidcopy(P_Vector vec)Copies the attribute set of another vector.longgetBits()Get integer array with bits.java.lang.StringgetDetail()Get longer detail text of vector.java.lang.StringgetName()Get name of vector.java.lang.StringgetURL()Get URL of vector.booleanhasTag(int aBit)Gets the value of a single bit.static voidinvert(java.lang.Object[] arr, int usedSize)Invert the order of the first 'usedSize' entries inside the arr, i.e. the first entry becomes the 'usedSize-1' entry.voidsetDetail(java.lang.String detail)Set longer detail text of vector, e.g. to be shown as overlay text.voidsetName(java.lang.String name)Set name of vector, e.g. to be shown in display.voidsetTag(int aBit)Sets a single bit.voidsetURL(java.lang.String url)Set name of vector, e.g. to be shown in display.java.lang.StringtoString()Create a multi-line string representation with detailed information about all instance variables.
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
Clone object and all instance variables.- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
Create a multi-line string representation with detailed information about all instance variables.- Overrides:
toStringin classjava.lang.Object
-
getDetail
public java.lang.String getDetail()
Get longer detail text of vector.- Returns:
- Detail text of vector
- Since:
- JavaView 3.29.004
- Version:
- 03.07.04, 1.00 created (kp)
-
setDetail
public void setDetail(java.lang.String detail)
Set longer detail text of vector, e.g. to be shown as overlay text. Assigning null will remove the corresponding text label.- Parameters:
detail- New detail text of vector- Since:
- JavaView 3.29.004
- Version:
- 03.07.04, 1.00 created (kp)
-
getName
public java.lang.String getName()
Get name of vector.- Returns:
- Name of vector
-
setName
public void setName(java.lang.String name)
Set name of vector, e.g. to be shown in display. Assigning null will remove the corresponding text label.- Parameters:
name- New name of vector
-
getURL
public java.lang.String getURL()
Get URL of vector.- Returns:
- URL of vector
-
setURL
public void setURL(java.lang.String url)
Set name of vector, e.g. to be shown in display. Assigning null will remove the corresponding text label.- Parameters:
url- New URL of vector
-
getBits
public long getBits()
Get integer array with bits.
-
setTag
public void setTag(int aBit)
Sets a single bit. If the bit array does not exist then it is created. If the array too small then it is enlarged.- Parameters:
aBit- the index of the bit to be set
-
clearTag
public void clearTag(int aBit)
Clears a single bit.- Parameters:
aBit- the index of the bit to be cleared
-
hasTag
public boolean hasTag(int aBit)
Gets the value of a single bit.- Parameters:
aBit- the index of the bit to be gotten
-
clone
public static P_Vector[][] clone(P_Vector[][] src)
Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set tonull.- See Also:
copy(P_Vector)- Version:
- 12.12.00, 1.10 revised (kp) Check for missing entries.
05.07.00, 1.00 created (kp)
-
clone
public static P_Vector[] clone(P_Vector[] src)
Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set tonull.- See Also:
copy(P_Vector)- Version:
- 12.12.00, 1.10 revised (kp) Check for missing entries.
05.07.00, 1.00 created (kp)
-
copy
public void copy(P_Vector vec)
Copies the attribute set of another vector.- Parameters:
vec- the vector to be copied
-
invert
public static void invert(java.lang.Object[] arr, int usedSize)Invert the order of the first 'usedSize' entries inside the arr, i.e. the first entry becomes the 'usedSize-1' entry.- Parameters:
arr- array of objects.usedSize- number of used entries- Version:
- 22.11.01, 1.00 created (kp)
-
-
"