1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #include <Array.h>
- #include <Text.h>
- #include <Writer.h>
- #include "TypeRegistry.h"
- class ModelInfoFactory;
- class ModelInfo : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::Text modelPath;
- Framework::RCArray<Framework::Text> texturePaths;
- bool transparent;
- float size;
- public:
- ModelInfo();
- ModelInfo(const char* modelPath,
- Framework::RCArray<Framework::Text> texturePaths,
- bool transparent,
- float size);
- void writeTo(Framework::StreamWriter* zWriter) const;
- void setModelPath(Framework::Text path);
- void addTexturePath(Framework::Text path);
- void setTransparent(bool transparent);
- void setSize(float size);
- Framework::Text getModelPath() const;
- Framework::RCArray<Framework::Text> getTexturePaths() const;
- bool isTransparent() const;
- float getSize() const;
- friend ModelInfoFactory;
- };
- class ModelInfoFactory : public TypeFactory<ModelInfo>
- {
- public:
- ModelInfoFactory();
- ModelInfo* createValue(Framework::JSON::JSONObject* zJson) const override;
- void fromJson(
- ModelInfo* zResult, Framework::JSON::JSONObject* zJson) const override;
- void toJson(ModelInfo* zObject,
- Framework::JSON::JSONObject* zResult) const override;
- JSONObjectValidationBuilder* addToValidator(
- JSONObjectValidationBuilder* builder) const override;
- };
|