1- // Copyright 2023 Autodesk, Inc.
1+ // Copyright 2024 Autodesk, Inc.
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -59,8 +59,8 @@ namespace Aurora
5959// / \param pFileNameOut File name of the loaded resource containing the (used as hint for subsequent
6060// / processing)
6161// / \return True if loaded successfully.
62- using LoadResourceFunction =
63- function< bool ( const string& uri, vector<unsigned char >* pBufferOut, string* pFileNameOut)>;
62+ using LoadResourceFunction = std::function< bool (
63+ const std:: string& uri, std:: vector<unsigned char >* pBufferOut, std:: string* pFileNameOut)>;
6464
6565// Math objects.
6666using vec2 = glm::vec2;
@@ -282,39 +282,40 @@ struct PropertyValue
282282 }
283283
284284 // / Convert value to string.
285- string toString () const
285+ std:: string toString () const
286286 {
287287 // Compare based on type value.
288288 switch (type)
289289 {
290290 case Type::Bool:
291- return to_string (_bool);
291+ return std:: to_string (_bool);
292292 case Type::Int:
293- return to_string (_int);
293+ return std:: to_string (_int);
294294 case Type::Float:
295- return to_string (_float);
295+ return std:: to_string (_float);
296296 case Type::Float2:
297- return to_string (_float2.x ) + " , " + to_string (_float2.y );
297+ return std:: to_string (_float2.x ) + " , " + std:: to_string (_float2.y );
298298 case Type::Float3:
299- return to_string (_float3.x ) + " , " + to_string (_float3.y ) + " , " + to_string (_float3.z );
299+ return std::to_string (_float3.x ) + " , " + std::to_string (_float3.y ) + " , " +
300+ std::to_string (_float3.z );
300301 case Type::Float4:
301- return to_string (_float4.x ) + " , " + to_string (_float4.y ) + " , " +
302- to_string (_float4.z ) + " , " + to_string (_float4.w );
302+ return std:: to_string (_float4.x ) + " , " + std:: to_string (_float4.y ) + " , " +
303+ std:: to_string (_float4.z ) + " , " + std:: to_string (_float4.w );
303304 case Type::Matrix4:
304- return to_string (_matrix4[0 ][0 ]) + " , " + to_string (_matrix4[0 ][1 ]) + " , " +
305- to_string (_matrix4[0 ][2 ]) + " , " + to_string (_matrix4[0 ][3 ]) + " , " +
306- to_string (_matrix4[1 ][0 ]) + " , " + to_string (_matrix4[1 ][1 ]) + " , " +
307- to_string (_matrix4[1 ][2 ]) + " , " + to_string (_matrix4[1 ][3 ]) + " , " +
308- to_string (_matrix4[2 ][0 ]) + " , " + to_string (_matrix4[2 ][1 ]) + " , " +
309- to_string (_matrix4[2 ][2 ]) + " , " + to_string (_matrix4[2 ][3 ]) + " , " +
310- to_string (_matrix4[3 ][0 ]) + " , " + to_string (_matrix4[3 ][1 ]) + " , " +
311- to_string (_matrix4[3 ][2 ]) + " , " + to_string (_matrix4[3 ][3 ]);
305+ return std:: to_string (_matrix4[0 ][0 ]) + " , " + std:: to_string (_matrix4[0 ][1 ]) + " , " +
306+ std:: to_string (_matrix4[0 ][2 ]) + " , " + std:: to_string (_matrix4[0 ][3 ]) + " , " +
307+ std:: to_string (_matrix4[1 ][0 ]) + " , " + std:: to_string (_matrix4[1 ][1 ]) + " , " +
308+ std:: to_string (_matrix4[1 ][2 ]) + " , " + std:: to_string (_matrix4[1 ][3 ]) + " , " +
309+ std:: to_string (_matrix4[2 ][0 ]) + " , " + std:: to_string (_matrix4[2 ][1 ]) + " , " +
310+ std:: to_string (_matrix4[2 ][2 ]) + " , " + std:: to_string (_matrix4[2 ][3 ]) + " , " +
311+ std:: to_string (_matrix4[3 ][0 ]) + " , " + std:: to_string (_matrix4[3 ][1 ]) + " , " +
312+ std:: to_string (_matrix4[3 ][2 ]) + " , " + std:: to_string (_matrix4[3 ][3 ]);
312313
313314 case Type::String:
314315 return _string;
315316 case Type::Strings:
316317 {
317- string res;
318+ std:: string res;
318319 // If any string does not match equality is false.
319320 for (size_t i = 0 ; i < _strings.size (); i++)
320321 {
@@ -456,7 +457,7 @@ struct VertexDescription
456457// / GetAttributeDataFunction.
457458struct AttributeData
458459{
459- // / Pointer to actual vertex or index atttribute data.
460+ // / Pointer to actual vertex or index attribute data.
460461 const void * address = nullptr ;
461462
462463 // / Offset in bytes to start of attribute data.
@@ -812,10 +813,10 @@ class AURORA_API IMaterial
812813MAKE_AURORA_PTR (IMaterial);
813814
814815// Definition of an instance layer (material+geometry)
815- using LayerDefinition = pair<IMaterialPtr, IGeometryPtr>;
816+ using LayerDefinition = std:: pair<IMaterialPtr, IGeometryPtr>;
816817
817818// Array of layer definitions.
818- using LayerDefinitions = vector<LayerDefinition>;
819+ using LayerDefinitions = std:: vector<LayerDefinition>;
819820
820821// / A class representing an instance of geometry, including a per-instance material and transform.
821822class AURORA_API IInstance
@@ -900,7 +901,7 @@ class AURORA_API IScene
900901 // /
901902 // / \param atPath The Aurora path at which the image will be created.
902903 // / \param filePath The path to the image file, if the string is empty, then atPath is used.
903- virtual void setImageFromFilePath (const Path& atPath, const string& filePath = " " ,
904+ virtual void setImageFromFilePath (const Path& atPath, const std:: string& filePath = " " ,
904905 bool linearize = true , bool isEnvironment = false ) = 0;
905906
906907 // / Set the properties for sampler with given path.
@@ -1024,7 +1025,7 @@ class AURORA_API IScene
10241025 // / \param lightType Type of light (one of strings in
10251026 // / Aurora::Names::LightTypes).
10261027 // / \return A smart pointer to the new lights.
1027- virtual ILightPtr addLightPointer (const string& lightType) = 0;
1028+ virtual ILightPtr addLightPointer (const std:: string& lightType) = 0;
10281029
10291030protected:
10301031 virtual ~IScene () = default ; // hidden destructor
@@ -1174,7 +1175,7 @@ class AURORA_API IRenderer
11741175 virtual const std::vector<std::string>& builtInMaterials () = 0;
11751176
11761177 // / \desc Set the callback function used to load resources, such as textures, from a URI.
1177- // / \param func Callback function to be used for all subsquent loading.
1178+ // / \param func Callback function to be used for all subsequent loading.
11781179 virtual void setLoadResourceFunction (LoadResourceFunction func) = 0;
11791180
11801181protected:
@@ -1185,7 +1186,7 @@ MAKE_AURORA_PTR(IRenderer);
11851186// Gets the logger for the Aurora library, used to report console output and errors.
11861187AURORA_API Foundation::Log& logger ();
11871188
1188- // Creates a renderer with the specified baclend and number of simultaneously active tasks.
1189+ // Creates a renderer with the specified backend and number of simultaneously active tasks.
11891190AURORA_API IRendererPtr createRenderer (
11901191 IRenderer::Backend type = IRenderer::Backend::Default, uint32_t taskCount = 3 );
11911192
0 commit comments