Home Download and Buy What's New Live Demos Contact Us
 
5.Gif
8.Pen
9.UV

Search this site
 

 

Object Reference
UV Object

The UV object (new in Version 2.8) encapsulates numerous parameters used by the DrawImageUV method to render images mapped to 3D surfaces. This functionality is covered in Chapter 11.

Properties Methods
AmbientLight
BrightnessMax
BrightnessMin
CameraAngle
CameraX
CameraY
CameraZ
DiffuseLight
DisplayImage
DisplayShading
DisplayWireframe
FlipNormals
HideBackFace
ScaleX
ScaleY
Shading
ShiftX
ShiftY
SpecularAlpha
SpecularLight
UMax
UMin
UStep
VMax
VMin
VStep
WireframeColor
WireframeThickness
XFunc
YFunc
ZFunc
ResetCamera
RotateCamera
RotateCameraAroundAxes
SetLightVector

UV Properties

AmbientLight As Single (read/write)
Specifies the ambient light component. Only used if Shading is True, ignored otherwise. 0.4 by default.

See also: Section 11.5 - Shading.

BrightnessMax As Integer (read/write)
BrightnessMin As Integer (read/write)
Specify the mapping between shading values and the change in brightness for the corresponding pixels of the image being rendered.

See also: Section 11.5 - Shading.

CameraAngle As Single (read/write)
Specifies the virtual camera's view angle (in degrees) which affects the degree of perspective. 30° by default.

See also: Section 11.4 - Surface Visualization.

CameraX As Single (read/write)
CameraY As Single (read/write)
CameraZ As Single (read/write)
Specify the location of the virtual camera. (5, 0, 0) by default.

See also: Section 11.4 - Surface Visualization.

DiffuseLight As Single (read/write)
Specifies the diffuse light component. Only used if Shading is True, ignored otherwise. 0.6 by default.

See also: Section 11.5 - Shading.

DisplayImage As Boolean (read/write)
Specifies whether the pixels of the image being rendered should be displayed on the 3D surface. True by default. Can be set to False for debugging purposes so that the wireframe and/or shading can be viewed by themselves. This property and DisplayShading cannot both be True.

See also: Section 11.5 - Shading.

DisplayShading As Boolean (read/write)
Specifies whether the shading pattern should be displayed on the 3D surface instead of the image. False by default. Useful for debugging purposes. This property and DisplayImage cannot both be True.

See also: Section 11.5 - Shading.

DisplayWireframe As Boolean (read/write)
Specifies whether the wireframe should be displayed on the 3D surface in addition to, or instead of the image/shading. False by default. Useful for debugging purposes. This property cannot be False if DisplayImage and DisplayShading are both False. The color and thickness of the wireframe are specified via the WireframeColor and WireframeThickness properties.

See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.

FlipNormals As Boolean (read/write)
Specifies whether the direction of the normal vectors of all surface faces should be reversed. False by default. Depending on the way the surface is defined, the normals may be pointing towards, or away from, the camera by default. If they point in the "wrong" direction, the faces may not receive proper shading, and may also be wrongly hidden by the HideBackFace property. Set this property to True to fix those problems.

See also: Section 11.5 - Shading.

HideBackFace As Boolean (read/write)
If set to True, hides the faces pointing away from the camera. False by default. This property is useful for displaying a surface that should appear wrapped around an object depicted on the background canvas, such as a pen, mug or baseball cap.

See also: Section 11.4 - Surface Visualization.

ScaleX As Single (read/write)
ScaleY As Single (read/write)
Specify horizontal and vertical scaling factors affecting the mapping of the image being rendered to the 3D surface on which it is rendered. (1, 1) by default. These properties cannot be 0 but can be negative. A number with the absolute value greater than 1 shrinks the image along the corresponding axis into a tiling pattern, and a number with the absolute value between 0 and 1 stretches it. A negative number for ScaleX flips the image horizontally, and for ScaleY vertically.

See also: Section 11.3 - Specifying Parametric Equations via UV Object.

