Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-21 12:55:12 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-21 12:55:12 +0400
commite78ef29a593857d87b0c35c211d082c8caa80f7b (patch)
treef116204149c3e29cd57b7b2d2bfd629d61dbe479 /source/gameengine/Rasterizer/RAS_MaterialBucket.h
parent2a622e35d4f96a805ab0de22f34d6ae3661a0a53 (diff)
Depth sorting for alpha mesh objects.
- Mesh Objects are sorted by depth (based on object centre.) Using object centre means the user has control over the sort. - Polygons are not sorted. - Polygons are not split. - O(nlog(n))
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.h')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
index 51174c12335..28185dabca6 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
@@ -95,15 +95,9 @@ inline bool operator <( const KX_MeshSlot& rhs,const KX_MeshSlot& lhs)
*/
class RAS_MaterialBucket
{
+public:
typedef std::set<KX_MeshSlot> T_MeshSlotList;
- T_MeshSlotList m_meshSlots;
- bool m_bScheduled;
- bool m_bModified;
- RAS_IPolyMaterial* m_material;
- double* m_pOGLMatrix;
-
-public:
RAS_MaterialBucket(RAS_IPolyMaterial* mat);
virtual ~RAS_MaterialBucket() {}
@@ -127,6 +121,15 @@ public:
bool color,
const MT_Vector4& rgbavec);
+ void RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty,
+ RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, int drawmode);
+ int ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty,
+ RAS_IRenderTools *rendertools);
+
+ unsigned int NumMeshSlots();
+ T_MeshSlotList::iterator msBegin();
+ T_MeshSlotList::iterator msEnd();
+
struct less
{
bool operator()(const RAS_MaterialBucket* x, const RAS_MaterialBucket* y) const
@@ -136,6 +139,14 @@ public:
};
typedef set<RAS_MaterialBucket*, less> Set;
+private:
+
+ T_MeshSlotList m_meshSlots;
+ bool m_bScheduled;
+ bool m_bModified;
+ RAS_IPolyMaterial* m_material;
+ double* m_pOGLMatrix;
+
};
#endif //__KX_BUCKET