コード例 #1
0
        public virtual void SetWrapType(TextureWrapType value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, WRAP_TYPE_MODE, true, (int)value, (int)changeContext);
        }
コード例 #2
0
 /// <summary>
 /// Set another content as a child of this content. This content may or may
 /// not be attached to a document.  If this content already has a child
 /// with the specified child slot name, that child will be deleted.  If
 /// this content is not attached to a document, the child will be added
 /// without sending any events.  If this content is attached to a document,
 /// the necessary events will be sent to update the UI.
 /// Note:
 ///   Do not call this method to add children in your constructor. If you
 ///   want to add default children, you should override Initialize() and add
 ///   them there.
 /// </summary>
 /// <param name="renderContent">
 /// Child content to add to this content. If pChild is NULL, the function
 /// will fail.  If pChild is already attached to a document, the function
 /// will fail.  If pChild is already a child of this or another content,
 /// the function will fail.
 /// </param>
 /// <param name="childSlotName">
 /// The name that will be assigned to this child slot. The child slot name
 /// cannot be an empty string. If it is, the function will fail.
 /// </param>
 /// <param name="changeContexts">
 /// </param>
 /// <returns>
 /// Returns true if the content was added or the child slot with this name
 /// was modified otherwise; returns false.
 /// </returns>
 public bool SetChild(RenderContent renderContent, String childSlotName, ChangeContexts changeContexts)
 {
   if (renderContent == null)
     return DeleteChild(childSlotName, changeContexts);
   var found = FindChild(childSlotName);
   renderContent.ChildSlotName = childSlotName;
   return (found == null ? AddChild(renderContent) : ChangeChild(found, renderContent));
 }
コード例 #3
0
 public virtual void SetRotation(Vector3d value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtual3dVector(pointer, ROTATION_MODE, true, value, (int)changeContext);
 }
コード例 #4
0
 public void SetPreviewLocalMapping(bool value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, PREVIEW_LOCAL_MAPPING_MODE, value ? 1 : 0, (int) changeContext);
 }
コード例 #5
0
 public virtual void SetWrapType(TextureWrapType value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, WRAP_TYPE_MODE, true, (int) value, (int) changeContext);
 }
コード例 #6
0
 public virtual void SetOffsetLocked(bool value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, OFFSET_LOCKED_MODE, true, value ? 1 : 0, (int)changeContext);
 }
コード例 #7
0
        public void SetPreviewLocalMapping(bool value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, PREVIEW_LOCAL_MAPPING_MODE, value ? 1 : 0, (int)changeContext);
        }
コード例 #8
0
 /// <summary>
 /// Use bindings to automatically wire parameters to fields
 /// </summary>
 /// <param name="parameterName"></param>
 /// <param name="field"></param>
 /// <param name="setEvent"></param>
 public void BindParameterToField(string parameterName, Field field, ChangeContexts setEvent)
 {
   string key = BindingKey(parameterName, null);
   m_bound_parameters[key] = new BoundField(field, setEvent);
 }
コード例 #9
0
        public virtual void SetRotation(Vector3d value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtual3dVector(pointer, ROTATION_MODE, true, value, (int)changeContext);
        }
コード例 #10
0
        public void SetEnvironmentMappingMode(TextureEnvironmentMappingMode value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, ENVIRONMENT_MAPPING_MODE, (int)value, (int)changeContext);
        }
コード例 #11
0
        public virtual void SetPreviewIn3D(bool value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PREVIEW_IN_3D_MODE, true, value ? 1 : 0, (int)changeContext);
        }
コード例 #12
0
        public virtual void SetOffsetLocked(bool value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, OFFSET_LOCKED_MODE, true, value ? 1 : 0, (int)changeContext);
        }
コード例 #13
0
        public virtual void SetMappingChannel(int value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, MAPPING_CHANNEL_MODE, true, value, (int)changeContext);
        }
コード例 #14
0
    internal static ExtraRequirementsSetContexts ExtraRequirementsSetContextFromChangeContext(ChangeContexts cc) // Static.
    {
      switch (cc)
      {
        case ChangeContexts.UI: return ExtraRequirementsSetContexts.UI;
        case ChangeContexts.Drop: return ExtraRequirementsSetContexts.Drop;
      }

      return ExtraRequirementsSetContexts.Program;
    }
コード例 #15
0
        public void SetDisplayInViewport(bool value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, DISPLAY_IN_VIEWPORT_MODE, value ? 1 : 0, (int)changeContext);
        }
