|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CVertexBuffer Class ReferenceA vertex buffer to work with the driver.
More...
#include <vertex_buffer.h>
Inheritance diagram for NL3D::CVertexBuffer:
List of all members.
[NOHEADER] |
uint | getTouchFlags () const |
void | resetTouchFlags () |
CRefPtr< IVBDrvInfos > | DrvInfos |
This is usable only with OpenGL vertex_program or DX8 vertex shaders. |
void | clearValueEx () |
| Clear all value in the vertex buffer. More...
|
void | addValueEx (TValue valueId, TType type) |
| Add a value in the vertex buffer. More...
|
bool | hasValueEx (TValue valueId) const |
| Test if the given value is present in the vertex buffer. More...
|
void | initEx () |
| Init the vertex buffer in extended mode. More...
|
void | setValueDouble1Ex (TValue valueId, uint idx, double value) |
| Setup values. More...
|
void | setValueDouble2Ex (TValue valueId, uint idx, double x, double y) |
void | setValueDouble3Ex (TValue valueId, uint idx, double x, double y, double z) |
void | setValueDouble3Ex (TValue valueId, uint idx, const CVectorD &vector) |
void | setValueDouble4Ex (TValue valueId, uint idx, double x, double y, double z, double w) |
void | setValueFloat1Ex (TValue valueId, uint idx, float value) |
void | setValueFloat2Ex (TValue valueId, uint idx, float x, float y) |
void | setValueFloat3Ex (TValue valueId, uint idx, float x, float y, float z) |
void | setValueFloat3Ex (TValue valueId, uint idx, const CVector &vector) |
void | setValueFloat4Ex (TValue valueId, uint idx, float x, float y, float z, float w) |
void | setValueShort1Ex (TValue valueId, uint idx, uint16 value) |
void | setValueShort2Ex (TValue valueId, uint idx, uint16 x, uint16 y) |
void | setValueShort3Ex (TValue valueId, uint idx, uint16 x, uint16 y, uint16 z) |
void | setValueShort4Ex (TValue valueId, uint idx, uint16 x, uint16 y, uint16 z, uint16 w) |
void | setValueUChar4Ex (TValue valueId, uint idx, CRGBA rgba) |
void * | getValueEx (TValue valueId, uint idx=0) |
| Get writable value pointer. More...
|
const void * | getValueEx (TValue valueId, uint idx=0) const |
| Get readable value pointer. More...
|
sint | getValueOffEx (TValue valueId) const |
| Get value offset. More...
|
TValue | getValueIdByNumberEx (uint valueNumber) |
| get the corresponding TValue according to the number of vertex attribute wanted (v[0], v[1] ...) Warning!: (TValue)valueNumber != getValueIdByNumberEx(valueNumber). More...
|
Public Types |
enum | TValue {
Position = 0,
Normal = 1,
TexCoord0 = 2,
TexCoord1 = 3,
TexCoord2 = 4,
TexCoord3 = 5,
TexCoord4 = 6,
TexCoord5 = 7,
TexCoord6 = 8,
TexCoord7 = 9,
PrimaryColor = 10,
SecondaryColor = 11,
Weight = 12,
PaletteSkin = 13,
Fog = 14,
Empty = 15,
NumValue = 16
} |
| Value ID, there is 16 value id. More...
|
enum | { FirstTexCoordValue = TexCoord0,
LastTexCoordValue = TexCoord7
} |
| Misc infos. More...
|
enum | {
PositionFlag = 1<<Position,
NormalFlag = 1<<Normal,
TexCoord0Flag = 1<<TexCoord0,
TexCoord1Flag = 1<<TexCoord1,
TexCoord2Flag = 1<<TexCoord2,
TexCoord3Flag = 1<<TexCoord3,
TexCoord4Flag = 1<<TexCoord4,
TexCoord5Flag = 1<<TexCoord5,
TexCoord6Flag = 1<<TexCoord6,
TexCoord7Flag = 1<<TexCoord7,
PrimaryColorFlag = 1<<PrimaryColor,
SecondaryColorFlag = 1<<SecondaryColor,
WeightFlag = 1<<Weight,
PaletteSkinFlag = (1<<PaletteSkin)|(1<<Weight),
FogFlag = 1<<Fog,
EmptyFlag = 1<<Empty
} |
| Value flags. More...
|
enum | TType {
Double1 = 0,
Float1,
Short1,
Double2,
Float2,
Short2,
Double3,
Float3,
Short3,
Double4,
Float4,
Short4,
UChar4,
NumType
} |
| Value type, there is 13 kind of value type as in DirectX8 and gl_vertex_program used in exteneded mode. More...
|
enum | { MaxStage = 8,
MaxWeight = 4
} |
| Some constants. More...
|
Public Methods |
| CVertexBuffer (void) |
| Default constructor. More...
|
| CVertexBuffer (const CVertexBuffer &vb) |
| Copy constructor. More...
|
| ~CVertexBuffer (void) |
| Destructor. More...
|
CVertexBuffer & | operator= (const CVertexBuffer &vb) |
| Copy operator. More...
|
void | setNumVertices (uint32 n) |
| Set the number of active vertices. More...
|
uint32 | getNumVertices (void) const |
| Get the number of active vertices. More...
|
void | deleteAllVertices () |
| Reset all the vertices from memory (contReset()), so that capacity() == getNumVertices() == 0. More...
|
void | reserve (uint32 nVerts) |
| Reserve space for nVerts vertices. More...
|
uint32 | capacity () |
| Return the number of vertices reserved. More...
|
uint16 | getVertexSize (void) const |
| Return the size of a vertex. More...
|
TType | getValueType (uint value) const |
| Return the type of a value. More...
|
const uint8 * | getValueTypePointer () const |
| Return the type array. More...
|
uint8 | getNumWeight () const |
| Return number of weight value in vertices. More...
|
void | serial (NLMISC::IStream &f) |
|
bool | setVertexFormat (uint32 Flags) |
| Setup the vertex format using standard values. More...
|
uint16 | getVertexFormat (void) const |
| Return the vertex format used by the vertex buffer. More...
|
uint | getNumTexCoordUsed () const |
| Returns the number of texture coordinate stages used by this vertex buffer. More...
|
void | setVertexCoord (uint idx, float x, float y, float z) |
void | setVertexCoord (uint idx, const CVector &v) |
void | setNormalCoord (uint idx, const CVector &v) |
void | setTexCoord (uint idx, uint8 stage, float u, float v) |
void | setTexCoord (uint idx, uint8 stage, const CUV &uv) |
void | setColor (uint idx, CRGBA rgba) |
void | setSpecular (uint idx, CRGBA rgba) |
void | setWeight (uint idx, uint8 wgt, float w) |
void | setPaletteSkin (uint idx, CPaletteSkin ps) |
sint | getNormalOff () const |
sint | getTexCoordOff (uint8 stage=0) const |
sint | getColorOff () const |
sint | getSpecularOff () const |
sint | getWeightOff (sint wgt) const |
| NB: it is ensured that WeightOff(i)==WeightOff(0)+i*sizeof(float). More...
|
sint | getPaletteSkinOff () const |
void * | getVertexCoordPointer (uint idx=0) |
| NB: the order of those methods follow the order in memory of the elements: VertexCoord NormalCoord TexCoord Color Specular Weight PaletteSkin. More...
|
void * | getNormalCoordPointer (uint idx=0) |
void * | getTexCoordPointer (uint idx=0, uint8 stage=0) |
void * | getColorPointer (uint idx=0) |
void * | getSpecularPointer (uint idx=0) |
void * | getWeightPointer (uint idx=0, uint8 wgt=0) |
void * | getPaletteSkinPointer (uint idx=0) |
const void * | getVertexCoordPointer (uint idx=0) const |
const void * | getNormalCoordPointer (uint idx=0) const |
const void * | getTexCoordPointer (uint idx=0, uint8 stage=0) const |
const void * | getColorPointer (uint idx=0) const |
const void * | getSpecularPointer (uint idx=0) const |
const void * | getWeightPointer (uint idx=0, uint8 wgt=0) const |
const void * | getPaletteSkinPointer (uint idx=0) const |
|
void | serialHeader (NLMISC::IStream &f) |
| just read/write the VertexFormat of the VB, number of vertices .... If read, VB is resized to numVertices. More...
|
void | serialSubset (NLMISC::IStream &f, uint vertexStart, uint vertexEnd) |
| just read/write a subset of the vertex buffer. More...
|
Static Public Attributes |
const uint | SizeType [NumType] |
| Static array with the size in byte of each value type. More...
|
const TType | DefaultValueType [NumValue] |
| Static array with the standard type of each value. More...
|
const uint | NumComponentsType [NumType] |
| Static array with the number of component of each value type. More...
|
Private Types |
enum | { TouchedVertexFormat = 1,
TouchedNumVertices = 2,
TouchedAll = 0xFFFF
} |
| Internal flags. More...
|
Private Methods |
void | serialOldV1Minus (NLMISC::IStream &f, sint ver) |
| Old version serialisation. V0 and V1. More...
|
uint16 | remapV2Flags (uint32 oldFlags, uint &weightCount) |
| Translate old flags. More...
|
Private Attributes |
uint8 | _Type [NumValue] |
uint8 | _Pad |
uint16 | _VertexSize |
uint16 | _Flags |
uint16 | _InternalFlags |
uint32 | _NbVerts |
uint32 | _Capacity |
std::vector< uint8 > | _Verts |
uint16 | _Offset [NumValue] |
Detailed Description
A vertex buffer to work with the driver.
Definition at line 105 of file vertex_buffer.h.
Member Enumeration Documentation
|
Misc infos.
-
Enumeration values:
-
FirstTexCoordValue |
|
LastTexCoordValue |
|
Definition at line 136 of file vertex_buffer.h. |
|
Value flags.
-
Enumeration values:
-
PositionFlag |
|
NormalFlag |
|
TexCoord0Flag |
|
TexCoord1Flag |
|
TexCoord2Flag |
|
TexCoord3Flag |
|
TexCoord4Flag |
|
TexCoord5Flag |
|
TexCoord6Flag |
|
TexCoord7Flag |
|
PrimaryColorFlag |
|
SecondaryColorFlag |
|
WeightFlag |
|
PaletteSkinFlag |
|
FogFlag |
|
EmptyFlag |
|
Definition at line 145 of file vertex_buffer.h. |
|
Internal flags.
-
Enumeration values:
-
TouchedVertexFormat |
Vertex format touched. |
TouchedNumVertices |
Num vertices touched. |
TouchedAll |
All touhched. |
Definition at line 220 of file vertex_buffer.h. |
enum NL3D::CVertexBuffer::TType
|
|
|
Value type, there is 13 kind of value type as in DirectX8 and gl_vertex_program used in exteneded mode.
-
Enumeration values:
-
Double1 |
|
Float1 |
|
Short1 |
|
Double2 |
|
Float2 |
|
Short2 |
|
Double3 |
|
Float3 |
|
Short3 |
|
Double4 |
|
Float4 |
|
Short4 |
|
UChar4 |
|
NumType |
|
Definition at line 170 of file vertex_buffer.h.
Referenced by getValueType, and serialHeader. |
enum NL3D::CVertexBuffer::TValue
|
|
Constructor & Destructor Documentation
NL3D::CVertexBuffer::CVertexBuffer |
( |
void |
|
) |
|
|
NL3D::CVertexBuffer::CVertexBuffer |
( |
const CVertexBuffer & |
vb |
) |
|
|
NL3D::CVertexBuffer::~CVertexBuffer |
( |
void |
|
) |
|
|
Member Function Documentation
void NL3D::CVertexBuffer::addValueEx |
( |
TValue |
valueId, |
|
|
TType |
type |
|
) |
|
|
|
Add a value in the vertex buffer.
After this call, call initEx() to init the vertex buffer. -
Parameters:
-
valueId |
is the value id to setup. |
type |
is the type used for this value. |
Definition at line 264 of file vertex_buffer.cpp.
References _Flags, _Type, Fog, nlassert, Normal, NumComponentsType, PaletteSkin, Position, PrimaryColor, SecondaryColor, type, and Weight.
Referenced by serialHeader, and setVertexFormat. |
uint32 NL3D::CVertexBuffer::capacity |
( |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::clearValueEx |
( |
|
) |
|
|
void NL3D::CVertexBuffer::deleteAllVertices |
( |
|
) |
|
|
sint NL3D::CVertexBuffer::getColorOff |
( |
|
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getColorPointer |
( |
uint |
idx = 0 |
) |
const |
|
void * NL3D::CVertexBuffer::getColorPointer |
( |
uint |
idx = 0 |
) |
|
|
const void * NL3D::CVertexBuffer::getNormalCoordPointer |
( |
uint |
idx = 0 |
) |
const |
|
void * NL3D::CVertexBuffer::getNormalCoordPointer |
( |
uint |
idx = 0 |
) |
|
|
sint NL3D::CVertexBuffer::getNormalOff |
( |
|
) |
const [inline] |
|
uint NL3D::CVertexBuffer::getNumTexCoordUsed |
( |
|
) |
const |
|
uint32 NL3D::CVertexBuffer::getNumVertices |
( |
void |
|
) |
const [inline] |
|
uint8 NL3D::CVertexBuffer::getNumWeight |
( |
|
) |
const |
|
sint NL3D::CVertexBuffer::getPaletteSkinOff |
( |
|
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getPaletteSkinPointer |
( |
uint |
idx = 0 |
) |
const |
|
void * NL3D::CVertexBuffer::getPaletteSkinPointer |
( |
uint |
idx = 0 |
) |
|
|
sint NL3D::CVertexBuffer::getSpecularOff |
( |
|
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getSpecularPointer |
( |
uint |
idx = 0 |
) |
const |
|
void * NL3D::CVertexBuffer::getSpecularPointer |
( |
uint |
idx = 0 |
) |
|
|
sint NL3D::CVertexBuffer::getTexCoordOff |
( |
uint8 |
stage = 0 |
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getTexCoordPointer |
( |
uint |
idx = 0, |
|
|
uint8 |
stage = 0 |
|
) |
const |
|
void * NL3D::CVertexBuffer::getTexCoordPointer |
( |
uint |
idx = 0, |
|
|
uint8 |
stage = 0 |
|
) |
|
|
uint NL3D::CVertexBuffer::getTouchFlags |
( |
|
) |
const [inline] |
|
const void* NL3D::CVertexBuffer::getValueEx |
( |
TValue |
valueId, |
|
|
uint |
idx = 0 |
|
) |
const [inline] |
|
void* NL3D::CVertexBuffer::getValueEx |
( |
TValue |
valueId, |
|
|
uint |
idx = 0 |
|
) |
[inline] |
|
|
get the corresponding TValue according to the number of vertex attribute wanted (v[0], v[1] ...) Warning!: (TValue)valueNumber != getValueIdByNumberEx(valueNumber).
-
Parameters:
-
valueNumber |
is the value index (0..15) you want to know the valueId. |
Definition at line 229 of file vertex_buffer.cpp.
References Empty, Fog, Normal, PaletteSkin, Position, PrimaryColor, SecondaryColor, TexCoord0, TexCoord1, TexCoord2, TexCoord3, TexCoord4, TexCoord5, TexCoord6, TexCoord7, TValue, and Weight. |
sint NL3D::CVertexBuffer::getValueOffEx |
( |
TValue |
valueId |
) |
const [inline] |
|
TType NL3D::CVertexBuffer::getValueType |
( |
uint |
value |
) |
const [inline] |
|
const uint8* NL3D::CVertexBuffer::getValueTypePointer |
( |
|
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getVertexCoordPointer |
( |
uint |
idx = 0 |
) |
const |
|
void * NL3D::CVertexBuffer::getVertexCoordPointer |
( |
uint |
idx = 0 |
) |
|
|
uint16 NL3D::CVertexBuffer::getVertexFormat |
( |
void |
|
) |
const [inline] |
|
|
Return the vertex format used by the vertex buffer.
Return one or several flags between : PositionFlag, WeightFlag, NormalFlag, PrimaryColorFlag, SecondaryColorFlag, FogFlag, TexCoord0Flag, TexCoord1Flag, TexCoord2Flag, TexCoord3Flag, TexCoord4Flag, TexCoord5Flag, TexCoord6Flag, TexCoord7Flag, PaletteSkinFlag
If WeightFlag is specified, 4 float are used to setup the skinning value on 4 bones.
Definition at line 315 of file vertex_buffer.h. |
uint16 NL3D::CVertexBuffer::getVertexSize |
( |
void |
|
) |
const [inline] |
|
sint NL3D::CVertexBuffer::getWeightOff |
( |
sint |
wgt |
) |
const [inline] |
|
const void * NL3D::CVertexBuffer::getWeightPointer |
( |
uint |
idx = 0, |
|
|
uint8 |
wgt = 0 |
|
) |
const |
|
void * NL3D::CVertexBuffer::getWeightPointer |
( |
uint |
idx = 0, |
|
|
uint8 |
wgt = 0 |
|
) |
|
|
bool NL3D::CVertexBuffer::hasValueEx |
( |
TValue |
valueId |
) |
const |
|
void NL3D::CVertexBuffer::initEx |
( |
|
) |
|
|
|
Init the vertex buffer in extended mode.
Definition at line 295 of file vertex_buffer.cpp.
References _Capacity, _Flags, _InternalFlags, _NbVerts, _Offset, _Type, _VertexSize, _Verts, NumValue, SizeType, TouchedAll, and value.
Referenced by serialHeader, and setVertexFormat. |
CVertexBuffer & NL3D::CVertexBuffer::operator= |
( |
const CVertexBuffer & |
vb |
) |
|
|
|
Copy operator.
Do not copy DrvInfos, copy all infos and set IDRV_VF_TOUCHED_ALL.
Definition at line 129 of file vertex_buffer.cpp.
References _Capacity, _Flags, _InternalFlags, _NbVerts, _Offset, _Type, _VertexSize, _Verts, NumValue, TouchedAll, and value.
Referenced by CVertexBuffer. |
uint16 NL3D::CVertexBuffer::remapV2Flags |
( |
uint32 |
oldFlags, |
|
|
uint & |
weightCount |
|
) |
[private] |
|
|
Translate old flags.
Definition at line 586 of file vertex_buffer.cpp.
References NormalFlag, PaletteSkinFlag, PositionFlag, PrimaryColorFlag, SecondaryColorFlag, TexCoord0Flag, TexCoord1Flag, TexCoord2Flag, TexCoord3Flag, TexCoord4Flag, TexCoord5Flag, TexCoord6Flag, TexCoord7Flag, and WeightFlag.
Referenced by serialHeader, and serialOldV1Minus. |
void NL3D::CVertexBuffer::reserve |
( |
uint32 |
nVerts |
) |
|
|
void NL3D::CVertexBuffer::resetTouchFlags |
( |
|
) |
[inline] |
|
|
just read/write the VertexFormat of the VB, number of vertices .... If read, VB is resized to numVertices.
Definition at line 809 of file vertex_buffer.cpp.
References _Flags, _NbVerts, _Type, addValueEx, clearValueEx, DefaultValueType, Float1, Float2, Float3, Float4, initEx, NLMISC::IStream::isReading, nlassert, NumValue, remapV2Flags, reserve, NLMISC::IStream::serial, NLMISC::IStream::serialVersion, setNumVertices, TType, TValue, and Weight.
Referenced by serial. |
|
Old version serialisation. V0 and V1.
Definition at line 667 of file vertex_buffer.cpp.
References _Flags, _InternalFlags, _NbVerts, _Type, DefaultValueType, Float1, Float2, Float3, Float4, getColorPointer, getNormalCoordPointer, getPaletteSkinPointer, getSpecularPointer, getTexCoordPointer, getVertexCoordPointer, getWeightPointer, id, NLMISC::IStream::isReading, MaxStage, nlassert, NormalFlag, NumValue, PaletteSkinFlag, PositionFlag, PrimaryColorFlag, remapV2Flags, reserve, SecondaryColorFlag, NLMISC::IStream::serial, setNumVertices, setVertexFormat, TexCoord0Flag, TouchedAll, w, and Weight.
Referenced by serial. |
|
just read/write a subset of the vertex buffer.
NB: because a version is serialised by subset, you must read same subset of vertices you have saved. (can't write 0-10, 10-20, and after load 0-5, 5-20).
Definition at line 934 of file vertex_buffer.cpp.
References _Flags, _InternalFlags, _NbVerts, _Type, getValueEx, id, NLMISC::IStream::isReading, nlassert, NumValue, NLMISC::IStream::serialBuffer, NLMISC::IStream::serialVersion, SizeType, TouchedAll, TValue, and value.
Referenced by serial. |
void NL3D::CVertexBuffer::setColor |
( |
uint |
idx, |
|
|
CRGBA |
rgba |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setNormalCoord |
( |
uint |
idx, |
|
|
const CVector & |
v |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setNumVertices |
( |
uint32 |
n |
) |
|
|
|
Set the number of active vertices.
It enlarge capacity, if needed.
Definition at line 335 of file vertex_buffer.cpp.
References _Capacity, _InternalFlags, _NbVerts, reserve, and TouchedNumVertices.
Referenced by NL3D::CCloudScape::CCloudScape, NL3D::CNoise3d::render, NL3D::CNoise3d::render2passes, NL3D::CNoise3d::renderGrid, NL3D::CNoise3d::renderGrid2passes, serialHeader, and serialOldV1Minus. |
void NL3D::CVertexBuffer::setSpecular |
( |
uint |
idx, |
|
|
CRGBA |
rgba |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setTexCoord |
( |
uint |
idx, |
|
|
uint8 |
stage, |
|
|
const CUV & |
uv |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setTexCoord |
( |
uint |
idx, |
|
|
uint8 |
stage, |
|
|
float |
u, |
|
|
float |
v |
|
) |
[inline] |
|
|
Definition at line 590 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Float2, MaxStage, nlassert, TexCoord0, TexCoord0Flag, and v. |
void NL3D::CVertexBuffer::setValueDouble1Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
double |
value |
|
) |
[inline] |
|
|
Setup values.
nlassert are raised if wrong value type is setuped.
Definition at line 659 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Double1, Double2, Double3, Double4, nlassert, NumValue, and value. |
void NL3D::CVertexBuffer::setValueDouble2Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
double |
x, |
|
|
double |
y |
|
) |
[inline] |
|
|
Definition at line 676 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Double2, Double3, Double4, nlassert, NumValue, x, and y. |
void NL3D::CVertexBuffer::setValueDouble3Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
const CVectorD & |
vector |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setValueDouble3Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
[inline] |
|
|
Definition at line 694 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Double3, Double4, nlassert, NumValue, x, y, and z. |
void NL3D::CVertexBuffer::setValueDouble4Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
w |
|
) |
[inline] |
|
|
Definition at line 730 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Double4, nlassert, NumValue, w, x, y, and z. |
void NL3D::CVertexBuffer::setValueFloat1Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
float |
value |
|
) |
[inline] |
|
|
Definition at line 750 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Float1, Float2, Float3, Float4, nlassert, NumValue, and value. |
void NL3D::CVertexBuffer::setValueFloat2Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
float |
x, |
|
|
float |
y |
|
) |
[inline] |
|
|
Definition at line 767 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Float2, Float3, Float4, nlassert, NumValue, x, and y. |
void NL3D::CVertexBuffer::setValueFloat3Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
const CVector & |
vector |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setValueFloat3Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
[inline] |
|
|
Definition at line 785 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Float3, Float4, nlassert, NumValue, x, y, and z. |
void NL3D::CVertexBuffer::setValueFloat4Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
w |
|
) |
[inline] |
|
|
Definition at line 821 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, Float4, nlassert, NumValue, w, x, y, and z. |
void NL3D::CVertexBuffer::setValueShort1Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
uint16 |
value |
|
) |
[inline] |
|
|
Definition at line 841 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, nlassert, NumValue, Short1, Short2, Short3, Short4, and value. |
|
Definition at line 858 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, nlassert, NumValue, Short2, Short3, Short4, x, and y. |
|
Definition at line 876 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, nlassert, NumValue, Short3, Short4, x, y, and z. |
|
Definition at line 895 of file vertex_buffer.h.
References _Flags, _Offset, _Type, _VertexSize, _Verts, nlassert, NumValue, Short4, w, x, y, and z. |
void NL3D::CVertexBuffer::setValueUChar4Ex |
( |
TValue |
valueId, |
|
|
uint |
idx, |
|
|
CRGBA |
rgba |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setVertexCoord |
( |
uint |
idx, |
|
|
const CVector & |
v |
|
) |
[inline] |
|
void NL3D::CVertexBuffer::setVertexCoord |
( |
uint |
idx, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
[inline] |
|
|
Definition at line 514 of file vertex_buffer.h.
References _Flags, _Type, _VertexSize, _Verts, Float3, nlassert, Position, PositionFlag, x, y, and z. |
bool NL3D::CVertexBuffer::setVertexFormat |
( |
uint32 |
Flags |
) |
|
|
|
Setup the vertex format using standard values.
Do it before any other standard methods.
Use one or several flag between : PositionFlag, WeightFlag, NormalFlag, PrimaryColorFlag, SecondaryColorFlag, FogFlag, TexCoord0Flag, TexCoord1Flag, TexCoord2Flag, TexCoord3Flag, TexCoord4Flag, TexCoord5Flag, TexCoord6Flag, TexCoord7Flag, PaletteSkinFlag
If WeightFlag is specified, 4 float are used to setup the skinning value on 4 bones.
Definition at line 154 of file vertex_buffer.cpp.
References addValueEx, clearValueEx, Float1, Float2, Float3, Float4, Fog, FogFlag, initEx, MaxStage, Normal, NormalFlag, PaletteSkin, PaletteSkinFlag, Position, PositionFlag, PrimaryColor, PrimaryColorFlag, SecondaryColor, SecondaryColorFlag, TexCoord0, TexCoord0Flag, TValue, UChar4, Weight, and WeightFlag.
Referenced by NL3D::CCloudScape::CCloudScape, NL3D::CNoise3d::init, and serialOldV1Minus. |
void NL3D::CVertexBuffer::setWeight |
( |
uint |
idx, |
|
|
uint8 |
wgt, |
|
|
float |
w |
|
) |
[inline] |
|
Member Data Documentation
uint32 NL3D::CVertexBuffer::_Capacity [private]
|
|
uint16 NL3D::CVertexBuffer::_Flags [private]
|
|
|
Definition at line 240 of file vertex_buffer.h.
Referenced by addValueEx, clearValueEx, CVertexBuffer, getColorOff, getColorPointer, getNormalCoordPointer, getNormalOff, getNumTexCoordUsed, getPaletteSkinOff, getPaletteSkinPointer, getSpecularOff, getSpecularPointer, getTexCoordOff, getTexCoordPointer, getValueEx, getValueOffEx, getWeightOff, getWeightPointer, hasValueEx, initEx, operator=, serialHeader, serialOldV1Minus, serialSubset, setColor, setNormalCoord, setPaletteSkin, setSpecular, setTexCoord, setValueDouble1Ex, setValueDouble2Ex, setValueDouble3Ex, setValueDouble4Ex, setValueFloat1Ex, setValueFloat2Ex, setValueFloat3Ex, setValueFloat4Ex, setValueShort1Ex, setValueShort2Ex, setValueShort3Ex, setValueShort4Ex, setValueUChar4Ex, setVertexCoord, and setWeight. |
uint16 NL3D::CVertexBuffer::_InternalFlags [private]
|
|
uint32 NL3D::CVertexBuffer::_NbVerts [private]
|
|
uint16 NL3D::CVertexBuffer::_Offset[NumValue] [private]
|
|
|
Definition at line 255 of file vertex_buffer.h.
Referenced by getColorOff, getColorPointer, getNormalCoordPointer, getNormalOff, getPaletteSkinOff, getPaletteSkinPointer, getSpecularOff, getSpecularPointer, getTexCoordOff, getTexCoordPointer, getValueOffEx, getWeightOff, getWeightPointer, initEx, operator=, setColor, setNormalCoord, setPaletteSkin, setSpecular, setTexCoord, setValueDouble1Ex, setValueDouble2Ex, setValueDouble3Ex, setValueDouble4Ex, setValueFloat1Ex, setValueFloat2Ex, setValueFloat3Ex, setValueFloat4Ex, setValueShort1Ex, setValueShort2Ex, setValueShort3Ex, setValueShort4Ex, setValueUChar4Ex, and setWeight. |
uint8 NL3D::CVertexBuffer::_Pad [private]
|
|
uint8 NL3D::CVertexBuffer::_Type[NumValue] [private]
|
|
|
Definition at line 233 of file vertex_buffer.h.
Referenced by addValueEx, getNumWeight, getValueType, getValueTypePointer, initEx, operator=, serialHeader, serialOldV1Minus, serialSubset, setColor, setNormalCoord, setPaletteSkin, setSpecular, setTexCoord, setValueDouble1Ex, setValueDouble2Ex, setValueDouble3Ex, setValueDouble4Ex, setValueFloat1Ex, setValueFloat2Ex, setValueFloat3Ex, setValueFloat4Ex, setValueShort1Ex, setValueShort2Ex, setValueShort3Ex, setValueShort4Ex, setValueUChar4Ex, and setVertexCoord. |
uint16 NL3D::CVertexBuffer::_VertexSize [private]
|
|
|
Definition at line 237 of file vertex_buffer.h.
Referenced by CVertexBuffer, getColorPointer, getNormalCoordPointer, getPaletteSkinPointer, getSpecularPointer, getTexCoordPointer, getValueEx, getVertexCoordPointer, getWeightPointer, initEx, operator=, reserve, setColor, setNormalCoord, setPaletteSkin, setSpecular, setTexCoord, setValueDouble1Ex, setValueDouble2Ex, setValueDouble3Ex, setValueDouble4Ex, setValueFloat1Ex, setValueFloat2Ex, setValueFloat3Ex, setValueFloat4Ex, setValueShort1Ex, setValueShort2Ex, setValueShort3Ex, setValueShort4Ex, setValueUChar4Ex, setVertexCoord, and setWeight. |
std::vector<uint8> NL3D::CVertexBuffer::_Verts [private]
|
|
|
Definition at line 252 of file vertex_buffer.h.
Referenced by deleteAllVertices, getColorPointer, getNormalCoordPointer, getPaletteSkinPointer, getSpecularPointer, getTexCoordPointer, getValueEx, getVertexCoordPointer, getWeightPointer, initEx, operator=, reserve, setColor, setNormalCoord, setPaletteSkin, setSpecular, setTexCoord, setValueDouble1Ex, setValueDouble2Ex, setValueDouble3Ex, setValueDouble4Ex, setValueFloat1Ex, setValueFloat2Ex, setValueFloat3Ex, setValueFloat4Ex, setValueShort1Ex, setValueShort2Ex, setValueShort3Ex, setValueShort4Ex, setValueUChar4Ex, setVertexCoord, and setWeight. |
|
Initial value:
{
Float3,
Float3,
Float2,
Float2,
Float2,
Float2,
Float2,
Float2,
Float2,
Float2,
UChar4,
UChar4,
Float4,
UChar4,
Float1,
Float1,
} Static array with the standard type of each value.
Definition at line 77 of file vertex_buffer.cpp.
Referenced by serialHeader, and serialOldV1Minus. |
const uint NL3D::CVertexBuffer::NumComponentsType [static]
|
|
|
Initial value:
{
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
4
} Static array with the number of component of each value type.
Definition at line 57 of file vertex_buffer.cpp.
Referenced by addValueEx. |
const uint NL3D::CVertexBuffer::SizeType [static]
|
|
|
Initial value:
{
1*sizeof(double),
1*sizeof(float),
1*sizeof(short),
2*sizeof(double),
2*sizeof(float),
2*sizeof(short),
3*sizeof(double),
3*sizeof(float),
3*sizeof(short),
4*sizeof(double),
4*sizeof(float),
4*sizeof(short),
4*sizeof(char),
} Static array with the size in byte of each value type.
Definition at line 39 of file vertex_buffer.cpp.
Referenced by initEx, and serialSubset. |
The documentation for this class was generated from the following files:
|
|