#include <mesh_mrm_skinned.h>
Definition at line 427 of file mesh_mrm_skinned.h.
Public Member Functions | |
void | getNormal (CVector &dest) const |
void | getPos (CVector &dest, float factor) const |
void | getU (float &_u) const |
void | getV (float &_v) const |
void | getWeight (float &dest, uint index) const |
void | serial (NLMISC::IStream &f) |
void | setNormal (const CVector &pos) |
void | setPos (const CVector &pos, float scaleFactor) |
void | setUV (float _u, float _v) |
void | setWeight (uint weightId, float weight) |
Data Fields | |
uint8 | Matrices [4] |
sint16 | Nx |
sint16 | Ny |
sint16 | Nz |
sint16 | U |
sint16 | V |
uint8 | Weights [4] |
sint16 | X |
sint16 | Y |
sint16 | Z |
|
Definition at line 442 of file mesh_mrm_skinned.h. References NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR, Nx, Ny, Nz, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z. Referenced by NL3D::CMeshMRMSkinnedGeom::getVertexBuffer(), and NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal().
00443 { 00444 dest.x = (float)Nx * (1.f/NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR); 00445 dest.y = (float)Ny * (1.f/NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR); 00446 dest.z = (float)Nz * (1.f/NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR); 00447 } |
|
Definition at line 436 of file mesh_mrm_skinned.h. References X, NLMISC::CVector::x, Y, NLMISC::CVector::y, Z, and NLMISC::CVector::z.
|
|
Definition at line 448 of file mesh_mrm_skinned.h. References NL3D_MESH_MRM_SKINNED_UV_FACTOR. Referenced by NL3D::CMeshMRMSkinnedGeom::getVertexBuffer(), and NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal().
00449 { 00450 _u = (float)U * (1.f/NL3D_MESH_MRM_SKINNED_UV_FACTOR); 00451 } |
|
Definition at line 452 of file mesh_mrm_skinned.h. References NL3D_MESH_MRM_SKINNED_UV_FACTOR. Referenced by NL3D::CMeshMRMSkinnedGeom::getVertexBuffer(), and NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal().
00453 { 00454 _v = (float)V * (1.f/NL3D_MESH_MRM_SKINNED_UV_FACTOR); 00455 } |
|
Definition at line 456 of file mesh_mrm_skinned.h. References index, NL3D_MESH_MRM_SKINNED_WEIGHT_FACTOR, and uint. Referenced by NL3D::CMeshMRMSkinnedGeom::getSkinWeights(), and NL3D::CMeshMRMSkinnedGeom::updateRawSkinNormal().
00457 { 00458 dest = (float)Weights[index] * (1.f/NL3D_MESH_MRM_SKINNED_WEIGHT_FACTOR); 00459 } |
|
Definition at line 1937 of file mesh_mrm_skinned.cpp. References Matrices, NL3D_MESH_MRM_SKINNED_MAX_MATRIX, Nx, Ny, Nz, NLMISC::IStream::serial(), NLMISC::IStream::serialVersion(), sint, uint, X, Y, and Z.
01938 { 01939 // Version 01940 sint ver = f.serialVersion(0); 01941 01942 f.serial (X); 01943 f.serial (Y); 01944 f.serial (Z); 01945 f.serial (Nx); 01946 f.serial (Ny); 01947 f.serial (Nz); 01948 f.serial (U); 01949 f.serial (V); 01950 uint i; 01951 for (i=0; i<NL3D_MESH_MRM_SKINNED_MAX_MATRIX; i++) 01952 { 01953 f.serial (Matrices[i]); 01954 f.serial (Weights[i]); 01955 } 01956 } |
|
Definition at line 1960 of file mesh_mrm_skinned.cpp. References NLMISC::clamp(), NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR, Nx, Ny, Nz, sint16, src, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z. Referenced by NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::build().
01961 { 01962 CVector pos = src; 01963 pos *= NL3D_MESH_MRM_SKINNED_NORMAL_FACTOR; 01964 pos.x = (float)floor(pos.x+0.5f); 01965 pos.y = (float)floor(pos.y+0.5f); 01966 pos.z = (float)floor(pos.z+0.5f); 01967 clamp (pos.x, -32768.f, 32767.f); 01968 clamp (pos.y, -32768.f, 32767.f); 01969 clamp (pos.z, -32768.f, 32767.f); 01970 Nx = (sint16)pos.x; 01971 Ny = (sint16)pos.y; 01972 Nz = (sint16)pos.z; 01973 } |
|
Definition at line 1977 of file mesh_mrm_skinned.cpp. References NLMISC::clamp(), sint16, X, NLMISC::CVector::x, Y, NLMISC::CVector::y, Z, and NLMISC::CVector::z. Referenced by NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::build().
01978 { 01979 CVector _pos = pos; 01980 _pos /= scaleFactor; 01981 _pos.x = (float)floor(_pos.x+0.5f); 01982 _pos.y = (float)floor(_pos.y+0.5f); 01983 _pos.z = (float)floor(_pos.z+0.5f); 01984 clamp (_pos.x, -32768.f, 32767.f); 01985 clamp (_pos.y, -32768.f, 32767.f); 01986 clamp (_pos.z, -32768.f, 32767.f); 01987 X = (sint16)_pos.x; 01988 Y = (sint16)_pos.y; 01989 Z = (sint16)_pos.z; 01990 } |
|
Definition at line 1994 of file mesh_mrm_skinned.cpp. References NLMISC::clamp(), NL3D_MESH_MRM_SKINNED_UV_FACTOR, sint16, and v. Referenced by NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::build().
01995 { 01996 float u = _u * NL3D_MESH_MRM_SKINNED_UV_FACTOR; 01997 float v = _v * NL3D_MESH_MRM_SKINNED_UV_FACTOR; 01998 u = (float)floor(u+0.5f); 01999 v = (float)floor(v+0.5f); 02000 clamp (u, -32768.f, 32767.f); 02001 clamp (v, -32768.f, 32767.f); 02002 U = (sint16)u; 02003 V = (sint16)v; 02004 } |
|
Definition at line 2008 of file mesh_mrm_skinned.cpp. References NLMISC::clamp(), NL3D_MESH_MRM_SKINNED_WEIGHT_FACTOR, uint, and uint8. Referenced by NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::build().
02009 { 02010 weight = weight * NL3D_MESH_MRM_SKINNED_WEIGHT_FACTOR; 02011 weight = (float)floor(weight+0.5f); 02012 clamp (weight, 0.f, 255.f); 02013 Weights[weightId] = (uint8)weight; 02014 } |
|
|
Definition at line 430 of file mesh_mrm_skinned.h. Referenced by getNormal(), serial(), and setNormal(). |
|
Definition at line 430 of file mesh_mrm_skinned.h. Referenced by getNormal(), serial(), and setNormal(). |
|
Definition at line 430 of file mesh_mrm_skinned.h. Referenced by getNormal(), serial(), and setNormal(). |
|
Definition at line 431 of file mesh_mrm_skinned.h. |
|
Definition at line 431 of file mesh_mrm_skinned.h. |
|
Definition at line 433 of file mesh_mrm_skinned.h. Referenced by NL3D::CMeshMRMSkinnedGeom::CPackedVertexBuffer::build(), NL3D::CMeshMRMSkinnedGeom::build(), and NL3D::CMeshMRMSkinnedGeom::computeBonesId(). |
|
Definition at line 429 of file mesh_mrm_skinned.h. |
|
Definition at line 429 of file mesh_mrm_skinned.h. |
|
Definition at line 429 of file mesh_mrm_skinned.h. |