crystalspace.jbind.impl.csgfx.shadervar
Class csShaderVariable

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.refcount.csRefCount
          extended bycrystalspace.jbind.impl.csgfx.shadervar.csShaderVariable
All Implemented Interfaces:
iPointer

public class csShaderVariable
extends csRefCount

Author:
Quentin Anciaux

Field Summary
static int COLOR
           
static int FLOAT
           
static int INT
           
static int RENDERBUFFER
           
static int TEXTURE
           
static int VECTOR2
           
static int VECTOR3
           
static int VECTOR4
           
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csShaderVariable(iPointer nPointer)
           
csShaderVariable(long name)
           
 
Method Summary
 long getName()
          Get the name of the variable.
 int getType()
          Get type of data stored.
 boolean getValue(csRGBpixel value)
          Retrieve a color.
 boolean getValue(csVector2 value)
          Retireve a csVector2.
 boolean getValue(csVector3 value)
          Retrieve a csVector3.
 boolean getValue(csVector4 value)
          Retrieve a csVector4.
 boolean getValue(iRenderBuffer value)
          Retrieve a iRenderBuffer.
 boolean getValue(iTextureHandle value)
          Retrieve a texture handle.
 boolean getValue(iTextureWrapper value)
          Retrieve a texture wrapper.
 float getValueFloat()
          Retrieve a float.
 int getValueInt()
          Retireve an int.
 void setAccessor(iShaderVariableAccessor a)
          Set an accessor to use when getting the value.
 void setType(int t)
          Set type (calling this after SetValue will cause undefined behaviour).
 boolean setValue(csRGBpixel value)
          Store a color.
 boolean setValue(csVector2 value)
          Store a csVector2.
 boolean setValue(csVector3 value)
          Store a csVector3.
 boolean setValue(csVector4 value)
          Store a csVector4.
 boolean setValue(float value)
          Store a float.
 boolean setValue(int value)
          Store an int.
 boolean setValue(iRenderBuffer value)
          Store a render buffer.
 boolean setValue(iTextureHandle value)
          Store a texture handle.
 boolean setValue(iTextureWrapper value)
          Store a texture wrapper.
 
Methods inherited from class crystalspace.jbind.impl.csutil.refcount.csRefCount
isNativePointerValidSafe, nDelete
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, equals, finalize, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INT

public static final int INT
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

COLOR

public static final int COLOR
See Also:
Constant Field Values

TEXTURE

public static final int TEXTURE
See Also:
Constant Field Values

RENDERBUFFER

public static final int RENDERBUFFER
See Also:
Constant Field Values

VECTOR2

public static final int VECTOR2
See Also:
Constant Field Values

VECTOR3

public static final int VECTOR3
See Also:
Constant Field Values

VECTOR4

public static final int VECTOR4
See Also:
Constant Field Values
Constructor Detail

csShaderVariable

public csShaderVariable(iPointer nPointer)
Parameters:
nPointer -

csShaderVariable

public csShaderVariable(long name)
Method Detail

getName

public long getName()
Get the name of the variable. Definition at line 102 of file shadervar.h. References csStringID.

Returns:

getType

public int getType()
Get type of data stored. Definition at line 94 of file shadervar.h. References VariableType.

Returns:

getValue

public boolean getValue(csVector4 value)
Retrieve a csVector4. Definition at line 172 of file shadervar.h.

Parameters:
value -
Returns:

getValue

public boolean getValue(csVector3 value)
Retrieve a csVector3. Definition at line 164 of file shadervar.h. References csVector3::Set(), csVector4::x, csVector4::y, and csVector4::z.

Parameters:
value -
Returns:

getValue

public boolean getValue(csVector2 value)
Retireve a csVector2. Definition at line 156 of file shadervar.h. References csVector2::Set(), csVector4::x, and csVector4::y.

Parameters:
value -
Returns:

getValue

public boolean getValue(iRenderBuffer value)
Retrieve a iRenderBuffer. Definition at line 148 of file shadervar.h.

Parameters:
value -
Returns:

getValue

public boolean getValue(iTextureWrapper value)
Retrieve a texture wrapper. Definition at line 140 of file shadervar.h.

Parameters:
value -
Returns:

getValue

public boolean getValue(iTextureHandle value)
Retrieve a texture handle. Definition at line 132 of file shadervar.h.

Parameters:
value -
Returns:

getValue

public boolean getValue(csRGBpixel value)
Retrieve a color. Definition at line 121 of file shadervar.h. References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, csRGBpixel::red, csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

Parameters:
value -
Returns:

getValueFloat

public float getValueFloat()
Retrieve a float. Definition at line 113 of file shadervar.h. References csVector4::x.

Returns:

getValueInt

public int getValueInt()
Retireve an int. Definition at line 105 of file shadervar.h.

Returns:

setAccessor

public void setAccessor(iShaderVariableAccessor a)
Set an accessor to use when getting the value. Definition at line 99 of file shadervar.h.

Parameters:
a -

setType

public void setType(int t)
Set type (calling this after SetValue will cause undefined behaviour). Definition at line 96 of file shadervar.h. References VariableType.

Parameters:
t -

setValue

public boolean setValue(csVector4 value)
Store a csVector4. Definition at line 255 of file shadervar.h. References csVector4::Set(), csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

Parameters:
value -
Returns:

setValue

public boolean setValue(csVector3 value)
Store a csVector3. Definition at line 246 of file shadervar.h. References csVector4::Set(), csVector3::x, csVector3::y, and csVector3::z.

Parameters:
value -
Returns:

setValue

public boolean setValue(csVector2 value)
Store a csVector2. Definition at line 237 of file shadervar.h. References csVector4::Set(), csVector2::x, and csVector2::y.

Parameters:
value -
Returns:

setValue

public boolean setValue(iRenderBuffer value)
Store a render buffer. Definition at line 229 of file shadervar.h.

Parameters:
value -
Returns:

setValue

public boolean setValue(iTextureWrapper value)
Store a texture wrapper. Definition at line 219 of file shadervar.h. References iTextureWrapper::GetTextureHandle().

Parameters:
value -
Returns:

setValue

public boolean setValue(iTextureHandle value)
Store a texture handle. Definition at line 211 of file shadervar.h.

Parameters:
value -
Returns:

setValue

public boolean setValue(csRGBpixel value)
Store a color. Definition at line 200 of file shadervar.h. References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, csRGBpixel::red, csVector4::w, csVector4::x, csVector4::y, and csVector4::z.

Parameters:
value -
Returns:

setValue

public boolean setValue(float value)
Store a float. Definition at line 191 of file shadervar.h. References csVector4::Set().

Parameters:
value -
Returns:

setValue

public boolean setValue(int value)
Store an int. Definition at line 181 of file shadervar.h. References csVector4::Set().

Parameters:
value -
Returns: