#include <primitive_block.h>
Definition at line 48 of file 3d/primitive_block.h.
Public Member Functions | |
void | addLine (uint32 vidx0, uint32 vidx1) |
Apend a line at getNumLine() (then resize +1 the numline). | |
void | addQuad (uint32 vidx0, uint32 vidx1, uint32 vidx2, uint32 vidx3) |
Apend a quad at getNumQuad() (then resize +1 the numquad). | |
void | addTri (uint32 vidx0, uint32 vidx1, uint32 vidx2) |
Apend a triangle at getNumTri() (then resize +1 the numtri). | |
uint32 | capacityLine () const |
Return the number of Line reserved. | |
uint32 | capacityQuad () |
uint32 | capacityTri () |
Return the number of triangles reserved. | |
CPrimitiveBlock (void) | |
const uint32 * | getLinePointer (void) const |
uint32 * | getLinePointer (void) |
uint32 | getNumLine (void) const |
Get the number of active Lineangles. | |
uint32 | getNumQuad (void) const |
uint32 | getNumTri (void) const |
Get the number of active triangles. | |
uint32 | getNumTriangles () |
return total number of triangle in this primitive block | |
const uint32 * | getQuadPointer (void) const |
return the quad buffer, const version | |
uint32 * | getQuadPointer (void) |
const uint32 * | getTriPointer (void) const |
uint32 * | getTriPointer (void) |
void | reserveLine (uint32 n) |
reserve space for nLines Line. You are allowed to write your Line indices on this space. | |
void | reserveQuad (uint32 n) |
void | reserveTri (uint32 n) |
reserve space for nTris triangles. You are allowed to write your triangles indices on this space. | |
void | serial (NLMISC::IStream &f) |
void | setLine (uint lineIdx, uint32 vidx0, uint32 vidx1) |
Build a Lineangle. | |
void | setNumLine (uint32 n) |
Set the number of active Line. It enlarge Line capacity, if needed. | |
void | setNumQuad (uint32 n) |
void | setNumTri (uint32 n) |
Set the number of active triangles. It enlarge Tri capacity, if needed. | |
void | setQuad (uint quadIdx, uint32 vidx0, uint32 vidx1, uint32 vidx2, uint32 vidx3) |
void | setTri (uint triIdx, uint32 vidx0, uint32 vidx1, uint32 vidx2) |
Build a triangle. | |
~CPrimitiveBlock (void) | |
Private Attributes | |
uint32 * | _Fan |
uint32 | _FanIdx |
std::vector< uint32 > | _Line |
uint32 | _LineCapacity |
uint32 | _NbLines |
uint32 | _NbQuads |
uint32 | _NbTris |
std::vector< uint32 > | _Quad |
uint32 | _QuadCapacity |
uint32 * | _Strip |
uint32 | _StripIdx |
std::vector< uint32 > | _Tri |
uint32 | _TriCapacity |
|
Definition at line 73 of file 3d/primitive_block.h. References _LineCapacity, _NbLines, _NbQuads, _NbTris, _QuadCapacity, and _TriCapacity.
00074 {_TriCapacity=_NbTris= _NbQuads=_QuadCapacity=_NbLines=_LineCapacity= 0;}; |
|
Definition at line 75 of file 3d/primitive_block.h.
00075 {}; |
|
Apend a line at getNumLine() (then resize +1 the numline).
Definition at line 80 of file primitive_block.cpp. References getNumLine(), setLine(), setNumLine(), and uint32. Referenced by NL3D::CPSUtil::displayBBox(), NL3D::CInstanceGroup::displayDebugClusters(), and NL3D::CPSGravity::show().
00081 { 00082 setNumLine(getNumLine()+1); 00083 setLine(getNumLine()-1, vidx0, vidx1); 00084 } |
|
Apend a quad at getNumQuad() (then resize +1 the numquad).
Definition at line 211 of file primitive_block.cpp. References getNumQuad(), setNumQuad(), setQuad(), and uint32.
00212 { 00213 setNumQuad(getNumQuad()+1); 00214 setQuad(getNumQuad()-1, vidx0, vidx1, vidx2, vidx3); 00215 } |
|
Apend a triangle at getNumTri() (then resize +1 the numtri).
Definition at line 138 of file primitive_block.cpp. References getNumTri(), setNumTri(), setTri(), and uint32. Referenced by NL3D::CInstanceGroup::displayDebugClusters(), and NL3D::COrderFace::insertInPB().
|
|
Return the number of Line reserved.
Definition at line 83 of file 3d/primitive_block.h. References _LineCapacity, and uint32.
00083 {return _LineCapacity;} |
|
Return the number of triangles reserved. Definition at line 131 of file 3d/primitive_block.h. References _QuadCapacity, and uint32.
00131 { return _QuadCapacity; } |
|
Return the number of triangles reserved.
Definition at line 104 of file 3d/primitive_block.h. References _TriCapacity, and uint32.
00104 {return _TriCapacity;} |
|
Definition at line 46 of file primitive_block.cpp.
|
|
Definition at line 38 of file primitive_block.cpp. Referenced by NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::DuplicatePrimitiveBlock(), NL3D::CMeshGeom::flagSkinVerticesForMatrixBlock(), and NL3D::CDriverGL::render().
|
|
Get the number of active Lineangles.
Definition at line 87 of file 3d/primitive_block.h. References _NbLines, and uint32. Referenced by addLine(), NL3D::CMeshMRMGeom::compileRunTime(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::DuplicatePrimitiveBlock(), NL3D::CMeshGeom::flagSkinVerticesForMatrixBlock(), NL3D::getMeshNumTri(), and NL3D::CDriverGL::render().
00087 {return _NbLines;} |
|
Get the number of active quads. Definition at line 141 of file 3d/primitive_block.h. References _NbQuads, and uint32. Referenced by addQuad(), NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CMeshMRMGeom::compileRunTime(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::DuplicatePrimitiveBlock(), NL3D::CMeshGeom::flagSkinVerticesForMatrixBlock(), NL3D::getMeshNumTri(), NL3D::CCoarseMeshBuild::remapCoordinates(), and NL3D::CDriverGL::render().
00141 { return _NbQuads; } |
|
|
return total number of triangle in this primitive block
Definition at line 160 of file 3d/primitive_block.h. References _NbLines, _NbQuads, _NbTris, and uint32. Referenced by NL3D::CMeshMRMGeom::build(), and NL3D::CMeshGeom::getNumTriangles().
|
|
return the quad buffer, const version
Definition at line 157 of file primitive_block.cpp.
|
|
Return the Quad buffer Definition at line 149 of file primitive_block.cpp. Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::DuplicatePrimitiveBlock(), NL3D::CMeshGeom::flagSkinVerticesForMatrixBlock(), NL3D::CCoarseMeshBuild::remapCoordinates(), and NL3D::CDriverGL::render().
|
|
Definition at line 99 of file primitive_block.cpp.
|
|
|
reserve space for nLines Line. You are allowed to write your Line indices on this space.
Definition at line 56 of file primitive_block.cpp. References _Line, _LineCapacity, and uint32. Referenced by NL3D::CPSUtil::displayBBox(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::DuplicatePrimitiveBlock(), setNumLine(), and NL3D::CPSGravity::show().
00057 { 00058 _Line.resize(n*2); 00059 _LineCapacity= n; 00060 } |
|
reserve space for quads. Definition at line 170 of file primitive_block.cpp. References _Quad, _QuadCapacity, and uint32. Referenced by NL3D::DuplicatePrimitiveBlock(), NL3D::CPSShockWave::getVBnPB(), and setNumQuad().
00171 { 00172 _Quad.resize(n*4); 00173 _QuadCapacity = n; 00174 } |
|
reserve space for nTris triangles. You are allowed to write your triangles indices on this space.
Definition at line 109 of file primitive_block.cpp. References _Tri, _TriCapacity, and uint32. Referenced by NL3D::CInstanceGroup::displayDebugClusters(), NL3D::DuplicatePrimitiveBlock(), NL3D::CStripifier::optimizeTriangles(), and setNumTri().
00110 { 00111 _Tri.resize(n*3); 00112 _TriCapacity= n; 00113 } |
|
Definition at line 219 of file primitive_block.cpp. References _Line, _LineCapacity, _NbLines, _NbQuads, _NbTris, _Quad, _QuadCapacity, _Tri, _TriCapacity, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), and NLMISC::IStream::serialVersion().
00220 { 00221 (void)f.serialVersion(0); 00222 00223 f.serial(_NbLines, _LineCapacity); 00224 f.serialCont(_Line); 00225 f.serial(_NbTris, _TriCapacity); 00226 f.serialCont(_Tri); 00227 f.serial(_NbQuads, _QuadCapacity); 00228 f.serialCont(_Quad); 00229 00230 } |
|
Build a Lineangle.
Definition at line 69 of file primitive_block.cpp. References _Line, uint, and uint32. Referenced by addLine(), NL3D::CDriverUser::CDriverUser(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawLinesUnlit(), NL3D::DuplicatePrimitiveBlock(), and NL3D::CPSTailDot::getVBnPB().
|
|
Set the number of active Line. It enlarge Line capacity, if needed.
Definition at line 61 of file primitive_block.cpp. References _LineCapacity, _NbLines, reserveLine(), and uint32. Referenced by addLine(), NL3D::CDriverUser::CDriverUser(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSTailDot::displayRibbons(), NL3D::CDRU::drawLine(), NL3D::CDRU::drawLinesUnlit(), NL3D::CMeshMRMSkinnedGeom::CLod::getRdrPassPrimitiveBlock(), and NL3D::CPSTailDot::getVBnPB().
00062 { 00063 if(_LineCapacity<n) 00064 { 00065 reserveLine(n); 00066 } 00067 _NbLines= n; 00068 } |
|
Set the number of active quads. It enlarges Quad capacity, if needed. Definition at line 180 of file primitive_block.cpp. References _NbQuads, _QuadCapacity, reserveQuad(), and uint32. Referenced by addQuad(), NL3D::CDriverUser::CDriverUser(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawQuad(), NL3D::CPSShockWaveHelper::drawShockWave(), and NL3D::CMeshMRMSkinnedGeom::CLod::getRdrPassPrimitiveBlock().
00181 { 00182 if(_QuadCapacity<n) 00183 { 00184 reserveQuad(n); 00185 } 00186 _NbQuads = n; 00187 } |
|
Set the number of active triangles. It enlarge Tri capacity, if needed.
Definition at line 114 of file primitive_block.cpp. References _NbTris, _TriCapacity, reserveTri(), and uint32. Referenced by addTri(), NL3D::CDriverUser::CDriverUser(), NL3D::CMeshMRMGeom::computeMeshVBHeap(), NL3D::CMeshGeom::computeMeshVBHeap(), NL3D::CInstanceGroup::displayDebugClusters(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CDRU::drawTriangle(), NL3D::CDRU::drawTrianglesUnlit(), NL3D::CMeshMRMSkinnedGeom::CLod::getRdrPassPrimitiveBlock(), NL3D::CPSRibbonLookAt::getVBnPB(), NL3D::CPSRibbon::getVBnPB(), NL3D::CStripifier::optimizeTriangles(), and NL3D::CSegRemanenceShape::setupVBnPB().
00115 { 00116 if(_TriCapacity<n) 00117 { 00118 reserveTri(n); 00119 } 00120 _NbTris= n; 00121 } |
|
Build a quad. Definition at line 193 of file primitive_block.cpp. References _Quad, uint, and uint32. Referenced by addQuad(), NL3D::CDriverUser::CDriverUser(), NL3D::CDRU::drawBitmap(), NL3D::CDRU::drawQuad(), NL3D::DuplicatePrimitiveBlock(), and NL3D::CPSShockWave::getVBnPB().
|
|
Build a triangle.
Definition at line 122 of file primitive_block.cpp. References _Tri, nlassert, sint, uint, and uint32. Referenced by addTri(), NL3D::CDriverUser::CDriverUser(), NL3D::CDRU::drawTriangle(), NL3D::CDRU::drawTrianglesUnlit(), NL3D::DuplicatePrimitiveBlock(), NL3D::CMeshMRMSkinnedGeom::CLod::getRdrPassPrimitiveBlock(), NL3D::CPSRibbonLookAt::getVBnPB(), NL3D::CPSRibbon::getVBnPB(), and NL3D::CSegRemanenceShape::setupVBnPB().
|
|
Definition at line 71 of file 3d/primitive_block.h. |
|
Definition at line 70 of file 3d/primitive_block.h. |
|
Definition at line 64 of file 3d/primitive_block.h. Referenced by getLinePointer(), reserveLine(), serial(), and setLine(). |
|
Definition at line 63 of file 3d/primitive_block.h. Referenced by capacityLine(), CPrimitiveBlock(), reserveLine(), serial(), and setNumLine(). |
|
Definition at line 62 of file 3d/primitive_block.h. Referenced by CPrimitiveBlock(), getNumLine(), getNumTriangles(), serial(), and setNumLine(). |
|
Definition at line 57 of file 3d/primitive_block.h. Referenced by CPrimitiveBlock(), getNumQuad(), getNumTriangles(), serial(), and setNumQuad(). |
|
Definition at line 52 of file 3d/primitive_block.h. Referenced by CPrimitiveBlock(), getNumTri(), getNumTriangles(), serial(), and setNumTri(). |
|
Definition at line 59 of file 3d/primitive_block.h. Referenced by getQuadPointer(), reserveQuad(), serial(), and setQuad(). |
|
Definition at line 58 of file 3d/primitive_block.h. Referenced by capacityQuad(), CPrimitiveBlock(), reserveQuad(), serial(), and setNumQuad(). |
|
Definition at line 69 of file 3d/primitive_block.h. |
|
Definition at line 68 of file 3d/primitive_block.h. |
|
Definition at line 54 of file 3d/primitive_block.h. Referenced by getTriPointer(), reserveTri(), serial(), and setTri(). |
|
Definition at line 53 of file 3d/primitive_block.h. Referenced by capacityTri(), CPrimitiveBlock(), reserveTri(), serial(), and setNumTri(). |