16 return reinterpret_cast<void*
>(&m_data);
27 if (*
reinterpret_cast<int*
>(&a) > 0) {
77 unsigned int vcount, fcount, vperface;
83 unsigned int* faceBuffer =
new unsigned int[dataSize];
94 LPDIRECT3DRMTEXTURE textureRef;
104 result =
ResultVal(pMesh->AddGroup(vcount, fcount, 3, faceBuffer, &index));
108 result =
ResultVal(pMesh->SetVertices(index, 0, vcount, vertexBuffer));
111 result =
ResultVal(pMesh->SetGroupTexture(index, textureRef));
114 result =
ResultVal(pMesh->SetGroupMapping(index, mapping));
117 result =
ResultVal(pMesh->SetGroupQuality(index, quality));
120 result =
ResultVal(pMesh->SetGroupColor(index, color));
129 delete[] vertexBuffer;
167 newGroup->m_data = newData;
182 IDirect3DRMTexture* texture;
[AI] Implements Tgl::MeshBuilder, manages mesh construction and provides the interface for creating g...
const MeshBuilderDataType & ImplementationData() const
Gets mesh builder pointer (const) [AI].
[AI] Implementation of Tgl::Mesh, manages a mesh object and geometry data with group index [AI]
Result SetColor(float r, float g, float b, float a) override
Sets the color for this mesh [AI].
Result SetTextureMappingMode(TextureMappingMode) override
Sets the mesh texturing mode (UV/cylindrical/etc.) [AI].
void * ImplementationDataPtr() override
Returns pointer to mesh implementation data [AI].
Result GetTexture(Texture *&) override
Retrieves the texture currently assigned to this mesh [AI].
const MeshDataType & ImplementationData() const
Gets mesh implementation data (const) [AI].
MeshImpl()
[AI] Initializes mesh data pointer [AI]
Mesh * ShallowClone(MeshBuilder *) override
Creates a shallow copy of this mesh using a mesh builder [AI].
Mesh * DeepClone(MeshBuilder *) override
Creates a deep copy of this mesh using a mesh builder [AI].
Result SetTexture(const Texture *) override
Assigns a texture to this mesh [AI].
Result SetShadingModel(ShadingModel) override
Sets mesh shading model (flat, Gouraud, etc.) [AI].
[AI] Implements Tgl::Texture using a Direct3DRMTexture; provides upload and palette control [AI]
void SetImplementation(IDirect3DRMTexture *pData)
Replaces implementation pointer [AI].
[AI] Builder class for assembling mesh data and extracting mesh objects.
[AI] Represents a renderable 3D mesh.
[AI] Represents a GPU or system memory texture for use in rendering.
D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red, D3DVALUE green, D3DVALUE blue, D3DVALUE alpha)
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
Result MeshSetShadingModel(MeshImpl::MeshData *pMesh, ShadingModel model)
Result MeshDeepClone(MeshImpl::MeshData *pSource, MeshImpl::MeshData *&rpTarget, IDirect3DRMMesh *pMesh)
[AI] Forward declaration for Direct3DRMTexture interface [AI]
Result ResultVal(HRESULT result)
Returns a Tgl Result value for HRESULT [AI].
D3DRMRENDERQUALITY Translate(ShadingModel tglShadingModel)
Converts Tgl shading model enum to D3DRM enum [AI].
int Succeeded(Result result)
[AI] Returns whether a Tgl::Result indicates success.
ShadingModel
[AI] Represents shading models available for rendering geometry.
TextureMappingMode
[AI] Methods for mapping textures onto geometry.
@ PerspectiveCorrect
[AI] Perspective-correct mapping (higher quality). [AI]
Result
[AI] Result type used throughout the Tgl API to report operation success or failure.
@ Success
[AI] Operation succeeded. [AI]
[AI] Holds D3DRMMesh pointer and group index for referencing geometry [AI]
D3DRMGROUPINDEX groupIndex
[AI] Index within mesh group [AI]
IDirect3DRMMesh * groupMesh
[AI] D3DRM mesh pointer [AI]