Shading As Boolean (read/write)
Enables shading for the image being rendered. False by default. Shading greatly improves the visual perception of depth. Without it, the image may look flat.

See also: Section 11.5 - Shading.

ShiftX As Single (read/write)
ShiftY As Single (read/write)
Specify the horizontal and vertical displacement of the rendered image relative to the canvas. By default, the 3D view is transferred onto the canvas in such a way that its center is positioned right over the center of the canvas. For fune-tuning purposes, the image may need to be shifted slightly up, down or sideways to match the content of the canvas. These properties help with this task.

See also: Section 11.4 - Surface Visualization, Section 11.6 - Putting It All Together.

SpecularAlpha As Single (read/write)
Specifies the "alpha" value in the Phong reflection model for the specular light component. This value affects the size of a specular highlight. Only used if Shading is True, ignored otherwise. 100 by default.

See also: Section 11.5 - Shading.

SpecularLight As Single (read/write)
Specifies the specular light component. Only used if Shading is True, ignored otherwise. 0.3 by default.

See also: Section 11.5 - Shading.

UMax As Single (read/write)
UMin As Single (read/write)
Specify the inclusive range for the U parameter in the parametric equations defining the 3D surface. UMax must be greater than UMin. These properties are required.

See also: Section 11.2 - Parametric Representation of 3D Surfaces.

UStep As Integer (read/write)
Specifies the number of steps for the U parameter. This property is required, and must be 1 or greater.

See also: Section 11.2 - Parametric Representation of 3D Surfaces.

VMax As Single (read/write)
VMin As Single (read/write)
Specify the inclusive range for the V parameter in the parametric equations defining the 3D surface. VMax must be greater than VMin. These properties are required.

See also: Section 11.2 - Parametric Representation of 3D Surfaces.

VStep As Integer (read/write)
Specifies the number of steps for the V parameter. This property is required, and must be 1 or greater.

See also: Section 11.2 - Parametric Representation of 3D Surfaces.

WireframeColor As Long (read/write)
Specifies the wireframe color. Only used if DisplayWireframe is True, ignored otherwise. White (&HFFFFFFFF) by default.

See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.

WireframeThickness As Long (read/write)
Specifies the wireframe thickness. Only used if DisplayWireframe is True, ignored otherwise. 1 by default.

See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.

XFunc As String (read/write)
YFunc As String (read/write)
ZFunc As String (read/write)
Specify the X, Y and Z mathematical equations for the 3D surface being defined. The strings may contain numbers, arithmetic operations, parentheses, parameter names, special names, and function names. These properties are required.

See also: Section 11.3 - Specifying Parametric Equations via UV Object .

UV Methods
Sub ResetCamera()
Resets the camera to its default location, orientation and view angle: the coordinates are reset to (5, 0, 0), lens vector to (-1, 0, 0) and view angle to 30°.

See also: Section 11.4 - Surface Visualization.

Sub RotateCamera(Pitch As Single, Bank As Single, Yaw As Single)
Rotates the camera around its center. Pitch is rotation around the lateral (left-to-right) axis. Bank is rotation around the longitudinal (front-to-back) axis. Yaw is rotation around the vertical axis. The method performs the rotations in the order Pitch-Bank-Yaw. The angles are specified in degrees.

See also: Section 11.4 - Surface Visualization.

Sub RotateCameraAroundAxes(X As Single, Y As Single, Z As Single)
Rotates the camera around the three coordinate axes X, Y and Z. The method performs the rotations in the order X-Y-Z. The angles are specified in degrees.

See also: Section 11.4 - Surface Visualization.

Sub SetLightVector(X As Single, Y As Single, Z As Single)
Specifies the direction of the light vector. By default the light vector is parallel to the X-axis and points in the opposite direction to it. The default vector values are (-1, 0, 0). The X, Y and Z values cannot all be 0. The light vector affects the way the surface is shaded.

See also: Section 11.5 - Shading.


Advanced Image Management Advanced
Image Management
for ASP and .NET