TerrainBlock::Material
by Tim "Zear" Hammock · in Torque Game Engine · 08/21/2001 (9:00 am) · 3 replies
Been digging in the terrain data format. In terrData.h I see the line:
inline TerrainBlock::Material *getMaterial(U32 x, U32 y)
...
I suppose it could be that my C++ has gotten so rusty I'm reading that wrong, but isn't that defining a method getMaterial that returns a pointer to a TerrainBlock::Material object? Despite serching the entire source, I can't find a place where a TerrainBlock::Material type is defined (only places where it is used).
Am I just hopelessly lost here? I'd hate to think I forgot that much C++. If anyone can set me straight on what I am missing, I'd truly appreciate it.
inline TerrainBlock::Material *getMaterial(U32 x, U32 y)
...
I suppose it could be that my C++ has gotten so rusty I'm reading that wrong, but isn't that defining a method getMaterial that returns a pointer to a TerrainBlock::Material object? Despite serching the entire source, I can't find a place where a TerrainBlock::Material type is defined (only places where it is used).
Am I just hopelessly lost here? I'd hate to think I forgot that much C++. If anyone can set me straight on what I am missing, I'd truly appreciate it.
#2
(no source code here at work)
Expecially if it's pointing to the texture used for that particular coordinate.
08/21/2001 (9:39 am)
Sounds good to me...(no source code here at work)
Expecially if it's pointing to the texture used for that particular coordinate.
#3
TerrainBlock::Material *pMat = new TerrainBlock::Material;
pMat->nVariable = 1;
return nMat;
10/16/2001 (9:17 pm)
Not looking at the code, TerrainBlock::Material would be a class or struct defined within the scope of TerrainBlock. E.g. TerrainBlock::Material *pMat = new TerrainBlock::Material;
pMat->nVariable = 1;
return nMat;
Torque Owner Tim "Zear" Hammock
If I have got it together now, my understanding is that Material is a member variable of the TerrainBlock class, specifically the struct defined starting at line 115 of terrData.cc...
Somebody please say something if I am just hopelessly lost and don't even know it. Where's that ARM got to... ?