|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.property.Property net.nexttext.property.PVectorProperty
public class PVectorProperty
A PVector property of a TextObject or a Behaviour.
Note that defensive copies of the current value and and original value of the properties are always created when getting or setting the property.
Also note that every wrapper method around vector arithmetic operations will fire a property change event. Maybe we want to consider removing these wrappers to lower the event overhead.
PVector
Constructor Summary | |
---|---|
PVectorProperty(float x,
float y)
Creates a PVectorProperty from 2 float, using 0 as the z coordinate. |
|
PVectorProperty(float x,
float y,
float z)
Creates a PVectorProperty from 3 floats. |
|
PVectorProperty(processing.core.PVector value)
Constructor. |
|
PVectorProperty(processing.core.PVector original,
processing.core.PVector value)
Construct a property with specified original and future values. |
Method Summary | |
---|---|
void |
add(processing.core.PVector v1)
Wrapper around vector addition of Vector3 class |
PVectorProperty |
clone()
Get a new property with the same values as this one. |
void |
cross(processing.core.PVector v1)
Wrapper around vector cross product of Vector3 class |
float |
dot(processing.core.PVector v1)
Wrapper around vector dot product of Vector3 class |
processing.core.PVector |
get()
Returns the value of this property. |
processing.core.PVector |
getOriginal()
Returns a copy of the original value of this property |
float |
getX()
|
float |
getY()
|
float |
getZ()
|
void |
matrix(processing.core.PVector v1)
Wrapper around vector matrix product of Vector3 class |
void |
normalize()
Wrapper around vector normalization of Vector3 class |
void |
reset()
Replaces the value of this property by its original value. |
void |
rotate(float angle)
Wrapper around vector rotation of Vector3 class |
void |
scalar(float s)
Wrapper around vector scalar product of Vector3 class |
void |
set(processing.core.PVector newValue)
Sets the value of this property. |
void |
setOriginal(processing.core.PVector newValue)
Set the original value of the property. |
void |
sub(processing.core.PVector v1)
Wrapper around vector substraction of Vector3 class |
java.lang.String |
toString()
Wrapper around toString() function of Vector3 class. |
Methods inherited from class net.nexttext.property.Property |
---|
addChangeListener, getName, setName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PVectorProperty(processing.core.PVector value)
public PVectorProperty(float x, float y, float z)
public PVectorProperty(float x, float y)
public PVectorProperty(processing.core.PVector original, processing.core.PVector value)
The provided vectors are copied. This function is used for the special purpose of calculating an absolute position from the natively stored relative positions.
Method Detail |
---|
public processing.core.PVector getOriginal()
public void setOriginal(processing.core.PVector newValue)
public processing.core.PVector get()
public void set(processing.core.PVector newValue)
public void reset()
reset
in class Property
public float getX()
public float getY()
public float getZ()
public void add(processing.core.PVector v1)
public void sub(processing.core.PVector v1)
public void cross(processing.core.PVector v1)
public void matrix(processing.core.PVector v1)
public void scalar(float s)
public float dot(processing.core.PVector v1)
public void normalize()
public void rotate(float angle)
public java.lang.String toString()
toString
in class java.lang.Object
public PVectorProperty clone()
Property
The name is copied because that's what makes it a Property and not just a value.
PropertyChangeListeners are not copied to the new Property.
clone
in class Property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |