Index Topic Contents | |||
Previous Topic: IDirect3DRMWrap Next Topic: Enumerated Types |
Structures
The Microsoft® Direct3D® Retained Mode structures are:
- D3DRMBOX
- D3DRMIMAGE
- D3DRMLOADMEMORY
- D3DRMLOADRESOURCE
- D3DRMPALETTEENTRY
- D3DRMPICKDESC
- D3DRMPICKDESC2
- D3DRMPMESHLOADSTATUS
- D3DRMQUATERNION
- D3DRMRAY
- D3DRMVECTOR4D
- D3DRMVERTEX
D3DRMBOXDefines the bounding box retrieved by the IDirect3DRMMesh::GetBox and IDirect3DRMMeshBuilder::GetBox methods.
typedef struct _D3DRMBOX { D3DVECTOR min, max; }D3DRMBOX; typedef D3DRMBOX *LPD3DRMBOX;Members
- min and max
- Values defining the bounds of the box. These values are D3DVECTOR structures.
See Also
D3DVECTOR, IDirect3DRMMesh::GetBox, IDirect3DRMMeshBuilder::GetBox
D3DRMIMAGEDescribes an image that is attached to a texture by the IDirect3DRM::CreateTexture method. IDirect3DRMTexture::GetImage returns the address of this image.
typedef struct _D3DRMIMAGE { int width, height; int aspectx, aspecty; int depth; int rgb; int bytes_per_line; void* buffer1; void* buffer2; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; unsigned long alpha_mask; int palette_size; D3DRMPALETTEENTRY* palette; }D3DRMIMAGE; typedef D3DRMIMAGE, *LPD3DRMIMAGE;Members
- width and height
- Width and height of the image, in pixels.
- aspectx and aspecty
- Aspect ratio for nonsquare pixels.
- depth
- Number of bits that specify each pixel.
- rgb
- A flag that indicates whether pixels are RGB values or palette indices. If this member is FALSE, pixels are indices into a palette. Otherwise, pixels encode RGB values.
- bytes_per_line
- Number of bytes of memory for a scan line. This value must be a multiple of four.
- buffer1
- Memory to render into (first buffer).
- buffer2
- Second rendering buffer for double buffering. Set this member to NULL for single buffering.
- red_mask, green_mask, blue_mask, and alpha_mask
- A mask for RGB pixels or pixel palette indices. If rgb is TRUE, these members are masks for the red, green, and blue parts of a pixel. Otherwise, they are masks for the significant bits of the red, green, and blue elements in the palette. For example, most Super VGA (SVGA) displays use 64 intensities of red, green, and blue, so the masks should all be set to 0xfc.
- palette_size
- Number of entries in the palette.
- palette
- A pointer to a D3DRMPALETTEENTRY structure describing the color palette to be used. This structure is only used if the D3DRMIMAGE rgb member is FALSE.
See Also
IDirect3DRM::CreateTexture, IDirect3DRMTexture::GetImage
D3DRMLOADMEMORYIdentifies a resource to be loaded when an application uses the IDirect3DRM::Load method (or one of the other Load methods) and specifies D3DRMLOAD_FROMMEMORY.
typedef struct _D3DRMLOADMEMORY { LPVOID lpMemory; DWORD dSize; } D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;Members
- lpMemory
- Address of a block of memory to be loaded.
- dSize
- Size, in bytes, of the block of memory to be loaded.
See Also
IDirect3DRM::Load, IDirect3DRMAnimationSet::Load, IDirect3DRMFrame::Load, IDirect3DRMMeshBuilder::Load, D3DRMLOADOPTIONS, D3DRMLOADRESOURCE
D3DRMLOADRESOURCEIdentifies a resource to be loaded when an application uses the IDirect3DRM::Load method (or one of the other Load methods) and specifies D3DRMLOAD_FROMRESOURCE.
typedef struct _D3DRMLOADRESOURCE { HMODULE hModule; LPCTSTR lpName; LPCTSTR lpType; } D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;Members
- hModule
- Handle of the module containing the resource to be loaded. If this member is NULL, the resource must be attached to the using executable file.
- lpName
- Name of the resource to be loaded. For example, if the resource is a mesh, this member should specify the name of the mesh file.
- lpType
- User-defined type identifying the resource.
Remarks
If the high-order word of the lpName or lpType member is zero, the low-order word specifies the integer identifier of the name or type of the given resource. Otherwise, those parameters are long pointers to null-terminated strings. If the first character of the string is a number sign (#), the remaining characters represent a decimal number that specifies the integer identifier of the resource's name or type. For example, the string "#258" represents the integer identifier 258. An application should reduce the amount of memory required for the resources by referring to them by integer identifier instead of by name.
When an application uses a Load method and specifies D3DRMLOAD_FROMRESOURCE, it does not need to find or unlock any resources; the system handles this automatically.
See Also
IDirect3DRM::Load, IDirect3DRMAnimationSet::Load, IDirect3DRMFrame::Load, IDirect3DRMMeshBuilder::Load, D3DRMLOADMEMORY, D3DRMLOADOPTIONS
D3DRMPALETTEENTRYDescribes the color palette used in a D3DRMIMAGE structure. This structure is used only if the rgb member of the D3DRMIMAGE structure is FALSE. (If it is TRUE, RGB values are used.)
typedef struct _D3DRMPALETTEENTRY { unsigned char red; unsigned char green; unsigned char blue; unsigned char flags; }D3DRMPALETTEENTRY; typedef D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;Members
- red, green, and blue
- Values defining the primary color components that define the palette. These values can range from 0 through 255.
- flags
- Value defining how the palette is used by the renderer. This value is one of the members of the D3DRMPALETTEFLAGS enumerated type.
See Also
D3DRMPICKDESC
Contains the pick position and face and group identifiers of the objects retrieved by the IDirect3DRMPickedArray::GetPick method.
typedef struct _D3DRMPICKDESC { ULONG ulFaceIdx; LONG lGroupIdx; D3DVECTOR vPosition; } D3DRMPICKDESC, *LPD3DRMPICKDESC;Members
- ulFaceIdx
- 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 structure.
See Also
D3DVECTOR, IDirect3DRMPickedArray::GetPick
D3DRMPICKDESC2Contains 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 IDirect3DRMPicked2Array::GetPick method.
typedef struct _D3DRMPICKDESC2 { ULONG ulFaceIdx; LONG lGroupIdx; D3DVECTOR dvPosition; D3DVALUE tu; D3DVALUE tv; D3DVECTOR dvNormal; D3DCOLOR dcColor; } D3DRMPICKDESC2, *LPD3DRMPICKDESC2;Members
- ulFaceIdx
- 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 structure.
- tu and tv
- Horizontal and vertical texture coordinates, respectively, for the vertex.
- dvNormal
- Normal vector for the vertex.
- dcColor
- Vertex color.
D3DRMPMESHLOADSTATUS
Contains the loading status of a progressive mesh loaded with the IDirect3DRMProgressiveMesh::Load method. This structure can be retrieved with the IDirect3DRMProgressiveMesh::GetLoadStatus method.
typedef struct _D3DRMPMESHLOADSTATUS { DWORD dwSize; DWORD dwPMeshSize; DWORD dwBaseMeshSize; DWORD dwBytesLoaded; DWORD dwVerticesLoaded; DWORD dwFacesLoaded; DWORD dwFlags; } D3DRMPMESHLOADSTATUS; typedef D3DRMPMESHLOADSTATUS *LPD3DRMPMESHLOADSTATUS;Members
- dwSize
- Size of the structure.
- dwPMeshSize
- Size of the total progressive mesh in bytes.
- dwBaseMeshSize
- Size of the base mesh in bytes.
- dwBytesLoaded
- Number of total bytes loaded.
- dwVerticesLoaded
- Number of vertices loaded.
- dwFacesLoaded
- Number of faces loaded.
- dwFlags
- 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 IDirect3DRMProgressiveMesh::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.
See Also
IDirect3DRMProgressiveMesh::GetLoadStatus, IDirect3DRMProgressiveMesh::Load
D3DRMQUATERNIONDescribes the rotation used by the IDirect3DRMAnimation::AddRotateKey method, and the quaternion used in IDirect3DRMFrame2::SetQuaternion. It is also used in several of the Direct3D mathematical functions.
typedef struct _D3DRMQUATERNION { D3DVALUE s; D3DVECTOR v; }D3DRMQUATERNION; typedef D3DRMQUATERNION, *LPD3DRMQUATERNION;See Also
IDirect3DRMAnimation::AddRotateKey, IDirect3DRMFrame2::SetQuaternion, D3DRMQuaternionFromRotation, D3DRMQuaternionMultiply, D3DRMQuaternionSlerp, D3DRMMatrixFromQuaternion
D3DRMRAYDefines the direction and starting position of the ray in IDirect3DRMFrame2::RayPick.
typedef struct _D3DRMRAY { D3DVECTOR dvDir; D3DVECTOR dvPos; } D3DRMRAY, *LPD3DRMRAY;Members
- dvDir
- Direction of the ray used in a ray pick.
- dvPos
- Starting position of the ray used in a ray pick.
D3DRMVECTOR4DDescribes the screen coordinates used as the destination of a transformation by the IDirect3DRMViewport::Transform method and as the source of a transformation by the IDirect3DRMViewport::InverseTransform method.
typedef struct _D3DRMVECTOR4D { D3DVALUE x; D3DVALUE y; D3DVALUE z; D3DVALUE w; }D3DRMVECTOR4D; typedef D3DRMVECTOR4D, *LPD3DRMVECTOR4D;Members
- x, y, z, and w
- Values of the D3DVALUE type describing homogeneous values. These values define the result of the transformation.
See Also
IDirect3DRMViewport::Transform, IDirect3DRMViewport::InverseTransform
D3DRMVERTEXDescribes a vertex in a Direct3DRMMesh object.
typedef struct _D3DRMVERTEX{ D3DVECTOR position; D3DVECTOR normal; D3DVALUE tu, tv; D3DCOLOR color; } D3DRMVERTEX;Members
- position
- Position of the vertex.
- normal
- Normal vector for the vertex.
- tu and tv
- Horizontal and vertical texture coordinates, respectively, for the vertex.
- color
- Vertex color.
See Also
IDirect3DRMMesh::GetVertices, IDirect3DRMMesh::SetVertices
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.