hstr SpaceObject::getProperty(chstr name, bool* property_exists) { if (property_exists != NULL) { *property_exists = true; } if (name == "position") return gvec3_to_hstr(this->getPosition()); return ActiveObject::getProperty(name, property_exists); }
hstr Emitter::getProperty(chstr name) { if (name == "name") return this->getName(); if (name == "type") { Type value = this->getType(); TRY_GET_TYPE(value, Point); TRY_GET_TYPE(value, Box); TRY_GET_TYPE(value, HollowBox); TRY_GET_TYPE(value, Sphere); TRY_GET_TYPE(value, HollowSphere); TRY_GET_TYPE(value, Cylinder); TRY_GET_TYPE(value, HollowCylinder); return ""; } if (name == "dimensions") return gvec3_to_hstr(this->getDimensions()); if (name == "blend_mode") { april::BlendMode mode = this->getBlendMode(); if (mode == april::BM_DEFAULT) return "default"; if (mode == april::BM_ALPHA) return "alpha"; if (mode == april::BM_ADD) return "add"; if (mode == april::BM_SUBTRACT) return "subtract"; if (mode == april::BM_OVERWRITE) return "overwrite"; return ""; } if (name == "color_mode") { april::ColorMode mode = this->getColorMode(); if (mode == april::CM_DEFAULT) return "default"; if (mode == april::CM_MULTIPLY) return "multiply"; if (mode == april::CM_LERP) return "lerp"; if (mode == april::CM_ALPHA_MAP) return "alpha_map"; return ""; } if (name == "color_mode_factor") return this->getColorModeFactor(); if (name == "emission_rate") return this->getEmissionRate(); if (name == "duration") return this->getDuration(); if (name == "delay") return this->getDelay(); if (name == "loop_delay") return this->getLoopDelay(); if (name == "loops") return this->getLoops(); if (name == "limit") return this->getLimit(); if (name == "reverse_rendering") return this->isReverseRendering(); if (name == "life") return GET_RANGE(Life, hstr); if (name == "direction") return GET_RANGE(Direction, gvec3_to_hstr); if (name == "size") return GET_RANGE(Size, gvec2_to_hstr); if (name == "scale") return GET_RANGE(Scale, hstr); if (name == "angle") return GET_RANGE(Angle, hstr); return SpaceObject::getProperty(name); }
hstr LinearForce::getProperty(chstr name) { if (name == "direction") return gvec3_to_hstr(this->getDirection()); return Affector::getProperty(name); }