public void TestTextureAttributes() { var textureAttributes = new TextureAttributes { index = 1, tilingMode = 2, unknown1 = 3, unknown2 = 4 }; TestGcnSerializableExisting(textureAttributes); }
/// <summary> /// Contains the definition for individual faces /// </summary> /// <param name="defaultTexture"></param> public TextureEntryFace(TextureEntryFace defaultTexture) { DefaultTexture = defaultTexture; if (DefaultTexture == null) { hasAttribute = TextureAttributes.All; } else { hasAttribute = TextureAttributes.None; } }
public override void OnInspectorGUI() { if (Application.isPlaying) { if (GUILayout.Button("Update Attributes")) { TextureAttributes t = (TextureAttributes)serializedObject.targetObject; t.ForceUpdateTexture(); } } DrawDefaultInspector(); }
/// <summary> /// Contains the definition for individual faces /// </summary> /// <param name="defaultTexture"></param> public TextureEntryFace(TextureEntryFace defaultTexture) { rgba = Color4.White; repeatU = 1.0f; repeatV = 1.0f; DefaultTexture = defaultTexture; if (DefaultTexture == null) { hasAttribute = TextureAttributes.All; } else { hasAttribute = TextureAttributes.None; } }
private TextureAttributes RaycastToTexture(Transform _transform, float _rayDistance, out RaycastHit _raycastHit) { TextureAttributes ta = null; if (Physics.Raycast(_transform.position, -_transform.up, out _raycastHit, _rayDistance)) { if (_raycastHit.transform != null) { ta = _raycastHit.transform.GetComponent <TextureAttributes>(); if (ta != null) { return(ta); } } } return(ta); }
public TextureInstance(IGraphicsContext context, TextureAttributes attributes) { FContext = context; FAttributes = attributes; FAttributesUpdate = false; FContentsUpdate = true; if (context != GraphicsContext.CurrentContext) ContextRegister.BindContext(context); GL.Enable(EnableCap.Texture2D); GL.GenTextures(1, out this.FID); GL.BindTexture(TextureTarget.Texture2D, this.FID); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); }
private void CalcScanFeatures(TextureHandProperties _hand, TextureAttributes _attribute) { if (_alwaysOn) { _currentHandVelocityThreshold = 0; } else { _currentHandVelocityThreshold = _handVelocityThreshold; } if (_attribute != null && _hand.handMagnitude > _currentHandVelocityThreshold) { if (_modulateIntensityByHandVelocity) { HapticRunner.Circles[(int)_hand.chirality].Intensity = HeightValue( _hand.handRayResult.textureCoord, _attribute.HeightMap, _attribute.MinIntensity, _attribute.MaxIntensity * GetModulatedIntensityByHandVelocity(_hand.handMagnitude)); } else { HapticRunner.Circles[(int)_hand.chirality].Intensity = HeightValue( _hand.handRayResult.textureCoord, _attribute.HeightMap, _attribute.MinIntensity, _attribute.MaxIntensity); } if (_modulateFrequencyByHandVelocity) { HapticRunner.Circles[(int)_hand.chirality].Frequency = _attribute.Smoothness + ((_attribute.Smoothness / 2) * GetModulatedFrequencyByHandVelocity(_hand.handMagnitude)); } else { HapticRunner.Circles[(int)_hand.chirality].Frequency = _attribute.Smoothness; } } else { HapticRunner.Circles[(int)_hand.chirality].Intensity = 0; } }
/// <summary> /// Contains the definition for individual faces /// </summary> /// <param name="defaultTexture"></param> public TextureEntryFace(TextureEntryFace defaultTexture) { rgba = Color4.White; repeatU = 1.0f; repeatV = 1.0f; DefaultTexture = defaultTexture; if (DefaultTexture == null) hasAttribute = TextureAttributes.All; else hasAttribute = TextureAttributes.None; }
/// <summary> /// Contains the definition for individual faces /// </summary> /// <param name="defaultTexture"></param> public TextureEntryFace(TextureEntryFace defaultTexture) { DefaultTexture = defaultTexture; if (DefaultTexture == null) hasAttribute = TextureAttributes.All; else hasAttribute = TextureAttributes.None; }