License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-core.git] / dali / public-api / modeling / model-data.h
index c6a0697..d853a26 100644 (file)
@@ -1,21 +1,23 @@
 #ifndef __DALI_MODEL_DATA_H__
 #define __DALI_MODEL_DATA_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 
 // EXTERNAL INCLUDES
 #include <string>
@@ -38,36 +40,42 @@ class ModelData;
 }
 
 /**
- * Encapsulates a Dali 3D model/scene. This is usually generated by an
- * external model loader (and is also used internally with the default
- * model loader).
+ * @brief Encapsulates a Dali 3D model/scene.
+ *
+ * This is usually generated by an external model loader (and is also
+ * used internally with the default model loader).
  */
 class ModelData : public BaseHandle
 {
 public:
 
   /**
-   * Constructs an uninitialized handle.
+   * @brief Constructs an uninitialized handle.
    */
   ModelData();
 
   /**
-   * Create an initialized ModelData.
+   * @brief Create an initialized ModelData.
+   *
    * @param[in] name The name of the model.
    * @return A handle to a newly allocated Dali resource.
    */
   static ModelData New(const std::string& name);
 
   /**
-   * Downcast an Object handle to ModelData handle. If handle points to a ModelData object the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * @brief Downcast an Object handle to ModelData handle.
+   *
+   * If handle points to a ModelData object the downcast produces
+   * valid handle. If not the returned handle is left uninitialized.
+   *
    * @param[in] handle to An object
    * @return handle to a ModelData object or an uninitialized handle
    */
   static ModelData DownCast( BaseHandle handle );
 
   /**
-   * Virtual destructor.
+   * @brief Virtual destructor.
+   *
    * Dali::Object derived classes typically do not contain member data.
    */
   virtual ~ModelData();
@@ -78,76 +86,88 @@ public:
   using BaseHandle::operator=;
 
   /**
-   * Returns the name of the model
+   * @brief Returns the name of the model.
+   *
    * @return The model name
    */
   const std::string& GetName() const;
 
   /**
-   * Set the root Entity of the model.
+   * @brief Set the root Entity of the model.
+   *
    * @param root A handle to the root entity
    */
   void SetRootEntity(Entity root);
 
   /**
-   * Get the root Entity of the model.
+   * @brief Get the root Entity of the model.
+   *
    * @return The root entity
    */
   Entity GetRootEntity() const;
 
   /**
-   * Add a mesh to the model.
+   * @brief Add a mesh to the model.
+   *
    * @param mesh The mesh data to add.
    */
   void AddMesh(MeshData& mesh);
 
   /**
-   * Get a mesh by index.
+   * @brief Get a mesh by index.
+   *
    * @param[in] index The zero based index to a mesh
    * @return          The mesh.
    */
   const MeshData& GetMesh(unsigned int index) const;
 
   /**
-   * Get a mesh by index.
+   * @brief Get a mesh by index.
+   *
    * @param[in] index The zero based index to a mesh
    * @return          The mesh.
    */
   MeshData& GetMesh(unsigned int index);
 
   /**
-   * Get Mesh count
+   * @brief Get Mesh count.
+   *
    * @returns number of meshes
    */
   unsigned int NumberOfMeshes() const;
 
   /**
-   * Add material to the model
+   * @brief Add material to the model.
+   *
    * @param[in] material - the material to add to the model
    */
   void AddMaterial(Material material);
 
   /**
-   * Get a material by index.
+   * @brief Get a material by index.
+   *
    * @param[in] index The index to a material
    * @return          A handle to a material, or NULL.
    */
   Material GetMaterial(unsigned int index) const;
 
   /**
-   * Get material count
+   * @brief Get material count.
+   *
    * @return The Number of materials
    */
   unsigned int NumberOfMaterials() const;
 
   /**
-   * Get animation map container.
+   * @brief Get animation map container.
+   *
    * @return reference to the animation map container.
    */
    ModelAnimationMapContainer& GetAnimationMapContainer();
 
   /**
-   * Get an animation map from the model data.
+   * @brief Get an animation map from the model data.
+   *
    * @deprecated Use ModelActorFactory to generate animations
    * @param[in] index The index of the animation map.
    * @return a pointer to model animation map.
@@ -155,7 +175,8 @@ public:
   const ModelAnimationMap* GetAnimationMap (unsigned int index) const;
 
   /**
-   * Get the animation for the given name.
+   * @brief Get the animation for the given name.
+   *
    * @deprecated Use ModelActorFactory to generate animations
    * @param[in] name The name of an animation map to search for.
    * @return a pointer to model animation map.
@@ -163,7 +184,8 @@ public:
   const ModelAnimationMap* GetAnimationMap (const std::string& name) const;
 
   /**
-   * Find the index for the given animation name.
+   * @brief Find the index for the given animation name.
+   *
    * @param[in] name The name of the animation map to search for.
    * @param[out] index The index of the found map
    * @return true if the name was found, false otherwise.
@@ -176,33 +198,38 @@ public:
   unsigned int NumberOfAnimationMaps() const;
 
   /**
-   * Add a light to the model
+   * @brief Add a light to the model.
+   *
    * @param light - the light to add to the model
    */
   void AddLight(Light light);
 
   /**
-   * Get a light by index.
+   * @brief Get a light by index.
+   *
    * @param[in] index The zero based index to a light
    * @return          A pointer to a light, or NULL.
    */
   Light GetLight(unsigned int index) const;
 
   /**
-   * Get the number of lights contained in the model.
+   * @brief Get the number of lights contained in the model.
+   *
    * @return The number of lights contained in the model.
    */
   unsigned int NumberOfLights() const;
 
   /**
-   * Read the model data from an open streambuf
+   * @brief Read the model data from an open streambuf.
+   *
    * @param[in] buf A streambuf opened for reading
    * @return true if data was read successfully.
    */
   bool Read(std::streambuf& buf);
 
   /**
-   * Write the model data to an open streambuf
+   * @brief Write the model data to an open streambuf.
+   *
    * @param[in] buf A streambuf opened for writing
    * @return true if data was written successfully.
    */
@@ -210,7 +237,8 @@ public:
 
 public: // Not intended for application developers
   /**
-   * This constructor is used by Dali New() methods.
+   * @brief This constructor is used by Dali New() methods.
+   *
    * @param[in] modelData A pointer to a newly allocated modelData
    */
   explicit DALI_INTERNAL ModelData(Internal::ModelData* modelData);