Visual Basic Types

The Microsoft® Direct3D® Retained Mode types for Microsoft Visual Basic® are:

D3DRMANIMATIONKEY

Defines the keys used by the Direct3DRMAnimation2.AddKey, GetKeys, and ModifyKey methods.

Syntax

Type D3DRMANIMATIONKEY
  x As Single
  y As Single
  z As Single
  s As Single
  dvTime As Single
  lID As Long
  lKeyType As Long
End Type

Members

x
The x value to define a vector.
y
The y value to define a vector
z
The z value to define a vector.
s
The angle in radians used for rotation keys.
dvTime
Time value in arbitrary units.
lID
Key identifier.
lKeyType
Type of key, defining how animations should be played.

Remarks

The members x, y, z, and s either represent the members of a D3DRMQUATERNION type [x, y, z, s] or the members of a D3DVECTOR type [x, y, z]. The rotation key is a D3DRMQUATERNION type defining the rotation, the scale key is the value of the D3DVECTOR type defining the scale, and the position key is the value of the D3DVECTOR type defining the position. Only one key is valid for any particular instance.

D3DRMBOX

Defines the bounding box retrieved by the Direct3DRMMesh.GetBox and Direct3DRMMeshBuilder3.GetBox methods.

Syntax

Type D3DRMBOX
  max As D3DVECTOR
  min As D3DVECTOR
End Type

Members

min and max
Values defining the bounds of the box. These values are D3DVECTOR types.

D3DRMMATERIALOVERRIDE

Describes the overrides for Direct3DRMFrame3.SetMaterialOverride and Direct3DRMFrame3.GetMaterialOverride methods.

Syntax

Type D3DRMMATERIALOVERRIDE
  dcAmbient As D3DCOLORVALUE
  dcDiffuse As D3DCOLORVALUE
  dcEmissive As D3DCOLORVALUE
  dcSpecular As D3DCOLORVALUE
  dvPower As Single
  lFlags As Long
End Type

Members

dcAmbient
Ambient RGB color setting of type D3DCOLORVALUE.
dcDiffuse
Diffuse RGBA color setting of type D3DCOLORVALUE.
dcEmissive
Emissive RGB color setting of type D3DCOLORVALUE.
dcSpecular
Specular RGB color setting of type D3DCOLORVALUE.
dvPower
Power setting.
lFlags
Logical combination of flags, indicating which fields in this type are valid. Possible values include the following:
D3DRMMATERIALOVERRIDE_ALL
D3DRMMATERIALOVERRIDE_AMBIENT
D3DRMMATERIALOVERRIDE_DIFFUSE
D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY
D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY
D3DRMMATERIALOVERRIDE_EMISSIVE
D3DRMMATERIALOVERRIDE_POWER
D3DRMMATERIALOVERRIDE_SPECULAR
D3DRMMATERIALOVERRIDE_TEXTURE

D3DRMPICKDESC

Contains the pick position and face and group identifiers of the objects retrieved by the Direct3DRMPickArray.GetPickFrame method.

Syntax

Type D3DRMPICKDESC
  lFaceIdx As Long
  lGroupIdx As Long
  vPosition As D3DVECTOR
End Type

Members

lFaceIdx
Face index of the retrieved object.
lGroupIdx
Group index of the retrieved object.
vPosition
Value describing the position of the retrieved object. This value is a D3DVECTOR type.

D3DRMPICKDESC2

Contains the face and group identifiers, pick position, horizontal and vertical texture coordinates for the vertex, vertex normal, and color of the objects retrieved by the Direct3DRMPick2Array.GetPickFrame method.

Syntax

Type D3DRMPICKDESC2
  lFaceIdx As Long
  lGroupIdx As Long
  vPosition As D3DVECTOR
  tu As Single
  tv As Single
  vNormal As D3DVECTOR
  color As Long
End Type

Members

lFaceIdx
Face index of the retrieved object.
lGroupIdx
Group index of the retrieved object.
vPosition
Value describing the position of the retrieved object. This value is a D3DVECTOR type.
tu and tv
Horizontal and vertical texture coordinates, respectively, for the vertex.
vNormal
Normal vector for the vertex. This value is a D3DVECTOR type.
color
Vertex color. To specify an object's color, including the alpha component, call the CreateColorRGBA method from the DirectX7 interface on the object.

D3DRMPMESHLOADSTATUS

Contains the loading status of a progressive mesh loaded with the Direct3DRMProgressiveMesh.LoadFromFile method. This type can be retrieved with the Direct3DRMProgressiveMesh.GetLoadStatus method.

Syntax

Type D3DRMPMESHLOADSTATUS
  lBytesLoaded As Long
  lVerticesLoaded As Long
  lFacesLoaded As Long
  lFlags As Long
End Type

Members

lBytesLoaded
Number of total bytes loaded.
lVerticesLoaded
Number of vertices loaded.
lFacesLoaded
Number of faces loaded.
lFlags
Flags that indicate the status of the progressive mesh loading. Can be one of the following values.
D3DRMPMESHSTATUS_VALID
The progressive mesh object contains valid data.
D3DRMPMESHSTATUS_INTERRUPTED
The download was interrupted either because the application used Direct3DRMProgressiveMesh.Abort or because the connection was lost.
D3DRMPMESHSTATUS_BASEMESHCOMPLETE
The base mesh has been downloaded.
D3DRMPMESHSTATUS_COMPLETE
All data has been downloaded.
D3DRMPMESHSTATUS_RENDERABLE
It is now possible to render the mesh.

D3DRMQUATERNION

Describes the rotation used by the Direct3DRMAnimation2.AddRotateKey method, and the quaternion used in Direct3DRMFrame3.SetQuaternion. It is also used in several of the Direct3D mathematical functions.

Syntax

Type D3DRMQUATERNION
  s As Single
  v As D3DVECTOR
End Type

Members

s
Angle.
v
This value is a D3DVECTOR type.

D3DRMRAY

Defines the direction and starting position of the ray in the Direct3DRMFrame3.RayPick method.

Syntax

Type D3DRMRAY
  dir As D3DVECTOR
  pos As D3DVECTOR
End Type

Members

dir
Direction of the ray used in a ray pick. This value is a D3DVECTOR type.
pos
Starting position of the ray used in a ray pick. This value is a D3DVECTOR type.

D3DRMVECTOR4D

Describes the screen coordinates used as the destination of a transformation by the Direct3DRMViewport2.Transform method and as the source of a transformation by the Direct3DRMViewport2.InverseTransform method.

Syntax

Type D3DRMVECTOR4D
  x As Single
  y As Single
  z As Single
  w As Single
End Type

Members

x, y, z, and w
Variables describing homogeneous values. These values define the result of the transformation.

D3DRMVERTEX

Describes a vertex in a Direct3DRMMesh object.

Syntax

Type D3DRMVERTEX
  position As D3DVECTOR
  normal As D3DVECTOR
  tu As Single
  tv As Single
  color As Long
End Type

Members

position
Position of the vertex. This value is a D3DVECTOR type.
normal
Normal vector for the vertex. This value is a D3DVECTOR type.
tu and tv
Horizontal and vertical texture coordinates, respectively, for the vertex.
color
Vertex color. To specify an object's color, including the alpha component, call the CreateColorRGBA method from the DirectX7 interface on the object.

See Also

Direct3DRMMesh.GetVertices, Direct3DRMMesh.SetVertices


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.