Blender V2.61 - r43446
|
#include <RAS_MeshObject.h>
Classes | |
struct | backtofront |
struct | fronttoback |
struct | polygonSlot |
struct | SharedVertex |
Public Member Functions | |
RAS_MeshObject (Mesh *mesh) | |
virtual | ~RAS_MeshObject () |
void | CheckWeightCache (struct Object *obj) |
int | NumMaterials () |
const STR_String & | GetMaterialName (unsigned int matid) |
const STR_String & | GetTextureName (unsigned int matid) |
RAS_MeshMaterial * | GetMeshMaterial (unsigned int matid) |
RAS_MeshMaterial * | GetMeshMaterial (RAS_IPolyMaterial *mat) |
int | GetMaterialId (RAS_IPolyMaterial *mat) |
list< RAS_MeshMaterial >::iterator | GetFirstMaterial () |
list< RAS_MeshMaterial >::iterator | GetLastMaterial () |
void | SetName (const char *name) |
STR_String & | GetName () |
bool | MeshModified () |
void | SetMeshModified (bool v) |
Mesh * | GetMesh () |
virtual RAS_Polygon * | AddPolygon (RAS_MaterialBucket *bucket, int numverts) |
virtual void | AddVertex (RAS_Polygon *poly, int i, const MT_Point3 &xyz, const MT_Point2 &uv, const MT_Point2 &uv2, const MT_Vector4 &tangent, const unsigned int rgbacolor, const MT_Vector3 &normal, bool flat, int origindex) |
void | SchedulePolygons (int drawingmode) |
int | NumVertices (RAS_IPolyMaterial *mat) |
RAS_TexVert * | GetVertex (unsigned int matid, unsigned int index) |
const float * | GetVertexLocation (unsigned int orig_index) |
int | NumPolygons () |
RAS_Polygon * | GetPolygon (int num) const |
virtual void | AddMeshUser (void *clientobj, SG_QList *head, RAS_Deformer *deformer) |
void | RemoveFromBuckets (void *clientobj) |
void | EndConversion () |
void | DebugColor (unsigned int abgr) |
void | SetVertexColor (RAS_IPolyMaterial *mat, MT_Vector4 rgba) |
void | SortPolygons (RAS_MeshSlot &ms, const MT_Transform &transform) |
bool | HasColliderPolygon () |
Public Attributes | |
vector< vector< SharedVertex > > | m_sharedvertex_map |
Protected Attributes | |
vector< int > | m_cacheWeightIndex |
list< RAS_MeshMaterial > | m_materials |
Mesh * | m_mesh |
Definition at line 57 of file RAS_MeshObject.h.
RAS_MeshObject::RAS_MeshObject | ( | Mesh * | mesh | ) |
Definition at line 107 of file RAS_MeshObject.cpp.
References Key::block, ListBase::first, Mesh::key, m_cacheWeightIndex, m_mesh, and KeyBlock::next.
RAS_MeshObject::~RAS_MeshObject | ( | ) | [virtual] |
Definition at line 124 of file RAS_MeshObject.cpp.
References Key::block, ListBase::first, Mesh::key, m_materials, m_mesh, m_sharedvertex_map, MEM_freeN(), KeyBlock::next, NULL, and KeyBlock::weights.
void RAS_MeshObject::AddMeshUser | ( | void * | clientobj, |
SG_QList * | head, | ||
RAS_Deformer * | deformer | ||
) | [virtual] |
Definition at line 429 of file RAS_MeshObject.cpp.
References RAS_MaterialBucket::CopyMesh(), RAS_IPolyMaterial::GetFlag(), RAS_IPolyMaterial::GetMaterialIndex(), RAS_MeshSlot::m_bucket, RAS_MeshSlot::m_clientObj, m_materials, SG_QList::QAddBack(), RAS_BLENDERGLSL, RAS_MeshSlot::SetDeformer(), and RAS_Deformer::UseVertexArray().
RAS_Polygon * RAS_MeshObject::AddPolygon | ( | RAS_MaterialBucket * | bucket, |
int | numverts | ||
) | [virtual] |
Definition at line 268 of file RAS_MeshObject.cpp.
References RAS_MaterialBucket::AddMesh(), RAS_MeshSlot::AddPolygon(), RAS_MeshSlot::CurrentDisplayArray(), GetMeshMaterial(), RAS_MaterialBucket::GetPolyMaterial(), RAS_MeshMaterial::m_baseslot, RAS_MeshMaterial::m_bucket, m_materials, and RAS_MeshSlot::m_mesh.
Referenced by BL_ConvertMesh().
void RAS_MeshObject::AddVertex | ( | RAS_Polygon * | poly, |
int | i, | ||
const MT_Point3 & | xyz, | ||
const MT_Point2 & | uv, | ||
const MT_Point2 & | uv2, | ||
const MT_Vector4 & | tangent, | ||
const unsigned int | rgbacolor, | ||
const MT_Vector3 & | normal, | ||
bool | flat, | ||
int | origindex | ||
) | [virtual] |
Definition at line 325 of file RAS_MeshObject.cpp.
References RAS_Polygon::GetMaterial(), GetMeshMaterial(), RAS_MaterialBucket::GetPolyMaterial(), RAS_Polygon::IsVisible(), RAS_MeshMaterial::m_baseslot, RAS_MeshObject::SharedVertex::m_darray, RAS_MeshObject::SharedVertex::m_offset, m_sharedvertex_map, and RAS_Polygon::SetVertexOffset().
Referenced by BL_ConvertMesh().
void RAS_MeshObject::CheckWeightCache | ( | struct Object * | obj | ) |
Definition at line 576 of file RAS_MeshObject.cpp.
References Key::block, defvert_find_weight(), Mesh::dvert, ListBase::first, get_def_index(), i, Mesh::key, m_cacheWeightIndex, m_mesh, MEM_freeN(), MEM_mallocN(), KeyBlock::next, NULL, Mesh::totvert, KeyBlock::vgroup, and KeyBlock::weights.
Referenced by BL_ShapeDeformer::Update().
void RAS_MeshObject::DebugColor | ( | unsigned int | abgr | ) |
Definition at line 299 of file RAS_MeshObject.cpp.
void RAS_MeshObject::EndConversion | ( | ) | [inline] |
Definition at line 141 of file RAS_MeshObject.h.
References m_sharedvertex_map.
Referenced by BL_ConvertMesh().
list< RAS_MeshMaterial >::iterator RAS_MeshObject::GetFirstMaterial | ( | ) |
Definition at line 205 of file RAS_MeshObject.cpp.
References m_materials.
Referenced by BL_MeshDeformer::Apply(), BL_ConvertMesh(), and BL_MeshDeformer::RecalcNormals().
list< RAS_MeshMaterial >::iterator RAS_MeshObject::GetLastMaterial | ( | ) |
Definition at line 212 of file RAS_MeshObject.cpp.
References m_materials.
Referenced by BL_MeshDeformer::Apply(), BL_ConvertMesh(), and BL_MeshDeformer::RecalcNormals().
int RAS_MeshObject::GetMaterialId | ( | RAS_IPolyMaterial * | mat | ) |
Definition at line 255 of file RAS_MeshObject.cpp.
References m_materials.
const STR_String & RAS_MeshObject::GetMaterialName | ( | unsigned int | matid | ) |
Definition at line 164 of file RAS_MeshObject.cpp.
References RAS_IPolyMaterial::GetMaterialName(), GetMeshMaterial(), RAS_MaterialBucket::GetPolyMaterial(), and RAS_MeshMaterial::m_bucket.
Mesh* RAS_MeshObject::GetMesh | ( | void | ) | [inline] |
Definition at line 112 of file RAS_MeshObject.h.
References m_mesh.
Referenced by KX_BlenderSceneConverter::FreeBlendFile(), KX_Scene::ReplaceMesh(), and CcdShapeConstructionInfo::SetMesh().
RAS_MeshMaterial * RAS_MeshObject::GetMeshMaterial | ( | unsigned int | matid | ) |
Definition at line 174 of file RAS_MeshObject.cpp.
References m_materials, and NULL.
Referenced by AddPolygon(), AddVertex(), BL_SkinDeformer::Apply(), BL_ModifierDeformer::Apply(), getMaterial(), GetMaterialName(), GetTextureName(), GetVertex(), NumVertices(), RAS_MeshSlot::SetDeformer(), and SetVertexColor().
RAS_MeshMaterial * RAS_MeshObject::GetMeshMaterial | ( | RAS_IPolyMaterial * | mat | ) |
Definition at line 243 of file RAS_MeshObject.cpp.
References m_materials, and NULL.
STR_String & RAS_MeshObject::GetName | ( | ) |
Definition at line 226 of file RAS_MeshObject.cpp.
Referenced by bl_ConvertBlenderObject_Single(), KX_BlenderSceneConverter::ConvertMeshSpecial(), KX_BlenderSceneConverter::FreeBlendFile(), gameobject_from_blenderobject(), KX_BlenderSceneConverter::LinkBlendFile(), MergeScene_GameObject(), and KX_Scene::ReplaceMesh().
RAS_Polygon * RAS_MeshObject::GetPolygon | ( | int | num | ) | const |
Definition at line 195 of file RAS_MeshObject.cpp.
Referenced by KX_NavMeshObject::BuildVertIndArrays(), RAS_Polygon::GetVertexOffsetAbs(), ImageRender::ImageRender(), DbvtCullingCallback::Process(), CcdShapeConstructionInfo::SetMesh(), and CcdShapeConstructionInfo::UpdateMesh().
const STR_String & RAS_MeshObject::GetTextureName | ( | unsigned int | matid | ) |
Definition at line 233 of file RAS_MeshObject.cpp.
References GetMeshMaterial(), RAS_MaterialBucket::GetPolyMaterial(), RAS_IPolyMaterial::GetTextureName(), and RAS_MeshMaterial::m_bucket.
RAS_TexVert * RAS_MeshObject::GetVertex | ( | unsigned int | matid, |
unsigned int | index | ||
) |
Definition at line 397 of file RAS_MeshObject.cpp.
References RAS_MeshSlot::begin(), RAS_MeshSlot::end(), RAS_MeshSlot::iterator::endvertex, GetMeshMaterial(), len(), RAS_MeshMaterial::m_baseslot, RAS_MeshSlot::next(), NULL, RAS_MeshSlot::iterator::startvertex, and RAS_MeshSlot::iterator::vertex.
const float * RAS_MeshObject::GetVertexLocation | ( | unsigned int | orig_index | ) |
Definition at line 422 of file RAS_MeshObject.cpp.
References m_sharedvertex_map.
Referenced by KX_NavMeshObject::BuildVertIndArrays(), and CcdShapeConstructionInfo::UpdateMesh().
bool RAS_MeshObject::HasColliderPolygon | ( | ) | [inline] |
Definition at line 157 of file RAS_MeshObject.h.
References NumPolygons(), and p.
Referenced by CcdShapeConstructionInfo::SetMesh().
bool RAS_MeshObject::MeshModified | ( | ) |
Definition at line 147 of file RAS_MeshObject.cpp.
Referenced by BL_MeshDeformer::Apply(), and RAS_MaterialBucket::RenderMeshSlot().
int RAS_MeshObject::NumMaterials | ( | ) |
Definition at line 159 of file RAS_MeshObject.cpp.
References m_materials.
Referenced by BL_SkinDeformer::Apply(), and BL_ModifierDeformer::Apply().
int RAS_MeshObject::NumPolygons | ( | ) |
Definition at line 188 of file RAS_MeshObject.cpp.
Referenced by KX_NavMeshObject::BuildVertIndArrays(), HasColliderPolygon(), ImageRender::ImageRender(), DbvtCullingCallback::Process(), and CcdShapeConstructionInfo::UpdateMesh().
int RAS_MeshObject::NumVertices | ( | RAS_IPolyMaterial * | mat | ) |
Definition at line 381 of file RAS_MeshObject.cpp.
References RAS_MeshSlot::begin(), RAS_MeshSlot::end(), RAS_MeshSlot::iterator::endvertex, GetMeshMaterial(), len(), RAS_MeshMaterial::m_baseslot, RAS_MeshSlot::next(), and RAS_MeshSlot::iterator::startvertex.
void RAS_MeshObject::RemoveFromBuckets | ( | void * | clientobj | ) |
Definition at line 467 of file RAS_MeshObject.cpp.
References RAS_MeshSlot::m_bucket, m_materials, and RAS_MaterialBucket::RemoveMesh().
void RAS_MeshObject::SchedulePolygons | ( | int | drawingmode | ) |
Definition at line 555 of file RAS_MeshObject.cpp.
void RAS_MeshObject::SetMeshModified | ( | bool | v | ) | [inline] |
Definition at line 109 of file RAS_MeshObject.h.
Referenced by RAS_MaterialBucket::RenderMeshSlot().
void RAS_MeshObject::SetName | ( | const char * | name | ) |
Definition at line 219 of file RAS_MeshObject.cpp.
Referenced by BL_ConvertMesh().
void RAS_MeshObject::SetVertexColor | ( | RAS_IPolyMaterial * | mat, |
MT_Vector4 | rgba | ||
) |
Definition at line 313 of file RAS_MeshObject.cpp.
References RAS_MeshSlot::begin(), RAS_MeshSlot::end(), RAS_MeshSlot::iterator::endvertex, GetMeshMaterial(), i, RAS_MeshMaterial::m_baseslot, RAS_MeshSlot::next(), RAS_TexVert::SetRGBA(), RAS_MeshSlot::iterator::startvertex, and RAS_MeshSlot::iterator::vertex.
void RAS_MeshObject::SortPolygons | ( | RAS_MeshSlot & | ms, |
const MT_Transform & | transform | ||
) |
Definition at line 505 of file RAS_MeshObject.cpp.
References RAS_MeshSlot::iterator::array, RAS_MeshSlot::begin(), RAS_MeshSlot::end(), MT_Transform::getBasis(), RAS_MeshSlot::iterator::index, RAS_DisplayArray::LINE, RAS_DisplayArray::m_type, RAS_MeshSlot::next(), sort(), RAS_MeshSlot::iterator::totindex, and RAS_MeshSlot::iterator::vertex.
Referenced by RAS_MaterialBucket::RenderMeshSlot().
vector<int> RAS_MeshObject::m_cacheWeightIndex [protected] |
Definition at line 73 of file RAS_MeshObject.h.
Referenced by CheckWeightCache(), and RAS_MeshObject().
list<RAS_MeshMaterial> RAS_MeshObject::m_materials [protected] |
Definition at line 77 of file RAS_MeshObject.h.
Referenced by AddMeshUser(), AddPolygon(), GetFirstMaterial(), GetLastMaterial(), GetMaterialId(), GetMeshMaterial(), NumMaterials(), RemoveFromBuckets(), and ~RAS_MeshObject().
Mesh* RAS_MeshObject::m_mesh [protected] |
Definition at line 78 of file RAS_MeshObject.h.
Referenced by CheckWeightCache(), GetMesh(), RAS_MeshObject(), and ~RAS_MeshObject().
vector<vector<SharedVertex> > RAS_MeshObject::m_sharedvertex_map |
Definition at line 172 of file RAS_MeshObject.h.
Referenced by AddVertex(), BL_ConvertMesh(), KX_NavMeshObject::BuildVertIndArrays(), EndConversion(), GetVertexLocation(), CcdShapeConstructionInfo::UpdateMesh(), and ~RAS_MeshObject().