void MeshPart::writeText(FILE* file) { fprintElementStart(file); fprintfElement(file, "primitiveType", _primitiveType); fprintfElement(file, "indexFormat", (unsigned int)_indexFormat); fprintfElement(file, "%d ", "indices", _indices); fprintElementEnd(file); }
void Scene::writeText(FILE* file) { fprintElementStart(file); for (std::list<Node*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) { (*i)->writeText(file); } if (_cameraNode) { fprintfElement(file, "activeCamera", _cameraNode->getId()); } fprintfElement(file, "ambientColor", _ambientColor, Light::COLOR_SIZE); fprintElementEnd(file); }
void Light::writeText(FILE* file) { fprintElementStart(file); fprintfElement(file, "lightType", _lightType); fprintfElement(file, "color", _color, COLOR_SIZE); // Compute an approximate light range with Collada's attenuation parameters. // This facilitates bringing in the light nodes directly from maya to gameplay. if (_range == -1.0f) { _range = computeRange(_constantAttenuation, _linearAttenuation, _quadraticAttenuation); } if (_lightType == SpotLight) { // Compute an approximate inner angle of the spot light using Collada's outer angle. _outerAngle = _falloffAngle / 2.0f; if (_innerAngle == -1.0f) { _innerAngle = computeInnerAngle(_outerAngle); } fprintfElement(file, "range", _range); fprintfElement(file, "innerAngle", MATH_DEG_TO_RAD(_innerAngle)); fprintfElement(file, "outerAngle", MATH_DEG_TO_RAD(_outerAngle)); } else if (_lightType == PointLight) { fprintfElement(file, "range", _range); } fprintElementEnd(file); }
void AnimationChannel::writeText(FILE* file) { fprintElementStart(file); fprintfElement(file, "targetId", _targetId); fprintf(file, "<%s>%u %s</%s>\n", "targetAttrib", _targetAttrib, Transform::getPropertyString(_targetAttrib), "targetAttrib"); fprintfElement(file, "%f ", "keytimes", _keytimes); fprintfElement(file, "%f ", "values", _keyValues); fprintfElement(file, "%f ", "tangentsIn", _tangentsIn); fprintfElement(file, "%f ", "tangentsOut", _tangentsOut); fprintfElement(file, "%u ", "interpolations", _interpolations); fprintElementEnd(file); }
void Light::writeText(FILE* file) { fprintElementStart(file); fprintfElement(file, "lightType", _lightType); fprintfElement(file, "color", _color, COLOR_SIZE); if (_lightType == SpotLight) { fprintfElement(file, "range", _range); fprintfElement(file, "innerAngle", MATH_DEG_TO_RAD(_innerAngle)); fprintfElement(file, "outerAngle", MATH_DEG_TO_RAD(_outerAngle)); } else if (_lightType == PointLight) { fprintfElement(file, "range", _range); } fprintElementEnd(file); }