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