org.ogre4j
Class ColourValue

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.ColourValue
All Implemented Interfaces:
IColourValue, INativeObject

public class ColourValue
extends NativeObject
implements IColourValue


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  ColourValue(float red, float green, float blue, float alpha)
           
  ColourValue(InstancePointer p)
          This constructor is public for internal useage only!
protected ColourValue(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  ColourValue(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 float geta()
           
 long getAsABGR()
          Retrieves colours as ABGR
 long getAsARGB()
          Retrieves colour as ARGB.
 long getAsBGRA()
          Retrieves colour as BGRA.
 long getAsRGBA()
          Retrieves colour as RGBA.
 float getb()
           
static IColourValue getBlack()
           
static IColourValue getBlue()
           
 float getg()
           
static IColourValue getGreen()
           
 void getHSB(FloatPointer hue, FloatPointer saturation, FloatPointer brightness)
          Convert the current colour to Hue, Saturation and Brightness values.
 float getr()
           
static IColourValue getRed()
           
static IColourValue getWhite()
           
static IColourValue getZERO()
           
 void operatorAddition(IColourValue returnValue, IColourValue rkVector)
           
 IColourValue operatorDecrementAndAssign(IColourValue rkVector)
           
 IColourValue operatorDivideAndAssign(float fScalar)
           
 void operatorDivision(IColourValue returnValue, float fScalar)
           
 void operatorDivision(IColourValue returnValue, IColourValue rhs)
           
 boolean operatorEqual(IColourValue rhs)
           
 IColourValue operatorIncrementAndAssign(IColourValue rkVector)
           
 float operatorIndex_const(int i)
           
 FloatPointer operatorIndex(int i)
           
 void operatorMultiplication(IColourValue returnValue, float fScalar)
           
 void operatorMultiplication(IColourValue returnValue, IColourValue rhs)
           
 IColourValue operatorMultiplyAndAssign(float fScalar)
           
 boolean operatorNotEqual(IColourValue rhs)
           
 void operatorSubtraction(IColourValue returnValue, IColourValue rkVector)
           
 FloatPointer ptr_const()
           
 FloatPointer ptr()
           
 void saturate()
          Clamps colour value to the range [0, 1].
 void saturateCopy(IColourValue returnValue)
          As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy.
 void seta(float _jni_value_)
           
 void setAsABGR(long val)
          Sets colour as ABGR.
 void setAsARGB(long val)
          Sets colour as ARGB.
 void setAsBGRA(long val)
          Sets colour as BGRA.
 void setAsRGBA(long val)
          Sets colour as RGBA.
 void setb(float _jni_value_)
           
 void setg(float _jni_value_)
           
 void setHSB(float hue, float saturation, float brightness)
          Set a colour value from Hue, Saturation and Brightness.
 void setr(float _jni_value_)
           
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

ColourValue

public ColourValue(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


ColourValue

protected ColourValue(InstancePointer p,
                      boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


ColourValue

public ColourValue(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

ColourValue

public ColourValue(float red,
                   float green,
                   float blue,
                   float alpha)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

operatorEqual

public boolean operatorEqual(IColourValue rhs)
Specified by:
operatorEqual in interface IColourValue

operatorNotEqual

public boolean operatorNotEqual(IColourValue rhs)
Specified by:
operatorNotEqual in interface IColourValue

getAsRGBA

public long getAsRGBA()
Retrieves colour as RGBA.

Specified by:
getAsRGBA in interface IColourValue

getAsARGB

public long getAsARGB()
Retrieves colour as ARGB.

Specified by:
getAsARGB in interface IColourValue

getAsBGRA

public long getAsBGRA()
Retrieves colour as BGRA.

Specified by:
getAsBGRA in interface IColourValue

getAsABGR

public long getAsABGR()
Retrieves colours as ABGR

Specified by:
getAsABGR in interface IColourValue

setAsRGBA

public void setAsRGBA(long val)
Sets colour as RGBA.

Specified by:
setAsRGBA in interface IColourValue

setAsARGB

public void setAsARGB(long val)
Sets colour as ARGB.

Specified by:
setAsARGB in interface IColourValue

setAsBGRA

public void setAsBGRA(long val)
Sets colour as BGRA.

Specified by:
setAsBGRA in interface IColourValue

setAsABGR

public void setAsABGR(long val)
Sets colour as ABGR.

Specified by:
setAsABGR in interface IColourValue

saturate

public void saturate()
Clamps colour value to the range [0, 1].

Specified by:
saturate in interface IColourValue

saturateCopy

public void saturateCopy(IColourValue returnValue)
As saturate, except that this colour value is unaffected and the saturated colour value is returned as a copy.

Specified by:
saturateCopy in interface IColourValue

operatorIndex_const

public float operatorIndex_const(int i)
Specified by:
operatorIndex_const in interface IColourValue

operatorIndex

public FloatPointer operatorIndex(int i)
Specified by:
operatorIndex in interface IColourValue

ptr

public FloatPointer ptr()
Specified by:
ptr in interface IColourValue

ptr_const

public FloatPointer ptr_const()
Specified by:
ptr_const in interface IColourValue

operatorAddition

public void operatorAddition(IColourValue returnValue,
                             IColourValue rkVector)
Specified by:
operatorAddition in interface IColourValue

operatorSubtraction

public void operatorSubtraction(IColourValue returnValue,
                                IColourValue rkVector)
Specified by:
operatorSubtraction in interface IColourValue

operatorMultiplication

public void operatorMultiplication(IColourValue returnValue,
                                   float fScalar)
Specified by:
operatorMultiplication in interface IColourValue

operatorMultiplication

public void operatorMultiplication(IColourValue returnValue,
                                   IColourValue rhs)
Specified by:
operatorMultiplication in interface IColourValue

operatorDivision

public void operatorDivision(IColourValue returnValue,
                             IColourValue rhs)
Specified by:
operatorDivision in interface IColourValue

operatorDivision

public void operatorDivision(IColourValue returnValue,
                             float fScalar)
Specified by:
operatorDivision in interface IColourValue

operatorIncrementAndAssign

public IColourValue operatorIncrementAndAssign(IColourValue rkVector)
Specified by:
operatorIncrementAndAssign in interface IColourValue

operatorDecrementAndAssign

public IColourValue operatorDecrementAndAssign(IColourValue rkVector)
Specified by:
operatorDecrementAndAssign in interface IColourValue

operatorMultiplyAndAssign

public IColourValue operatorMultiplyAndAssign(float fScalar)
Specified by:
operatorMultiplyAndAssign in interface IColourValue

operatorDivideAndAssign

public IColourValue operatorDivideAndAssign(float fScalar)
Specified by:
operatorDivideAndAssign in interface IColourValue

setHSB

public void setHSB(float hue,
                   float saturation,
                   float brightness)
Set a colour value from Hue, Saturation and Brightness.

Specified by:
setHSB in interface IColourValue

getHSB

public void getHSB(FloatPointer hue,
                   FloatPointer saturation,
                   FloatPointer brightness)
Convert the current colour to Hue, Saturation and Brightness values.

Specified by:
getHSB in interface IColourValue

getZERO

public static IColourValue getZERO()

getBlack

public static IColourValue getBlack()

getWhite

public static IColourValue getWhite()

getRed

public static IColourValue getRed()

getGreen

public static IColourValue getGreen()

getBlue

public static IColourValue getBlue()

getr

public float getr()
Specified by:
getr in interface IColourValue

setr

public void setr(float _jni_value_)
Specified by:
setr in interface IColourValue

getg

public float getg()
Specified by:
getg in interface IColourValue

setg

public void setg(float _jni_value_)
Specified by:
setg in interface IColourValue

getb

public float getb()
Specified by:
getb in interface IColourValue

setb

public void setb(float _jni_value_)
Specified by:
setb in interface IColourValue

geta

public float geta()
Specified by:
geta in interface IColourValue

seta

public void seta(float _jni_value_)
Specified by:
seta in interface IColourValue


Copyright © 2007 netAllied GmbH. All Rights Reserved.