123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- //===========================================================================//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #pragma once
- #define MLR_MLR_I_C_DET_TMESH_HPP
- #include <MLR\MLR.hpp>
- #include <MLR\MLR_I_DeT_TMesh.hpp>
- #include <MLR\MLR_I_C_DeT_PMesh.hpp>
- namespace MidLevelRenderer {
- //##########################################################################
- //###### MLRIndexedTriMesh with color no lighting and detail texture #######
- //##########################################################################
- class MLR_I_C_DeT_TMesh:
- public MLR_I_DeT_TMesh
- {
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Initialization
- //
- public:
- static void
- InitializeClass();
- static void
- TerminateClass();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Constructors/Destructors
- //
- protected:
- MLR_I_C_DeT_TMesh(
- ClassData *class_data,
- Stuff::MemoryStream *stream,
- int version
- );
- ~MLR_I_C_DeT_TMesh();
- public:
- MLR_I_C_DeT_TMesh(ClassData *class_data=MLR_I_C_DeT_TMesh::DefaultData);
- static MLR_I_C_DeT_TMesh*
- Make(
- Stuff::MemoryStream *stream,
- int version
- );
- void
- Save(Stuff::MemoryStream *stream);
- public:
- #if COLOR_AS_DWORD
- virtual void
- SetColorData(
- const DWORD *array,
- int point_count
- );
- virtual void
- GetColorData(
- DWORD **array,
- int *point_count
- );
- #else
- virtual void
- SetColorData(
- const Stuff::RGBAColor *array,
- int point_count
- );
- virtual void
- GetColorData(
- Stuff::RGBAColor **array,
- int *point_count
- );
- #endif
- virtual void
- #if COLOR_AS_DWORD
- PaintMe(const DWORD *paintMe);
- #else
- PaintMe(const Stuff::RGBAColor *paintMe);
- #endif
- virtual int TransformAndClip(Stuff::Matrix4D *, MLRClippingState, GOSVertexPool*,bool=false);
- virtual void
- TransformNoClip(Stuff::Matrix4D*, GOSVertexPool*,bool=false);
- void
- Copy(
- MLR_I_C_TMesh*,
- MLRState detailState,
- Stuff::Scalar xOff,
- Stuff::Scalar yOff,
- Stuff::Scalar xFac,
- Stuff::Scalar yFac
- );
- bool
- Copy(MLR_I_C_DeT_PMesh*);
- virtual void
- HurtMe(const Stuff::LinearMatrix4D&, Stuff::Scalar radius);
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Class Data Support
- //
- public:
- static ClassData
- *DefaultData;
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Testing
- //
- public:
- void
- TestInstance() const;
- virtual int
- GetSize()
- {
- Check_Object(this);
- int ret = MLR_I_DeT_TMesh::GetSize();
- ret += colors.GetSize();
- return ret;
- }
- protected:
- #if COLOR_AS_DWORD
- Stuff::DynamicArrayOf<DWORD> colors; // Base address of color list
- Stuff::DynamicArrayOf<DWORD> *actualColors;
- #else
- Stuff::DynamicArrayOf<Stuff::RGBAColor> colors; // Base address of color list
- Stuff::DynamicArrayOf<Stuff::RGBAColor> *actualColors;
- #endif
- };
- MLR_I_C_DeT_TMesh*
- CreateIndexedTriCube_Color_NoLit_DetTex(Stuff::Scalar, MLRState*);
- MLRShape*
- CreateIndexedTriIcosahedron_Color_NoLit_DetTex (
- IcoInfo&,
- MLRState*,
- MLRState*
- );
- }
|