IDirect3DRMMeshBuilder3
Applications use the methods of the IDirect3DRMMeshBuilder3 interface to interact with mesh objects. For more information about meshes, see IDirect3DRMMesh. Microsoft® DirectX® version 6.0 introduces the IDirect3DRMMeshBuilder3 interface. For a history of the Direct3D Retained Mode interfaces, see Interface Changes.
You can add vertices and faces individually to a mesh by using the IDirect3DRMMeshBuilder3::AddVertex, AddFace, and AddFaces methods. You can retrieve an individual face with the GetFace method.
You can set normals (which should be unit vectors), or normals can be calculated by averaging the face normals of the surrounding faces by using the GenerateNormals method.
IDirect3DRMMeshBuilder3 extends the older IDirect3DRMMeshBuilder2 and IDirect3DRMMeshBuilder interfaces that it replaces. It adds the DeleteFace, DeleteNormals, and DeleteVertices methods to delete those objects, and the GetNormal and GetVertex methods to retrieve those objects. IDirect3DRMMeshBuilder3 also adds the Empty and Optimize methods.
Other new IDirect3DRMMeshBuilder3 methods retrieve one or more normals, the number of normals, faces, one or more vertices, and the state (enabled or disabled) of the meshbuilder. This interface enables you to set vertices and normals, and to create and retrieve new submeshes and parent meshes of the meshbuilder. IDirect3DRMMeshBuilder3 also enables the application to add new triangles (as opposed to general polygons) to the IDirect3DRMMeshBuilder3 object and, in the process, implicitly create new faces by using the AddTriangles method.
IDirect3DRMMeshBuilder3 and the older IDirect3DRMMeshBuilder2 include the functionality of IDirect3DRMMeshBuilder and additionally extend the GenerateNormals method to give greater control over the mesh normals generated. IDirect3DRMMeshBuilder3 and IDirect3DRMMeshBuilder2 also enable you to retrieve a single mesh face with GetFace.
In DirectX 6.0, you can create a Direct3DRMMeshBuilder3 object by using the IDirect3DRM3 interface, in which case the Direct3DRMMeshBuilder3 object uses the Immediate Mode DrawPrimitive interface for its the implementation.
The methods of the IDirect3DRMMeshBuilder3 interface can be organized into the following groups.
Color GetColorSource SetColor SetColorRGB SetColorSource Creation GetBox Faces AddFace AddFaces AddFacesIndexed CreateFace DeleteFace GetFaceCount GetFace GetFaces Loading Load Meshes AddMesh CreateMesh Miscellaneous AddFrame AddMeshBuilder AddTriangles Empty Enable GetEnable Optimize ReserveSpace Save Scale SetMaterial Translate Normals AddNormal DeleteNormals GenerateNormals GetNormal GetNormals GetNormalCount SetNormal SetNormals Perspective GetPerspective SetPerspective Rendering quality GetQuality SetQuality SubMeshes CreateSubMesh DeleteSubMesh GetParentMesh GetSubMeshes Textures GetTextureCoordinates SetTexture SetTextureCoordinates SetTextureTopology Vertices AddVertex DeleteVertices GetGeometry GetVertex GetVertexColor GetVertexCount GetVertices SetVertex SetVertices SetVertexColor SetVertexColorRGB The IDirect3DRMMeshBuilder3 interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods.
AddRef QueryInterface Release In addition, the IDirect3DRMMeshBuilder3 interface inherits the following methods from the IDirect3DRMObject interface:
AddDestroyCallback Clone DeleteDestroyCallback GetAppData GetClassName GetName SetAppData SetName The Direct3DRMMeshBuilder3 object is obtained by using the IDirect3DRM3::CreateMeshBuilder method.
Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.