Click or drag to resize
AB4D logo

PixelsVisual3D Methods

The PixelsVisual3D type exposes the following members.

Methods
 NameDescription
Public methodChangePositionArrays ChangePositionArrays method can be used to change Positions, PixelColors and PixelSizes with one method. This is needed when the number of positions is changed compared to the previous count in the Positions array.
Public methodRemoveTexture Removes the texture that was set by calling SetTexture method.
Public methodResetFixedUpVector Resets the fixed up vector that was set by SetFixedUpVector(Vector3) to default behaviour (pixels always face the camera so that their up vector is perpendicular to the look direction).
Public methodSetFixedUpVector SetFixedUpVector sets a fixed up Vector3 to be always used for up vector when orienting pixel towards the camera. By default, pixels always face the camera so that their up vector is perpendicular to the look direction. But for some cases (for example for rendering trees that always grow upwards), you can fix the up vector. To reset that up vector to default behaviour, call ResetFixedUpVector. Fixed up vector can be used only when IsWorldSize is set to true.
Public methodSetTexture(ShaderResourceView, Size2, SamplerState, BlendState) SetTexture method sets the specified texture to be rendered for each pixel. This value is used when the object does not provide a PixelMaterial. When rendering texture, AlphaClipThreshold is set to 0.5 (pixel with alpha color values below this value will be clipped). To remove the texture, set the pixelTexture to null or call RemoveTexture.
Public methodSetTexture(ShaderResourceView, Size2, Color, SamplerState, BlendState) SetTexture method sets the specified texture to be rendered for each pixel. This value is used when the object does not provide a PixelMaterial. When rendering texture, AlphaClipThreshold is set to 0.5 (pixel with alpha color values below this value will be clipped). To remove the texture, set the pixelTexture to null or call RemoveTexture.
Public methodUpdatePixelColors UpdatePixelColors method updates the DirectX vertex buffer from the current values of PixelColors.
Public methodUpdatePixelSizes UpdatePixelSizes method updates the DirectX vertex buffer from the current values of PixelSize.
Public methodUpdatePositions UpdatePositions updates the DirectX vertex buffer from the existing Positions array. This method must be called when the values defined in the Positions array are changed.
Top
Extension Methods
 NameDescription
Public Extension MethodClearDXAttribute Clears the value from DXAttributeType so that IsDXAttributeSet(Visual3D, DXAttributeType) method returns false for that DXAttributeType.
(Defined by Extensions)
Public Extension MethodGetDXAttribute Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then an exception is thrown. Use GetDXAttributeOrDefaultT(Visual3D, DXAttributeType) or GetDXAttributeOrDefaultT(Visual3D, DXAttributeType, T) to prevent throwing exception when the value is not set.
(Defined by Extensions)
Public Extension MethodGetDXAttributeCollection Gets a DXAttributeCollection will a collection of all DXEngine's attributes set to the specified WPF's object. Returns null when no DXAttributeCollection was attached to the WPF object.
(Defined by Extensions)
Public Extension MethodGetDXAttributeOrDefaultT Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then a default value for the type T is returned.
(Defined by Extensions)
Public Extension MethodGetDXAttributeOrDefaultT Gets the value of the specified DXAttributeType from the specified Visual3D. If the attributeType does not exists then the specified defaultValue is returned.
(Defined by Extensions)
Public Extension MethodIsDXAttributeSet Returns true if the specified attributeType was set (result is true even if the value is null).
(Defined by Extensions)
Public Extension MethodSetDXAttribute Annotates the specified wpfObject with adding or updating a DXEngine's attribute to it. The attribute is specified with attributeType and its value. This can be used to annotate WPF's objects with DXEngine's attributes.
(Defined by Extensions)
Top
See Also