|
resonance 1.0.1
|
One level of detail of a gem kind that TnlGemManager draws as instances of a multi-mesh. More...
#include <tnlgemmeshkind.h>

Public Member Functions | |
| TnlGemMeshKind (Rnd::MultiMesh *pMesh, float flLodOffset, float flCostScale) | |
| Take a multi-mesh as one level of detail and clear its instances. | |
| void | AddDrawTo (Rnd::Drawable *pParent) |
| Add the multi-mesh of this level and of every coarser level to a drawable. | |
| void | SetShowing (int nShowing) |
| Show or hide the multi-mesh of this level and of every coarser level. | |
| float | GetCost () |
| Report the drawing cost one gem at this level adds. | |
Public Attributes | |
| Rnd::MultiMesh * | mMesh |
| float | mLodDistance |
| TnlGemMeshKind * | mNext |
| float | mCost |
One level of detail of a gem kind that TnlGemManager draws as instances of a multi-mesh.
The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from TnlGemManager::AddMeshKind(), which builds one per "<name><n>.mm" multi-mesh it finds and links them through mNext from the finest level to the coarsest. The record is 0x10 bytes, allocated with the untagged scalar allocator.
| TnlGemMeshKind::TnlGemMeshKind | ( | Rnd::MultiMesh * | pMesh, |
| float | flLodOffset, | ||
| float | flCostScale ) |
Take a multi-mesh as one level of detail and clear its instances.
The level applies while a gem lies further ahead than the instanced mesh's Rnd::Mesh::mMinScreen plus flLodOffset. The cost is the triangle count of the instanced mesh times flCostScale. The out-of-line copy has no callers, and TnlGemManager::AddMeshKind() inlines it.
| pMesh | The multi-mesh. |
| flLodOffset | The frames added to the instanced mesh's level of detail threshold. |
| flCostScale | The cost of one triangle. |
| void TnlGemMeshKind::AddDrawTo | ( | Rnd::Drawable * | pParent | ) |
Add the multi-mesh of this level and of every coarser level to a drawable.
Does nothing when pParent is null. Each multi-mesh is added at the end of the draw list.
| pParent | The drawable to add to, or null. |
| void TnlGemMeshKind::SetShowing | ( | int | nShowing | ) |
Show or hide the multi-mesh of this level and of every coarser level.
| nShowing | Non-zero to show. |
| float TnlGemMeshKind::GetCost | ( | ) |
Report the drawing cost one gem at this level adds.
| Rnd::MultiMesh* TnlGemMeshKind::mMesh |
The multi-mesh one instance per gem is added to. Frames ahead of the playhead a gem has to lie for this level to draw it.
| float TnlGemMeshKind::mLodDistance |
| TnlGemMeshKind* TnlGemMeshKind::mNext |
The next coarser level, or null.
| float TnlGemMeshKind::mCost |
The drawing cost of one gem at this level.