Class Model

    Definition

    Namespace:
    Tizen.NUI.Scene3D
    Assembly:
    Tizen.NUI.Scene3D.dll

    Model is a Class to show 3D mesh objects. Model supports glTF 2.0 and DLI model formats. Physically Based Rendering with Image Based Lighting is also supported.

    public class Model : View, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    View
    Model
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    Examples
    Model model = new Model(modelUrl)
    {
        Size = new Size(width, height),
    };
    model.ResourcesLoaded += (s, e) =>
    {
        model.PivotPoint = new Vector3(0.5f, 0.5f, 0.5f); // Use center as a Pivot.
    
        int animationCount = model.GetAnimationCount();
        if(animationCount > 0)
        {
            // Play an Animation of index 0.
            model.GetAnimation(0).Play();
        }
    };
    model.SetImageBasedLightSource(diffuseUrl, specularUrl, scaleFactor);
    window.Add(model);

    Constructors

    View Source

    Model()

    Create an initialized Model.

    Declaration
    public Model()
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    Model(string, string)

    Create an initialized Model.

    Declaration
    public Model(string modelUrl, string resourceDirectoryUrl = "")
    Parameters
    Type Name Description
    string modelUrl

    model file url.(e.g. glTF, and DLI).

    string resourceDirectoryUrl

    The url to derectory containing resources: binary, image etc.

    Remarks

    If resourceDirectoryUrl is empty, the parent directory url of modelUrl is used for resource url.

    http://tizen.org/privilege/mediastorage for local files in media storage. http://tizen.org/privilege/externalstorage for local files in external storage.

    View Source

    Model(Model)

    Copy constructor.

    Declaration
    public Model(Model model)
    Parameters
    Type Name Description
    Model model

    Source object to copy.

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    Properties

    View Source

    ImageBasedLightScaleFactor

    Set/Get the ImageBasedLight ScaleFactor. Scale factor controls light source intensity in [0.0f, 1.0f]

    Declaration
    public float ImageBasedLightScaleFactor { get; set; }
    Property Value
    Type Description
    float
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadingStatus

    Gets the loading state of the visual resource.

    Declaration
    public ModelLoadingStatusType LoadingStatus { get; }
    Property Value
    Type Description
    ModelLoadingStatusType
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    ModelPivotPoint

    Get The original pivot point of the model

    Declaration
    public Position ModelPivotPoint { get; }
    Property Value
    Type Description
    Position
    Remarks

    This returns (0, 0, 0) before resources are loaded.

    View Source

    ModelRoot

    Retrieves root ModelNode of this Model.

    Declaration
    public ModelNode ModelRoot { get; }
    Property Value
    Type Description
    ModelNode
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    ShadowCast

    Whether this Model casts shadow or not by directional light. If it is true, this Model is drawn on Shadow Map. Default value is true.

    Declaration
    public bool ShadowCast { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    ShadowReceive

    Whether this Model receives shadow or not by directional light. If it is true, shadows are drawn on this Model. Default value is true.

    Declaration
    public bool ShadowReceive { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    Methods

    View Source

    AddModelNode(ModelNode)

    Adds modelNode to this Model.

    Declaration
    public void AddModelNode(ModelNode modelNode)
    Parameters
    Type Name Description
    ModelNode modelNode

    Root of a ModelNode tree

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    ApplyCamera(uint, Camera)

    Apply camera parameters at the index to inputed Camera. If camera parameter is valid and camera is not empty, apply parameters. It will change camera's transform and near / far / fov or orthographic size / aspect ratio (if defined)

    Declaration
    public bool ApplyCamera(uint index, Camera camera)
    Parameters
    Type Name Description
    uint index

    Index of camera to be retrieved.

    Camera camera

    Camera to be applied parameter.

    Returns
    Type Description
    bool

    True if Apply successed. False otherwise.

    Remarks

    This method should be called after Model load has been finished.

    View Source

    Dispose(DisposeTypes)

    To make transitionSet instance be disposed.

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type
    Overrides
    View.Dispose(DisposeTypes)
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    FindChildModelNodeByName(string)

    Removes Returns a child ModelNode object with a name that matches nodeName.

    Declaration
    public ModelNode FindChildModelNodeByName(string nodeName)
    Parameters
    Type Name Description
    string nodeName

    The name of the child ModelNode object you want to find.

    Returns
    Type Description
    ModelNode

    Child ModelNode that has nodeName as name.

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    GenerateCamera(uint)

    Generate Camera using camera parameters at the index. If camera parameter is valid, create new Camera. Else, return empty Handle.

    Declaration
    public Camera GenerateCamera(uint index)
    Parameters
    Type Name Description
    uint index

    Index of camera to be generated.

    Returns
    Type Description
    Camera

    Generated Camera by the index, or empty Handle if generation failed.

    Remarks

    This method should be called after Model load has been finished.

    View Source

    GenerateMotionDataAnimation(MotionData)

    Generate animation by MotionData. If there is no animatable item for MotionData, return null.

    Declaration
    public Animation GenerateMotionDataAnimation(MotionData motionData)
    Parameters
    Type Name Description
    MotionData motionData

    Source motion data.

    Returns
    Type Description
    Animation

    Generated animation from then given motion data, or null if there is no animatable item in motionData

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    GetAnimation(string)

    Retrieves animation with the given name. Note: This method should be called after Model load finished.

    Declaration
    public Animation GetAnimation(string name)
    Parameters
    Type Name Description
    string name

    String name of animation to be retrieved.

    Returns
    Type Description
    Animation

    Animation that has the given name.

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    GetAnimation(uint)

    Gets animation at the index.

    Declaration
    public Animation GetAnimation(uint index)
    Parameters
    Type Name Description
    uint index

    Index of animation to be retrieved.

    Returns
    Type Description
    Animation

    Animation at the index.

    Remarks

    This method should be called after Model load has been finished.

    View Source

    GetAnimationCount()

    Gets number of animations that has been loaded from model file.

    Declaration
    public uint GetAnimationCount()
    Returns
    Type Description
    uint

    The number of loaded animations.

    Remarks

    This method should be called after Model load has been finished.

    View Source

    GetCameraCount()

    Gets number of camera parameters that has been loaded from model file.

    Declaration
    public uint GetCameraCount()
    Returns
    Type Description
    uint

    The number of loaded camera parameters.

    Remarks

    This method should be called after Model load has been finished.

    View Source

    LoadBlendShapeAnimation(string)

    Load blendshape animation and assign to model from json file.

    Declaration
    public Animation LoadBlendShapeAnimation(string jsonFilename)
    Parameters
    Type Name Description
    string jsonFilename

    Name of json format file what we predefined.

    Returns
    Type Description
    Animation

    Animaion of facial

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadBlendShapeAnimationFromBuffer(string)

    Load morphing animation and assign to model from json string.

    Declaration
    public Animation LoadBlendShapeAnimationFromBuffer(string jsonBuffer)
    Parameters
    Type Name Description
    string jsonBuffer

    Contents of json format file what we predefined.

    Returns
    Type Description
    Animation

    Animaion of facial

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadBvhAnimation(string, Vector3, bool)

    Load bvh animation and assign to model. Scale is additional scale factor of bvh animation. It is possible that Model's scale may not matched with bvh animation scale. If scale is null, default use as Vector3.ONE

    Declaration
    public Animation LoadBvhAnimation(string bvhFilename, Vector3 scale = null, bool translateRootFromModelNode = true)
    Parameters
    Type Name Description
    string bvhFilename

    Name of bvh format file.

    Vector3 scale

    Scale value of bvh animation match with model.

    bool translateRootFromModelNode

    Whether we should translate the bvh root from it's ModelNode position or not.

    Returns
    Type Description
    Animation

    Animaion of bvh

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadBvhAnimationFromBuffer(string, Vector3, bool)

    Load bvh animation and assign to model. Scale is additional scale factor of bvh animation. It is possible that Model's scale may not matched with bvh animation scale. If scale is null, default use as Vector3.ONE

    Declaration
    public Animation LoadBvhAnimationFromBuffer(string bvhBuffer, Vector3 scale = null, bool translateRootFromModelNode = true)
    Parameters
    Type Name Description
    string bvhBuffer

    Contents of bvh format file.

    Vector3 scale

    Scale value of bvh animation match with model.

    bool translateRootFromModelNode

    Whether we should translate the bvh root from it's ModelNode position or not.

    Returns
    Type Description
    Animation

    Animaion of bvh

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadFacialAnimation(string)

    Load facial animation and assign to model.

    Declaration
    public Animation LoadFacialAnimation(string facialFilename)
    Parameters
    Type Name Description
    string facialFilename

    Name of json format file what we predefined.

    Returns
    Type Description
    Animation

    Animaion of facial

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    LoadFacialAnimationFromBuffer(string)

    Load facial animation and assign to model.

    Declaration
    public Animation LoadFacialAnimationFromBuffer(string facialBuffer)
    Parameters
    Type Name Description
    string facialBuffer

    Contents of json format file what we predefined.

    Returns
    Type Description
    Animation

    Animaion of facial

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    ReleaseSwigCPtr(HandleRef)

    Release swigCPtr.

    Declaration
    protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
    Parameters
    Type Name Description
    System.Runtime.InteropServices.HandleRef swigCPtr
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    RemoveModelNode(ModelNode)

    Removes modelNode from this Model.

    Declaration
    public void RemoveModelNode(ModelNode modelNode)
    Parameters
    Type Name Description
    ModelNode modelNode

    Root of a ModelNode tree to be removed

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    View Source

    SetImageBasedLightSource(string, string, float)

    Changes Image Based Light according to the given input textures.

    Declaration
    public void SetImageBasedLightSource(string diffuseUrl, string specularUrl, float scaleFactor = 1)
    Parameters
    Type Name Description
    string diffuseUrl

    The path of Cube map image that will be used as a diffuse IBL source.

    string specularUrl

    The path of Cube map image that will be used as a specular IBL source.

    float scaleFactor

    Scale factor that controls light source intensity in [0.0f, 1.0f]. Default value is 1.0f.

    Remarks

    http://tizen.org/privilege/mediastorage for local files in media storage. http://tizen.org/privilege/externalstorage for local files in external storage.

    View Source

    SetMotionData(MotionData)

    Set values from MotionData. Note that this method doesn not apply KeyFrames animation. If you want to apply the animation, please use GenerateMotionDataAnimation(MotionData) and play the result.

    Declaration
    public void SetMotionData(MotionData motionData)
    Parameters
    Type Name Description
    MotionData motionData

    Source motion data.

    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    Events

    View Source

    ColliderMeshHitted

    EventHandler event. It will be invoked when collider mesh is hit.

    Declaration
    public event EventHandler<Model.MeshHitEventArgs> ColliderMeshHitted
    Event Type
    Type Description
    EventHandler<><MeshHitEventArgs>
    Remarks

    Since NUI uses a left-handed coordinate system, loaded models are transformed into a left-handed coordinate system with Y pointing down. The Animations defined in the glTF or DLI are also loaded and can be retrieved by using GetAnimation(uint) and GetAnimation(string) methods. The number of animation is also retrieved by GetAnimationCount() method.

    Model also supports Physically Based Rendering(PBR) with Image Based Lighting(IBL). For the IBL, two cube map textures(diffuse and specular) are required. Model supports 4 types layout for Cube Map: Vertical/Horizontal Cross layouts, and Vertical/Horizontal Array layouts. And also, ktx format with cube map is supported.

    The model and IBL textures start to be loaded asynchronously when the Model object is on Window. ResourcesLoaded signal notifies that the loading of the model and IBL resources have been completed. If Model or IBL is requested to be loaded before the other loading is completed, the ResourcesLoaded signal is called after all resources are loaded. GetAnimation(uint) and GetAnimation(string) methods can be used after the model loading is finished.

    By default, the loaded mesh has its own size and PivotPoint inferred from position of vertices. The PivotPoint can be modified after model loading is finished. If user set size property, the mesh will be scaled to the input size. Default value of ParentOrigin of the Model is Center.

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Extension Methods

    ViewExtensions.BackgroundColor(View)
    ViewExtensions.BorderlineColor(View)
    ViewExtensions.BoxShadow(View)
    ViewExtensions.Color(View)
    ViewExtensions.CornerRadius(View)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    ViewExtensions.BackgroundColor<T>(T, float, float, float, float)
    ViewExtensions.BackgroundColor<T>(T, uint, float)
    ViewExtensions.BackgroundColor<T>(T, UIColor)
    ViewExtensions.BackgroundImage<T>(T, string)
    ViewExtensions.Borderline<T>(T, float, UIColor, float)
    ViewExtensions.BorderlineColor<T>(T, float, float, float, float)
    ViewExtensions.BorderlineColor<T>(T, uint, float)
    ViewExtensions.BorderlineColor<T>(T, UIColor)
    ViewExtensions.BorderlineOffset<T>(T, float)
    ViewExtensions.BorderlineWidth<T>(T, float)
    ViewExtensions.BoxShadow<T>(T, float, float, float)
    ViewExtensions.BoxShadow<T>(T, float, UIColor, float, float)
    ViewExtensions.BoxShadow<T>(T, UIShadow)
    ViewExtensions.ClippingMode<T>(T, ClippingModeType)
    ViewExtensions.Color<T>(T, float, float, float, float)
    ViewExtensions.Color<T>(T, uint, float)
    ViewExtensions.Color<T>(T, UIColor)
    ViewExtensions.CornerRadius<T>(T, float, bool)
    ViewExtensions.CornerRadius<T>(T, float, float, float, float, bool)
    ViewExtensions.CornerRadius<T>(T, UICorner)
    ViewExtensions.Focusable<T>(T, bool)
    ViewExtensions.FocusableChildren<T>(T, bool)
    ViewExtensions.FocusableInTouch<T>(T, bool)
    ViewExtensions.ImageShadow<T>(T, ImageShadow)
    ViewExtensions.IsEnabled<T>(T, bool)
    ViewExtensions.Layout<T>(T, LayoutItem)
    ViewExtensions.Opacity<T>(T, float)
    ViewExtensions.Position<T>(T, float, float)
    ViewExtensions.PositionX<T>(T, float)
    ViewExtensions.PositionY<T>(T, float)
    ViewExtensions.Scale<T>(T, float, float)
    ViewExtensions.ScaleX<T>(T, float)
    ViewExtensions.ScaleY<T>(T, float)
    ViewExtensions.Sensitive<T>(T, bool)
    ViewExtensions.Size<T>(T, float, float)
    ViewExtensions.SizeHeight<T>(T, float)
    ViewExtensions.SizeWidth<T>(T, float)
    ViewExtensions.Visibility<T>(T, bool)
    ViewExtensions.VoiceInteractionName<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX