UIImageKnob

UIKnob which replace the knob part by a rotated PBR image.

Constructors

this
this(UIContext context, KnobImage knobImage, Parameter parameter)

knobImage should have been loaded with loadKnobImage. Warning: knobImage must outlive the knob, it is borrowed.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

drawKnob
void drawKnob(ImageRef!RGBA diffuseMap, ImageRef!L16 depthMap, ImageRef!RGBA materialMap, box2i[] dirtyRects)
Undocumented in source. Be warned that the author may not have intended to support it.
lazyResizeBADAMA16
void lazyResizeBADAMA16(ImageResizer* resizer)
Undocumented in source. Be warned that the author may not have intended to support it.
reflow
void reflow()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

numMipLevels
enum numMipLevels;
Undocumented in source.

Variables

_alphaTexture
Mipmap!L16 _alphaTexture;
Undocumented in source.
_depthTexture
Mipmap!L16 _depthTexture;
Undocumented in source.
_diffuseTexture
Mipmap!RGBA _diffuseTexture;
Undocumented in source.
_knobImage
KnobImage _knobImage;
Undocumented in source.
_materialTexture
Mipmap!RGBA _materialTexture;
Undocumented in source.
_resizedImage
Mipmap!RGBA16 _resizedImage;
Undocumented in source.
_tempBuf
OwnedImage!L16 _tempBuf;
Undocumented in source.
_tempBufRGBA
OwnedImage!RGBA _tempBufRGBA;
Undocumented in source.
_textureHeight
int _textureHeight;
Undocumented in source.
_textureWidth
int _textureWidth;
Undocumented in source.
depthInterpolation
KnobInterpolationType depthInterpolation;

Texture interpolaton used, only for non-legacy mode (BADAMA_16 format). Try it on a big screen preferably.

diffuseInterpolation
KnobInterpolationType diffuseInterpolation;

Texture interpolaton used, only for non-legacy mode (BADAMA_16 format). Try it on a big screen preferably.

drawToDepth
bool drawToDepth;

If true, depth data is blended in the depth map using alpha information. If false, depth is left untouched.

drawToDiffuse
bool drawToDiffuse;

If true, diffuse data is blended in the diffuse map using alpha information. If false, diffuse is left untouched.

drawToMaterial
bool drawToMaterial;

If true, material data is blended in the material map using alpha information. If false, material is left untouched.

emissive
ubyte emissive;

Amount of static emissive energy to the Emissive channel.

emissiveDragged
ubyte emissiveDragged;

Amount of static emissive energy to add when mouse is over, but not dragging.

emissiveHovered
ubyte emissiveHovered;

Amount of static emissive energy to add when mouse is over, but not dragging.

materialInterpolation
KnobInterpolationType materialInterpolation;

Texture interpolaton used, only for non-legacy mode (BADAMA_16 format). Try it on a big screen preferably.

oversampleTexture
float oversampleTexture;

Only used in non-legacy mode (BADAMA_16 format). The texture is oversampled on resize, so that rotated image is sharper. This costs more CPU and memory, for better visual results. But this is also dangerous and not always better! Try it on a big screen preferably.

Inherited Members

From UIKnob

defaultSensivity
enum defaultSensivity;
Undocumented in source.
knobRadius
float knobRadius;
Undocumented in source.
knobDiffuse
RGBA knobDiffuse;
Undocumented in source.
knobMaterial
RGBA knobMaterial;
Undocumented in source.
style
KnobStyle style;
Undocumented in source.
emissive
ubyte emissive;
Undocumented in source.
emissiveHovered
ubyte emissiveHovered;
Undocumented in source.
emissiveDragged
ubyte emissiveDragged;
Undocumented in source.
numLEDs
int numLEDs;
Undocumented in source.
LEDRadiusMin
float LEDRadiusMin;
Undocumented in source.
LEDRadiusMax
float LEDRadiusMax;
Undocumented in source.
LEDDiffuseLit
RGBA LEDDiffuseLit;
Undocumented in source.
LEDDiffuseUnlit
RGBA LEDDiffuseUnlit;
Undocumented in source.
LEDMaterial
RGBA LEDMaterial;
Undocumented in source.
LEDDistanceFromCenter
float LEDDistanceFromCenter;
Undocumented in source.
LEDDistanceFromCenterDragged
float LEDDistanceFromCenterDragged;
Undocumented in source.
LEDDepth
ushort LEDDepth;
Undocumented in source.
hasTrail
bool hasTrail;
Undocumented in source.
litTrailDiffuse
RGBA litTrailDiffuse;
Undocumented in source.
unlitTrailDiffuse
RGBA unlitTrailDiffuse;
Undocumented in source.
trailRadiusMin
float trailRadiusMin;
Undocumented in source.
trailRadiusMax
float trailRadiusMax;
Undocumented in source.
trailOffsetX
float trailOffsetX;
Undocumented in source.
trailOffsetY
float trailOffsetY;
Undocumented in source.
trailMinAngle
float trailMinAngle;
Undocumented in source.
trailBaseAngle
float trailBaseAngle;
Undocumented in source.
trailMaxAngle
float trailMaxAngle;
Undocumented in source.
litTrailDiffuseAlt
RGBA litTrailDiffuseAlt;
Undocumented in source.
hasAlternateTrail
bool hasAlternateTrail;
Undocumented in source.
animationTimeConstant
float animationTimeConstant;
Undocumented in source.
sensivity
float sensivity;

Sensivity: given a mouse movement in 100th of the height of the knob, how much should the normalized parameter change.

~this
~this()
Undocumented in source.
onAnimate
void onAnimate(double dt, double time)
Undocumented in source. Be warned that the author may not have intended to support it.
onDrawPBR
void onDrawPBR(ImageRef!RGBA diffuseMap, ImageRef!L16 depthMap, ImageRef!RGBA materialMap, box2i[] dirtyRects)
Undocumented in source. Be warned that the author may not have intended to support it.
drawTrail
void drawTrail(ImageRef!RGBA diffuseMap, ImageRef!L16 depthMap, ImageRef!RGBA materialMap, box2i[] dirtyRects)
Undocumented in source. Be warned that the author may not have intended to support it.
drawKnob
void drawKnob(ImageRef!RGBA diffuseMap, ImageRef!L16 depthMap, ImageRef!RGBA materialMap, box2i[] dirtyRects)
Undocumented in source. Be warned that the author may not have intended to support it.
roundParamValue
double roundParamValue(double normalizedValue, MouseState mstate)

Override this to round the parameter normalized value to some particular values. For example for a special drag movement with right-click or control-click. Default does nothing.

onMouseClick
Click onMouseClick(int x, int y, int button, bool isDoubleClick, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseDrag
void onMouseDrag(int x, int y, int dx, int dy, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onBeginDrag
void onBeginDrag()
Undocumented in source. Be warned that the author may not have intended to support it.
onStopDrag
void onStopDrag()
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseMove
void onMouseMove(int x, int y, int dx, int dy, MouseState mstate)
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseEnter
void onMouseEnter()
Undocumented in source. Be warned that the author may not have intended to support it.
onMouseExit
void onMouseExit()
Undocumented in source. Be warned that the author may not have intended to support it.
onParameterChanged
void onParameterChanged(Parameter sender)
Undocumented in source. Be warned that the author may not have intended to support it.
onBeginParameterEdit
void onBeginParameterEdit(Parameter sender)
Undocumented in source. Be warned that the author may not have intended to support it.
onEndParameterEdit
void onEndParameterEdit(Parameter sender)
Undocumented in source. Be warned that the author may not have intended to support it.
onBeginParameterHover
void onBeginParameterHover(Parameter sender)
Undocumented in source. Be warned that the author may not have intended to support it.
onEndParameterHover
void onEndParameterHover(Parameter sender)
Undocumented in source. Be warned that the author may not have intended to support it.
_param
Parameter _param;

The parameter this knob is linked with.

_pushedAnimation
float _pushedAnimation;
Undocumented in source.
_shouldBeHighlighted
bool _shouldBeHighlighted;
Undocumented in source.
_mousePosOnLast0Cross
float _mousePosOnLast0Cross;
Undocumented in source.
_mousePosOnLast1Cross
float _mousePosOnLast1Cross;
Undocumented in source.
_normalizedValueWhileDragging
float _normalizedValueWhileDragging;
Undocumented in source.
_displacementInHeightDebt
double _displacementInHeightDebt;
Undocumented in source.
angleConvert
float angleConvert(float angle)

Exists because public angle properties are given in a different referential, where 0 is at the top

getMinAngle
float getMinAngle()

Min angle of the trail, fit for aaFillSector.

getMaxAngle
float getMaxAngle()

Min angle of the trail, fit for aaFillSector.

getBaseAngle
float getBaseAngle()

Max angle of the trail, fit for aaFillSector.

getValueAngle
float getValueAngle()

Angle of the trail, fit for aaFillSector.

clearCrosspoints
void clearCrosspoints()
Undocumented in source. Be warned that the author may not have intended to support it.
containsPoint
bool containsPoint(int x, int y)
Undocumented in source. Be warned that the author may not have intended to support it.
getSubsquare
box2i getSubsquare()
getRadius
float getRadius()
Undocumented in source. Be warned that the author may not have intended to support it.
getCenter
vec2f getCenter()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta