au.edu.swin.synergy.math
Class BScalarPoint
java.lang.Object
|
+--au.edu.swin.synergy.math.BScalarPoint
- public class BScalarPoint
- extends Object
- implements Serializable, BSaveable
A point class, that uses scalars as it's
internal value...
- Author:
- Imron Alston
- Copyright Belongs To:
- team synergy 1999
- See Also:
- Serialized Form
kKeyX
public static final String kKeyX
kDefaultX
protected static final String kDefaultX
kKeyY
public static final String kKeyY
kDefaultY
protected static final String kDefaultY
BScalarPoint
public BScalarPoint(int x,
int y)
BScalarPoint
public BScalarPoint(Point point)
BScalarPoint
public BScalarPoint(BScalarPoint sPoint)
BScalarPoint
public BScalarPoint()
setLocation
public final void setLocation(Point point)
setLocation
public final void setLocation(int x,
int y)
setLocation
public final void setLocation(float x,
float y)
setX
public final void setX(float x)
setY
public final void setY(float y)
getXFloat
public final float getXFloat()
getYFloat
public final float getYFloat()
setLocation
public final void setLocation(BScalarPoint point)
setLocation
public final void setLocation(BScalarRect rect)
setXYtoWH
public final void setXYtoWH(BScalarRect rect)
setX
public final void setX(BScalarPoint pt)
setY
public final void setY(BScalarPoint pt)
incXY
public final void incXY(int x,
int y)
incXY
public final void incXY(Point pt)
decXY
public final void decXY(int x,
int y)
incXY
public final void incXY(BScalar x,
BScalar y)
incXY
public final void incXY(BScalarPoint pt)
incXY
public final void incXY(BScalarRect rect)
incX
public final void incX(BScalarPoint pt)
incY
public final void incY(BScalarPoint pt)
decX
public final void decX(BScalarPoint pt)
decY
public final void decY(BScalarPoint pt)
decY
public final void decY(int y)
incX
public final void incX(int x)
decXY
public final void decXY(BScalarPoint pt)
decXY
public final void decXY(Point pt)
decXY
public final void decXY(BScalarRect rect)
decWH
public final void decWH(BScalarRect rect)
incW
public final void incW(BScalarRect rect)
divXYByWH
public final void divXYByWH(BScalarRect rect)
div
public final void div(BScalarPoint pt)
divXByX
public final void divXByX(BScalarPoint pt)
divYByY
public final void divYByY(BScalarPoint pt)
scale
public final void scale(BScalar scale)
scale
public final void scale(BScalarPoint scale)
getLocation
public final void getLocation(Point point)
getX
public final int getX()
getY
public final int getY()
half
public final void half()
snap
public final void snap(int spacing)
toString
public final String toString()
- Overrides:
- toString in class Object
xLessThan
public boolean xLessThan(int x)
xGreaterThan
public boolean xGreaterThan(int x)
yGreaterThan
public boolean yGreaterThan(int y)
clamp
public void clamp(int min,
int max)
clamp
public void clamp(BScalarPoint pt)
load
public boolean load(BDataFile file)
- Specified by:
- load in interface BSaveable
save
public boolean save(BDataFile file)
- Specified by:
- save in interface BSaveable
equals
public boolean equals(BScalarPoint scalarPoint)
- Compare this point to another point
- Parameters:
scalarPoint
- the point to compare too- Returns:
- true if all values are equal
neg
public final void neg()
- reverses the sign of the scalar
negY
public final void negY()
- reverses the sign of the scalar