コード例 #16
0
 public BoundField(Field field, ChangeContexts cc)
 {
   Field = field;
   ChangeContexts = cc;
 }
コード例 #17
0
    /// <summary>
    /// Set the named parameter value for this content instance.
    /// If you do not support this parameter, call the base class.
    /// </summary>
    /// <param name="parameterName"></param>
    /// <param name="value"></param>
    /// <param name="changeContexts"></param>
    /// <returns></returns>
    public virtual bool SetParameter(String parameterName, object value, ChangeContexts changeContexts)
    {
      Variant v = value as Variant;
      if (v != null)
      {
        if (IsNativeWrapper())
        {
          return 1 == UnsafeNativeMethods.Rdk_RenderContent_SetVariantParameter(ConstPointer(), parameterName, v.ConstPointer(), (int)changeContexts);
        }

        string key = BindingKey(parameterName, null);
        BoundField bound_field;
        if (m_bound_parameters.TryGetValue(key, out bound_field))
        {
          bound_field.Field.Set(v, bound_field.ChangeContexts);
          return true;
        }
        else
          return 1 == UnsafeNativeMethods.Rdk_RenderContent_CallSetVariantParameterBase(ConstPointer(), parameterName, v.ConstPointer(), (int)changeContexts);
      }
      return false;
    }
コード例 #18
0
 public virtual void SetProjectionMode(TextureProjectionMode value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PROJECTION_MODE, true, (int) value, (int) changeContext);
 }
コード例 #19
0
 /// <summary>
 /// Sets the on-ness property for the texture in the specified child slot.
 /// </summary>
 /// <param name="childSlotName">Child slot name for the child</param>
 /// <param name="bOn">Value for the on-ness property.</param>
 /// <param name="cc">Context of the change</param>
 public void SetChildSlotOn(String childSlotName, bool bOn, ChangeContexts cc)
 {
   SetChildSlotParameter(childSlotName, "texture-on", new Variant(bOn), ExtraRequirementsSetContextFromChangeContext(cc));
 }
コード例 #20
0
 public virtual void SetMappingChannel(int value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, MAPPING_CHANNEL_MODE, true, value, (int)changeContext);
 }
コード例 #21
0
 /// <summary>
 /// Sets the amount property for the texture in the specified child slot.  Values are typically from 0.0 - 100.0
 /// </summary>
 /// <param name="childSlotName">Child slot name for the child</param>
 /// <param name="amount">Texture amount. Values are typically from 0.0 - 100.0</param>
 /// <param name="cc">Context of the change.</param>
 public void SetChildSlotAmount(String childSlotName, double amount, ChangeContexts cc)
 {
   SetChildSlotParameter(childSlotName, "texture-amount", new Variant(amount), ExtraRequirementsSetContextFromChangeContext(cc));
 }
コード例 #22
0
 public virtual void SetPreviewIn3D(bool value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PREVIEW_IN_3D_MODE, true, value ? 1 : 0, (int)changeContext);
 }
コード例 #23
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="childSlotName"></param>
 /// <param name="changeContexts">
 /// Currently ignored, reserved for future use
 /// </param>
 /// <returns></returns>
 public bool DeleteChild(string childSlotName, ChangeContexts changeContexts)
 {
   // The changeContexts is there for compatibility with V6 only
   var pointer = ConstPointer();
   var success = UnsafeNativeMethods.Rdk_RenderContent_DeleteChild(pointer, childSlotName);
   return success;
 }
コード例 #24
0
 public void SetEnvironmentMappingMode(TextureEnvironmentMappingMode value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, ENVIRONMENT_MAPPING_MODE, (int)value, (int)changeContext);
 }
コード例 #25
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="changeContexts">
 /// Currently ignored, reserved for future use
 /// </param>
 public void DeleteAllChildren(ChangeContexts changeContexts)
 {
   // The changeContexts is there for compatibility with V6 only
   var pointer = ConstPointer();
   UnsafeNativeMethods.Rdk_RenderContent_DeleteAllChildren(pointer);
 }
コード例 #26
0
 public void SetDisplayInViewport(bool value, ChangeContexts changeContext)
 {
   var pointer = NonConstPointer();
   UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, DISPLAY_IN_VIEWPORT_MODE, value ? 1 : 0, (int)changeContext);
 }
コード例 #27
0
        public virtual void SetProjectionMode(TextureProjectionMode value, ChangeContexts changeContext)
        {
            var pointer = NonConstPointer();

            UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PROJECTION_MODE, true, (int)value, (int)changeContext);
        }