Go to the documentation of this file.
29 #ifndef __SCRIPTTRANSLATOR_H_
30 #define __SCRIPTTRANSLATOR_H_
78 static bool getColour(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end,
ColourValue *result,
int maxEntries = 4);
84 static bool getMatrix4(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end,
Matrix4 *m);
86 static bool getInts(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end,
int *vals,
int count);
88 static bool getFloats(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end,
float *vals,
int count);
ParticleAffectorTranslator()
Class representing the state of a single texture unit during a Pass of a Technique,...
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static bool getFloats(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, float *vals, int count)
Converts the range of nodes to an array of floats and returns true if successful.
This class translates script AST (abstract syntax tree) into Ogre resources.
BuiltinScriptTranslatorManager()
Class representing a Compositor object.
TechniqueTranslator mTechniqueTranslator
CompositionPassTranslator mCompositionPassTranslator
Object representing one pass or operation in a composition sequence.
CompositionTechnique * mTechnique
void processNode(ScriptCompiler *compiler, const AbstractNodePtr &node)
Retrieves a new translator from the factories and uses it to process the give node.
CompositionTargetPassTranslator()
TextureUnitTranslator mTextureUnitTranslator
virtual size_t getNumTranslators() const
Returns the number of translators being managed.
void translateComputeProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
This class manages the builtin translators.
PassTranslator mPassTranslator
CompositionPassTranslator()
Class encapsulates rendering properties of an object.
CompositionTargetPass * mTarget
virtual ScriptTranslator * getTranslator(const AbstractNodePtr &node)
Returns a manager for the given object abstract node, or null if it is not supported.
Ogre::ParticleSystem * mSystem
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
This specific abstract node represents a script object.
MaterialTranslator mMaterialTranslator
ParticleEmitterTranslator mParticleEmitterTranslator
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
static void translateProgramParameters(ScriptCompiler *compiler, GpuProgramParametersSharedPtr params, ObjectAbstractNode *obj)
void translateTesselationHullProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
ParticleSystemTranslator()
Class defining a single pass of a Technique (of a Material), i.e.
void translateShadowReceiverFragmentProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
void translateUnifiedGpuProgram(ScriptCompiler *compiler, ObjectAbstractNode *obj)
Class representing an approach to rendering this particular Material.
Base composition technique, can be subclassed in plugins.
void translateHighLevelGpuProgram(ScriptCompiler *compiler, ObjectAbstractNode *obj)
virtual ~ScriptTranslatorManager()
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
TextureSourceTranslator mTextureSourceTranslator
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
void translateFragmentProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
static bool getMatrix4(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Matrix4 *m)
Converts the range of nodes to a Matrix4 and returns true if successful.
StencilOperation
Enum describing the various actions which can be taken on the stencil buffer.
void translateVertexProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
virtual void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)=0
This function translates the given node into Ogre resource(s).
Class encapsulating a standard 4x4 homogeneous matrix.
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
SceneBlendFactor
Blending factors for manually blending objects with the scene.
void translateShadowReceiverVertexProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
Object representing one render to a RenderTarget or Viewport in the Ogre Composition framework.
void translateShadowCasterVertexProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
Ogre::AliasTextureNamePairList mTextureAliases
This is the main class for the compiler.
The ScriptTranslatorManager manages the lifetime and access to script translators.
CompositionTechniqueTranslator()
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
void translateTesselationDomainProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
void translateGeometryProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
GpuProgramTranslator mGpuProgramTranslator
ParticleAffectorTranslator mParticleAffectorTranslator
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
static bool getSceneBlendFactor(const AbstractNodePtr &node, SceneBlendFactor *sbf)
Converts the node to a SceneBlendFactor enum and returns true if successful.
ParticleSystemTranslator mParticleSystemTranslator
Abstract class defining the interface to be implemented by particle emitters.
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
ParticleEmitterTranslator()
Reference-counted shared pointer, used for objects where implicit destruction is required.
CompositionTargetPassTranslator mCompositionTargetPassTranslator
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
static bool getStencilOp(const AbstractNodePtr &node, StencilOperation *op)
Converts the node to a StencilOperation enum and returns true if successful.
CompositionTechniqueTranslator mCompositionTechniqueTranslator
void translateShadowCasterFragmentProgramRef(ScriptCompiler *compiler, ObjectAbstractNode *node)
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
Class representing colour.
static bool getCompareFunction(const AbstractNodePtr &node, CompareFunction *func)
Converts the node to a CompareFunction enum and returns true if successful.
list< AbstractNodePtr >::type AbstractNodeList
Ogre::ParticleEmitter * mEmitter
Class defining particle system based special effects.
virtual ~ScriptTranslator()
virtual ScriptTranslator * getTranslator(const AbstractNodePtr &)=0
Returns a manager for the given object abstract node, or null if it is not supported.
float Real
Software floating point type.
Ogre::ParticleAffector * mAffector
static bool getInts(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, int *vals, int count)
Converts the range of nodes to an array of ints and returns true if successful.
SharedParamsTranslator mSharedParamsTranslator
static bool getConstantType(AbstractNodeList::const_iterator i, GpuConstantType *op)
Converts the node to a GpuConstantType enum and returns true if successful.
TextureSourceTranslator()
Abstract class defining the interface to be implemented by particle affectors.
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
virtual size_t getNumTranslators() const =0
Returns the number of translators being managed.
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
void translateGpuProgram(ScriptCompiler *compiler, ObjectAbstractNode *obj)
void translate(ScriptCompiler *compiler, const AbstractNodePtr &node)
This function translates the given node into Ogre resource(s).
static AbstractNodeList::const_iterator getNodeAt(const AbstractNodeList &nodes, int index)
Retrieves the node iterator at the given index.
CompositorTranslator mCompositorTranslator
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.