Particle Universe
1.2
|
#include <ParticleUniverseScriptDeserializer.h>
Inherits Ogre::ScriptTranslator.
Inherited by ParticleUniverse::AffectorTranslator, ParticleUniverse::AliasTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BehaviourTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CameraDependencyTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::DynamicAttributeTranslator, ParticleUniverse::EmitterTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::ExternTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LightRendererTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::ObserverTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::ParticleEventHandlerTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::RendererSetTranslator, ParticleUniverse::RendererTranslator, ParticleUniverse::RibbonTrailRendererTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::SystemTranslator, ParticleUniverse::TechniqueTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::VortexAffectorTranslator, and ParticleUniverse::VortexExternTranslator.
Public Types | |
enum | ValidationType { VAL_REAL, VAL_BOOL, VAL_UINT, VAL_INT, VAL_STRING, VAL_VECTOR2, VAL_VECTOR3, VAL_VECTOR4, VAL_COLOURVALUE, VAL_QUATERNION } |
ScriptTranslator subclasses the ScriptTranslator and adds some plumbing functions.
ParticleUniverse::ScriptTranslator::ScriptTranslator | ( | void | ) |
|
inlinevirtual |
void ParticleUniverse::ScriptTranslator::errorUnexpectedProperty | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Adds an error to the compiler: An unknown property is read.
void ParticleUniverse::ScriptTranslator::errorUnexpectedToken | ( | ScriptCompiler * | compiler, |
AbstractNodePtr | node | ||
) |
Adds an error to the compiler: An unknown token is read.
bool ParticleUniverse::ScriptTranslator::getQuaternion | ( | AbstractNodeList::const_iterator | i, |
AbstractNodeList::const_iterator | end, | ||
Quaternion * | result, | ||
int | maxEntries = 4 |
||
) |
Parse Quaternion
bool ParticleUniverse::ScriptTranslator::getVector2 | ( | AbstractNodeList::const_iterator | i, |
AbstractNodeList::const_iterator | end, | ||
Vector2 * | result, | ||
int | maxEntries = 2 |
||
) |
Parse Vector2
bool ParticleUniverse::ScriptTranslator::getVector3 | ( | AbstractNodeList::const_iterator | i, |
AbstractNodeList::const_iterator | end, | ||
Vector3 * | result, | ||
int | maxEntries = 3 |
||
) |
Parse Vector3
bool ParticleUniverse::ScriptTranslator::getVector4 | ( | AbstractNodeList::const_iterator | i, |
AbstractNodeList::const_iterator | end, | ||
Vector4 * | result, | ||
int | maxEntries = 4 |
||
) |
Parse Vector4
bool ParticleUniverse::ScriptTranslator::passValidateProperty | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop, | ||
const String & | token, | ||
ValidationType | validationType | ||
) |
Validate a property.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyNoValues | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop, | ||
const String & | token | ||
) |
Validate whether a property has values.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyNumberOfValues | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop, | ||
const String & | token, | ||
ushort | numberOfValues | ||
) |
Validate whether the number of values is correct.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyNumberOfValuesRange | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop, | ||
const String & | token, | ||
ushort | minNumberOfValues, | ||
ushort | maxNumberOfValues | ||
) |
Validate whether the number of values is between a range.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidBool | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct bool.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidInt | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct int.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidQuaternion | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct Quaternion.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidReal | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct Real.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidUint | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct uint.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector2 | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct Vector2.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector3 | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct Vector3.
bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector4 | ( | ScriptCompiler * | compiler, |
PropertyAbstractNode * | prop | ||
) |
Validate whether the value is a correct Vector4.
|
inlinevirtual |
Implements Ogre::ScriptTranslator.
Reimplemented in ParticleUniverse::RendererTranslator, ParticleUniverse::BehaviourTranslator, ParticleUniverse::DynamicAttributeTranslator, ParticleUniverse::ParticleEventHandlerTranslator, ParticleUniverse::ExternTranslator, ParticleUniverse::ObserverTranslator, ParticleUniverse::SystemTranslator, ParticleUniverse::EmitterTranslator, ParticleUniverse::TechniqueTranslator, ParticleUniverse::CameraDependencyTranslator, ParticleUniverse::RendererSetTranslator, ParticleUniverse::AliasTranslator, and ParticleUniverse::AffectorTranslator.
|
inlinevirtual |
Only parses a certain child objec
Reimplemented in ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::VortexExternTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VortexAffectorTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::LightRendererTranslator, and ParticleUniverse::RibbonTrailRendererTranslator.
|
inlinevirtual |
Only parses a certain child property
Reimplemented in ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::VortexExternTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VortexAffectorTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::LightRendererTranslator, and ParticleUniverse::RibbonTrailRendererTranslator.