public virtual void SetWrapType(TextureWrapType value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, WRAP_TYPE_MODE, true, (int)value, (int)changeContext); }
/// <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)); }
public virtual void SetRotation(Vector3d value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtual3dVector(pointer, ROTATION_MODE, true, value, (int)changeContext); }
public void SetPreviewLocalMapping(bool value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, PREVIEW_LOCAL_MAPPING_MODE, value ? 1 : 0, (int) changeContext); }
public virtual void SetWrapType(TextureWrapType value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, WRAP_TYPE_MODE, true, (int) value, (int) changeContext); }
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); }
public void SetPreviewLocalMapping(bool value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, PREVIEW_LOCAL_MAPPING_MODE, value ? 1 : 0, (int)changeContext); }
/// <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); }
public void SetEnvironmentMappingMode(TextureEnvironmentMappingMode value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, ENVIRONMENT_MAPPING_MODE, (int)value, (int)changeContext); }
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); }
public virtual void SetMappingChannel(int value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, MAPPING_CHANNEL_MODE, true, value, (int)changeContext); }
internal static ExtraRequirementsSetContexts ExtraRequirementsSetContextFromChangeContext(ChangeContexts cc) // Static. { switch (cc) { case ChangeContexts.UI: return ExtraRequirementsSetContexts.UI; case ChangeContexts.Drop: return ExtraRequirementsSetContexts.Drop; } return ExtraRequirementsSetContexts.Program; }
public void SetDisplayInViewport(bool value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetIntValue(pointer, DISPLAY_IN_VIEWPORT_MODE, value ? 1 : 0, (int)changeContext); }
public BoundField(Field field, ChangeContexts cc) { Field = field; ChangeContexts = cc; }
/// <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; }
public virtual void SetProjectionMode(TextureProjectionMode value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PROJECTION_MODE, true, (int) value, (int) changeContext); }
/// <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)); }
/// <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)); }
/// <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; }
/// <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); }
public virtual void SetProjectionMode(TextureProjectionMode value, ChangeContexts changeContext) { var pointer = NonConstPointer(); UnsafeNativeMethods.Rdk_RenderTexture_SetVirtualIntValue(pointer, PROJECTION_MODE, true, (int)value, (int)changeContext); }