Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.pqt.autorib.instr
Class InstrAppendParam  view InstrAppendParam download InstrAppendParam.java

java.lang.Object
  extended byorg.pqt.autorib.instr.InstrRequest
      extended byorg.pqt.autorib.instr.InstrAppendParam

public class InstrAppendParam
extends InstrRequest

class to handle instruction to append a parameter to a shader. It also contains a number of static utility functions which are called by the various map creating instructions (e.g shadowdist) to append map names etc to objects


Field Summary
private  java.lang.String name
          name of the parameter to replace
private  java.lang.String shaderType
           
private  java.lang.String type
          the type ('uniform float' etc) needed for the Declare
private  org.pqt.autorib.tokenizer.Token value
          new value of the parameter
 
Fields inherited from class org.pqt.autorib.instr.InstrRequest
requestID, requestName
 
Constructor Summary
InstrAppendParam()
           
InstrAppendParam(InstrWReader in)
           
 
Method Summary
static void conditionalFileNameAppend(org.pqt.autorib.rib.RIBObjectGroup object, java.lang.String shaderType, java.lang.String paramName, java.lang.String mapName)
          A special form of doAppend which assumes the parameter is a file name if the appendMapNames option is true then the mapName is appended
static void doAppend(org.pqt.autorib.rib.RIBLight light, java.lang.String name, org.pqt.autorib.util.Point value)
          a specific do append where parameter is a point value
static void doAppend(org.pqt.autorib.rib.RIBLight light, java.lang.String name, java.lang.String value)
          a specific do append for lights where the parameter is a string, such as a shadow map name
static void doAppend(org.pqt.autorib.rib.RIBLight light, java.lang.String name, org.pqt.autorib.tokenizer.Token value, java.lang.String type)
          the general do append for lights nb - static
static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object, java.lang.String shaderType, java.lang.String paramName, org.pqt.autorib.util.Point paramValue)
          do append where the parameter is a point value nb - static
static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object, java.lang.String shaderType, java.lang.String paramName, java.lang.String paramValue)
          do an append of a string value parameter - useful for automatically adding e.g map names to shader parameters nb - static
static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object, java.lang.String shaderType, java.lang.String paramName, org.pqt.autorib.tokenizer.Token paramValue, java.lang.String paramType)
          do the append to an object shader nb.
 void process(InstrWReader rw, org.pqt.autorib.rib.RIBLight light)
          Apply this instruction to the given light
 void process(InstrWReader rw, org.pqt.autorib.rib.RIBObjectGroup object)
          Apply this instruction to an object group
 void read(InstrWReader in)
          read in the append request in the form Append type name [ value ]
 void write(java.io.Writer out)
          write out this instruction and its parameters - used for debugging only
 
Methods inherited from class org.pqt.autorib.instr.InstrRequest
checkShaderType, readRequestName, writeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shaderType

private java.lang.String shaderType

name

private java.lang.String name
name of the parameter to replace


value

private org.pqt.autorib.tokenizer.Token value
new value of the parameter


type

private java.lang.String type
the type ('uniform float' etc) needed for the Declare

Constructor Detail

InstrAppendParam

public InstrAppendParam()

InstrAppendParam

public InstrAppendParam(InstrWReader in)
                 throws java.io.IOException,
                        org.pqt.autorib.tokenizer.FormatException
Method Detail

read

public void read(InstrWReader in)
          throws java.io.IOException,
                 org.pqt.autorib.tokenizer.FormatException
read in the append request in the form Append type name [ value ]

Specified by:
read in class InstrRequest

write

public void write(java.io.Writer out)
           throws java.io.IOException
Description copied from class: InstrRequest
write out this instruction and its parameters - used for debugging only

Specified by:
write in class InstrRequest

doAppend

public static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object,
                            java.lang.String shaderType,
                            java.lang.String paramName,
                            org.pqt.autorib.tokenizer.Token paramValue,
                            java.lang.String paramType)
do the append to an object shader nb. static


doAppend

public static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object,
                            java.lang.String shaderType,
                            java.lang.String paramName,
                            java.lang.String paramValue)
do an append of a string value parameter - useful for automatically adding e.g map names to shader parameters nb - static


conditionalFileNameAppend

public static void conditionalFileNameAppend(org.pqt.autorib.rib.RIBObjectGroup object,
                                             java.lang.String shaderType,
                                             java.lang.String paramName,
                                             java.lang.String mapName)
A special form of doAppend which assumes the parameter is a file name if the appendMapNames option is true then the mapName is appended


doAppend

public static void doAppend(org.pqt.autorib.rib.RIBObjectGroup object,
                            java.lang.String shaderType,
                            java.lang.String paramName,
                            org.pqt.autorib.util.Point paramValue)
do append where the parameter is a point value nb - static


doAppend

public static void doAppend(org.pqt.autorib.rib.RIBLight light,
                            java.lang.String name,
                            org.pqt.autorib.tokenizer.Token value,
                            java.lang.String type)
the general do append for lights nb - static


doAppend

public static void doAppend(org.pqt.autorib.rib.RIBLight light,
                            java.lang.String name,
                            java.lang.String value)
a specific do append for lights where the parameter is a string, such as a shadow map name


doAppend

public static void doAppend(org.pqt.autorib.rib.RIBLight light,
                            java.lang.String name,
                            org.pqt.autorib.util.Point value)
a specific do append where parameter is a point value


process

public void process(InstrWReader rw,
                    org.pqt.autorib.rib.RIBLight light)
Description copied from class: InstrRequest
Apply this instruction to the given light

Overrides:
process in class InstrRequest

process

public void process(InstrWReader rw,
                    org.pqt.autorib.rib.RIBObjectGroup object)
Description copied from class: InstrRequest
Apply this instruction to an object group

Overrides:
process in class InstrRequest